better way to fix the mavericks usr/include problem, thx to @samueljohn #20499

Closed
wants to merge 2 commits into
from

Projects

None yet

6 participants

@clemensg
Contributor

fixes #20449

@MikeMcQuaid MikeMcQuaid and 1 other commented on an outdated diff Jun 14, 2013
Library/Homebrew/superenv/macsystem.rb
@@ -1,7 +1,7 @@
# new code because I don't really trust the Xcode code now having researched it more
module MacSystem extend self
def xcode_clt_installed?
- File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb" and File.executable? "/usr/bin/make"
+ File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb" and File.executable? "/usr/bin/make" and File.directory?("/usr/include")
@MikeMcQuaid
MikeMcQuaid Jun 14, 2013 Member

Don't use brackets and split this onto two lines (after lldb, probably).

@samueljohn
samueljohn Jun 14, 2013 Contributor

The brackets were my fault ... sometimes I just cannot break free my mind of my python roots...

@clemensg
Contributor

Is there a problem with jenkins? The changes reported by jenkins are not the same as in my pull request. Why is that?

@samueljohn
Contributor

Don't worry I think the Jenkins-Github integration is in the process of being set-up. Until that is running smoothly, we do verify all by hand. Don't have to resubmit your PR until it Jenkins is "green".

@MikeMcQuaid
Member

Yes, my fuck-up here, sorry.

@wfarr wfarr commented on the diff Jun 14, 2013
Library/Homebrew/superenv/macsystem.rb
@@ -1,7 +1,8 @@
# new code because I don't really trust the Xcode code now having researched it more
module MacSystem extend self
def xcode_clt_installed?
- File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb" and File.executable? "/usr/bin/make"
+ File.executable? "/usr/bin/clang" and File.executable? "/usr/bin/lldb" and
+ File.executable? "/usr/bin/make" and File.directory? "/usr/include"
@wfarr
wfarr Jun 14, 2013 Contributor

Under Mavericks, even after the CLTs are installed, /usr/include does not exist.

@jacknagel
jacknagel Jun 14, 2013 Contributor

I believe that's the intention here.

@jacknagel
jacknagel Jun 14, 2013 Contributor

Though this does need a comment explaining why this method is now seemingly misnamed on 10.9.

@samueljohn
samueljohn Jun 14, 2013 Contributor

Yes, true. My idea was to treat 10.9 as "Xcode-only" in our current homebrew-speak (valid for 10.8). This means Homebrew will not assume /usr/lib and /usr/include to be available for compilation but will pass certain flags to the compiler (and set up a bunch of env vars) so that The tools and header inside of Xcode are used.

And people reported that MacOS.Xcode.prefix (tested in brew irb) points to a dir that contains the includes on 10.9.

Concluding: Whereas on 10.8 is was sufficient to check for clang and make to decide if the the usual unix tools are in /usr, on 10.9 we have to check further.

@clemensg
clemensg Jun 14, 2013 Contributor

What comment would you suggest? Do you want to add it yourselves after pulling or do you want me to add it to the PR?

@clemensg clemensg referenced this pull request in Homebrew/homebrew-php Jun 15, 2013
Closed

Installation fails on OS X Mavericks #591

@paulmillr
Contributor

doesn’t fix stuff 4 me at all. Got same "not found in path" errors

@clemensg
Contributor

Please try again with #20524

And let's discuss this issue in Homebrew/homebrew-php#591

@MikeMcQuaid
Member

Closing then.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.