-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Stack overflow error #13012
Comments
Paging @samueljohn. |
Just for reference, which version of OS X and Ruby are you using? This works fine for me on 10.7.3 and ruby 1.8.7 so there may be another factor influencing this error. |
That's weird...I'm on OS X 10.7.3 and ruby 1.8.7 as well.
|
I think that this code path is only hit if the CLT is not installed? Regardless, clearly these methods should not call each other. |
I experienced this same problem - after installing Xcode and letting it run its setup tasks, I no longer get the error. I agree with jacknagel above, though, it would probably be great if the methods did not call each other. |
Have you installed Command Line Tools? 'XCode' -> 'Preferences' -> 'Downloads'. |
I had installed XCode, but hadn't touched it at all. So, command line tools weren't installed and the xcode-select path was |
O.o oh what have I done? |
And if that sucks can you suggest a better solution? Otherwise we need to revert. |
I have had the same error. Installing "Command Line Tools" for XCode solved the problem (as I suggested an hour ago). You obviously cannot run tools like 'strip' or 'gcc' if they are not installed. Believe me, brew is working fine on 10.7.3/4. |
Under certain circumstances, MacOS.locate and MacOS.dev_tools_path would call each other recursively. This was limited to systems with Xcode minus the CLT. See #13012.
Hotfix pushed in 78b9e85. Can someone with only Xcode and no Command Line Tools please test? This should fix the recursion and also make builds work. |
I just installed Homebrew a little while ago. Got the documented error; Made the change from mistydemeo and it's now working |
Thank you, @stevewanless. Can you try installing some software, and tell me if that works? |
All hail @mistydemeo! |
At first sorry all, that was my fault and I couldn't respond yesterday timely. I analyzed the issue. The good news: None of the existing homebrew users are affected so there need to revert. On systems with only Xcode (that was not supported at all up to now) which have xcode-select set to a wrong path (like Thanks @mistydemeo for your patch. We could also make |
I think I have a proper fix (#13037) for this issue by assuring that it's safe to call
Now, it's safe to call I have tested this with different settings of xcode-select (hint: |
Oh forgot to say, that I was able to reproduce on my Xcode-only setup when xcode-select points to nonexistant |
Undoing parts of the hot fix 78b9e85. The only thing missing was to check for `system "/usr/bin/xcrun -find make 1>/dev/null 2>&1"` and then it's safe to call locate. This commit restores the original functionality but without the risk for recursion and improves the logic of `MacOS.locate`. See below. To important changes in this commit: - For Xcode _and_ CLT: don't add the SDK and leave things as before. So if `MacOS.clt_installed?`, then no `SDKROOT` and `-L` and `-I` directories are set in `ENV.macosxsdk`. - Improved the logic for `MacOS.locate` for Xcode-only situations by assuring that the xcode-select path is correct. This is done by checking that `bin/make` exists and is executable. Otherwise it was possible to set xcode-select to an empty dir. This check is done in `MacOS.sdk_path` too. We are now able to use Xcode wherever it is and can work even, if xcode-select is set to invalid values. (Remember some users don't have sudo access and that is needed to fix xcode-select). Some minor whitespace fixes. Minor backtick fix in doctor.rb's printout.
Under certain circumstances, MacOS.locate and MacOS.dev_tools_path would call each other recursively. This was limited to systems with Xcode minus the CLT. See Homebrew#13012.
Undoing parts of the hot fix 78b9e85. The only thing missing was to check for `system "/usr/bin/xcrun -find make 1>/dev/null 2>&1"` and then it's safe to call locate. This commit restores the original functionality but without the risk for recursion and improves the logic of `MacOS.locate`. See below. To important changes in this commit: - For Xcode _and_ CLT: don't add the SDK and leave things as before. So if `MacOS.clt_installed?`, then no `SDKROOT` and `-L` and `-I` directories are set in `ENV.macosxsdk`. - Improved the logic for `MacOS.locate` for Xcode-only situations by assuring that the xcode-select path is correct. This is done by checking that `bin/make` exists and is executable. Otherwise it was possible to set xcode-select to an empty dir. This check is done in `MacOS.sdk_path` too. We are now able to use Xcode wherever it is and can work even, if xcode-select is set to invalid values. (Remember some users don't have sudo access and that is needed to fix xcode-select). Some minor whitespace fixes. Minor backtick fix in doctor.rb's printout. Signed-off-by: Adam Vandenberg <[email protected]>
* master: (113 commits) ren 1.0 fakeroot 1.18.4 ice fails with clang gnu-prolog fails with (some versions of) clang uudeview fails with clang elasticsearch 0.19.7 cairo: fix llvm compile error, add --universal mjpegtools fails with clang libmxml 2.7 Extract MacOS module to separate file Refactor MacOS. remove confusing comments Fix Homebrew#13012 properly and don't set the SDK if CLT chromedriver 21.0.1180.4 gphoto2 2.4.14 libgphoto2 2.4.14 Remove metapixel Remove lbdb. wxmac: use standard C++ string classes Voldemort 0.90.1 ...
Under certain circumstances, MacOS.locate and MacOS.dev_tools_path would call each other recursively. This was limited to systems with Xcode minus the CLT. See Homebrew#13012.
Undoing parts of the hot fix 78b9e85. The only thing missing was to check for `system "/usr/bin/xcrun -find make 1>/dev/null 2>&1"` and then it's safe to call locate. This commit restores the original functionality but without the risk for recursion and improves the logic of `MacOS.locate`. See below. To important changes in this commit: - For Xcode _and_ CLT: don't add the SDK and leave things as before. So if `MacOS.clt_installed?`, then no `SDKROOT` and `-L` and `-I` directories are set in `ENV.macosxsdk`. - Improved the logic for `MacOS.locate` for Xcode-only situations by assuring that the xcode-select path is correct. This is done by checking that `bin/make` exists and is executable. Otherwise it was possible to set xcode-select to an empty dir. This check is done in `MacOS.sdk_path` too. We are now able to use Xcode wherever it is and can work even, if xcode-select is set to invalid values. (Remember some users don't have sudo access and that is needed to fix xcode-select). Some minor whitespace fixes. Minor backtick fix in doctor.rb's printout. Signed-off-by: Adam Vandenberg <[email protected]>
Under certain circumstances, MacOS.locate and MacOS.dev_tools_path would call each other recursively. This was limited to systems with Xcode minus the CLT. See Homebrew#13012.
Undoing parts of the hot fix 78b9e85. The only thing missing was to check for `system "/usr/bin/xcrun -find make 1>/dev/null 2>&1"` and then it's safe to call locate. This commit restores the original functionality but without the risk for recursion and improves the logic of `MacOS.locate`. See below. To important changes in this commit: - For Xcode _and_ CLT: don't add the SDK and leave things as before. So if `MacOS.clt_installed?`, then no `SDKROOT` and `-L` and `-I` directories are set in `ENV.macosxsdk`. - Improved the logic for `MacOS.locate` for Xcode-only situations by assuring that the xcode-select path is correct. This is done by checking that `bin/make` exists and is executable. Otherwise it was possible to set xcode-select to an empty dir. This check is done in `MacOS.sdk_path` too. We are now able to use Xcode wherever it is and can work even, if xcode-select is set to invalid values. (Remember some users don't have sudo access and that is needed to fix xcode-select). Some minor whitespace fixes. Minor backtick fix in doctor.rb's printout. Signed-off-by: Adam Vandenberg <[email protected]>
Hi, I'm still having this problem. How do I fix it? How do I install or use this fix? |
Exactly this problem? I doubt it. Unless you haven't updated since then. Please |
I ran brew update and everything was already up to date. When I try and run 'gem install pg' it does not install, because it does not find the PostgreSQL libraries. Let me give you more background on the problems I'm experiencing. The command bundle install leads to this errror: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
checking for pg_config... yes So I've run 'gem install pg -v 0.14.1' which does not return any error message, but it also doesn't fix the problem. Online I was advised to re install PostgreSQL first, either with their installer script or using brew. Other people suggested adding the pg_config file to the path variable. That seemed to solve the problem for many people, but not for me. On another note, in the process of installing the EnterpriseDB script, the wizard wanted me to connect to a database on port 5342, which it didn't seem to create. I believe the libraries are installed correctly, but the Heroku installer is looking for some file in the wrong place, or with a different name, or some other conflict. Thank you, |
...none of that has anything to do with this issue. I can install the pg gem against Homebrew's postgresql without issue. Try asking on stackoverflow or something. |
Hi...I need to add arguements to the bundle install. Sorry for complaining. |
brew at head doesn't work for me. I'm on a brand new OS X 10.7.3.
I installed successfully with the install_homebrew.rb script, but running any brew command fails.
Here's the trace:
$ brew
/usr/local/Library/Homebrew/utils.rb:385:in 'xctools_fucked?': stack level too deep (SystemStackError)
from /usr/local/Library/Homebrew/utils.rb:302:in 'locate'
from /usr/local/Library/Homebrew/utils.rb:339:in 'dev_tools_path'
from /usr/local/Library/Homebrew/utils.rb:313:in 'locate'
from /usr/local/Library/Homebrew/utils.rb:339:in 'dev_tools_path'
from /usr/local/Library/Homebrew/utils.rb:313:in 'locate'
from /usr/local/Library/Homebrew/utils.rb:339:in 'dev_tools_path'
from /usr/local/Library/Homebrew/utils.rb:313:in 'locate'
from /usr/local/Library/Homebrew/utils.rb:339:in 'dev_tools_path'
... 661 levels...
from /usr/local/Library/Homebrew/utils.rb:339:in 'dev_tools_path'
from /usr/local/Library/Homebrew/global.rb:96
from /usr/local/bin/brew:10:in 'require'
from /usr/local/bin/brew:10
It looks like this is caused by commit 3c52a30.
locate
anddev_tools_path
call each other on the lines in the stack trace. I checked out brew at the commit before that and extracted it to /usr/local, and it worked.The text was updated successfully, but these errors were encountered: