-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
brew install ruby failure #13225
Comments
I just ran Edit: I know this wasn't exactly an isolated test as I was installing other software as well. Just thought I would report my results. |
We could tag this xcode-only and ask sj to look at it. |
Still no luck here. I got a failure of different kind, but similar to the last. This is a missing header file (and it was the macvim build that failed), whereas the last might be an incorrect header file. All of which suggests a problem with my C compiler, which |
@2bits Speaking as an outsider, it does seem Xcode-related. |
ping @samueljohn |
Based on the referenced gist, I'm pretty sure the problem is the So it boils down to the code after the But in the short term, I bet installing the Command Line Tools package would fix it for this user. |
A good catch. Then, perhaps we remove that -L from the CFLAGS and I |
Installing CLT made it happen. |
Well this is an XCode only problem according to the OP. So he should not satisfy clt_installed. So let's ignore that for a minute. He could only have satisfied sdk == nil. Why was his sdk==nil if he has XCode-4.3.3? |
No it's not that the Basically, that code is putting linker flags into CFLAGS to try to work around bad Makefiles which forget to pass LDFLAGS to the linker, but it's breaking cases where the linker is getting both CFLAGS and LDFLAGS, with CFLAGS passed first. |
Wait I get it. |
Well I don't know it's succeeding to be honest. I don't have XCode only to test on. |
Right, succeeding means The reason I'm pretty sure the check is succeeding is that I was getting the exact same error last week when the check was just |
Ok so are |
I think it's a hack. The autoconf docs have some comments which back this up, regarding what flags go where. |
Yes, it is a hack, and I do not like it. I made noise about this before the Xcode-only stuff was pulled, but the prevailing opinion seemed to be that doing it on a per-formula basis would quickly become a maintenance nightmare. I would be interested to see just how bad it is, though. I would much prefer that the stuff in ENV.rb properly use CFLAGS, CPPFLAGS, and LDFLAGS if feasible. Perhaps an |
I also noticed recently that although |
I like |
I have a Xcode-only system and I can confirm this bug. Since removing stuff from the CFLAGS is harder than adding, we should remove this line and add it for formulae that actually need it! @jeffstyr you are right. We had an issue that the
I am not a fan of @jacknagel, @2bits @mistydemeo: I consider a
Note that we don't have |
oh and this issue should be flagged xcode_only. |
yes that's better to add a specific |
And |
@jeffstyr it does: |
Ah. That output doesn't show up for me, because of the check in: config_s << "CLT: #{describe_clt}\n" if MacOS.xcode_version.to_f >= 4.3 Since "N/A" is valid output anyway, it should probably report that for the < 4.3 case. Side issue though. |
@samueljohn Are you working on a core patch to fix |
@jeffstyr We omit it for older Xcode because while it does have a defined version, it was not a separate package. |
Right, since it's not relevant for older Xcode versions, I was thinking |
N/A in this context usually means "not installed" or "not found", and since it's not relevant to debugging we just omit it. |
Okay. (Although "N/A" actually means "not applicable", which fits the < 4.3 case; in those other cases it should probably actually say "not installed" or "not found", since it actually is applicable information in those situations.) @2bits I'm not sure if there is any non-convoluted temporary fix that can be made to the ruby formula itself; I think the easiest workaround is just to install the CLT (or, just comment out this line of code locally, which is basically the long-term fix anyway). On the core topic (since we are looking at this area of the code), not clt_version.empty? or dev_tools_path == Pathname.new("/usr/bin") If you think through the boolean-ness, the clt_version check seems extraneous; with that, you'll get |
N/A also means "not available", which is usually how I read it in the config output. I agree about clt_installed?, I think. Will look at it harder later. |
Pulled the likely fix; please |
@jeffstyr please check and report if there are still issues. Thanks for reporting! |
@samueljohn I just debugged it, it was @tlberglund who reported it. (It wasn't broken for me currently, since your fix last week that added the |
Similar to #13046,
brew install ruby
is failing for me with a compilation error in readline.c related to the username_completion_function function. I have whippedbrew doctor
into the best shape I know how, but you'll note it's still complaining of the Xcode command line tools.Gists of all of the things:
brew install -v ruby
(stdout)brew install -v ruby
(stderr)brew doctor
brew --config
Let me know what other information I can provide, and thanks in advance for your attention.
The text was updated successfully, but these errors were encountered: