This repository has been archived by the owner. It is now read-only.

serf looks for OSX10.8.xctoolchain #13586

Closed
lutzh opened this Issue Jul 25, 2012 · 29 comments

Comments

Projects
None yet

lutzh commented Jul 25, 2012

Hi,

brew svn failes on my Mountain Lion / XCode 4.4 machine. A quick look in config.log revealed:

configure:4135: error: C preprocessor "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc -E" fails sanity check

The directory OSX10.8.xctoolchain does not exist in this setup, there is only XcodeDefault.xctoolchain.

Contributor

wedgeV commented Jul 25, 2012

same here

same here

Contributor

wedgeV commented Jul 26, 2012

i ended up symlinking /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain to /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain

@wedgeV Thank you so much !!

The symlink fix worked for me too.

fengmk2 commented Jul 26, 2012

thx

thx!

cool~

Thx, it worked for me too.

FYI, the command to make the symlink.
"sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain"

emmby commented Jul 28, 2012

I'm using XCode 45-DP3, didn't work for me even after modifying the paths for the symlink

emmby commented Jul 28, 2012

Ah, the problem seems to be that I didn't have the xcode cltools installed

terryso commented Jul 28, 2012

good, it's work

it´s work!

prajba commented Jul 29, 2012

thx!

gjflsl commented Jul 30, 2012

thanks!

danbt79 commented Jul 30, 2012

Symlink corrected this for me : 10.8 Mountain Lion : XCode 4.4 - cheers!

Owner

MikeMcQuaid commented Jul 30, 2012

Even with the CLT this is broken. Upstream issue though. Can someone file this upstream? If not I'll try and do so and patch this at some stage.

You will also be redirected to this page if you don't have the Command Line Tools for Code installed. That specific issue can be fixed by starting XCode > Preferences >  Downloads > Components > Command Line Tools > Install

nhoizey commented Aug 2, 2012

Symlink corrected this for me also. I already had XCode and Command Line Tools.

@lutzh lutzh closed this Aug 2, 2012

Contributor

2bits commented Aug 2, 2012

@lutzh This should remain open until we fix it.

The problem seems to be that configure is calling apr-1-config --cpp and that is returning the invalid toolchain path. That's is not a serf problem. That's an OSX bug.

The easy solution for us is to define the CPP environment variable for configure to be #{ENV.cc} -E

lutzh commented Aug 2, 2012

Closed it because it is a duplicate of #13262 (and I could not find a "mark as duplicate" button, "close" was all that was available.

lutzh commented Aug 2, 2012

@2bits ok if you prefer to keep it open that's of course fine by me, I was just thinking because of #13262 and here everybody is just repeating that the symlink workaround is working for them....

@lutzh lutzh reopened this Aug 2, 2012

Contributor

2bits commented Aug 2, 2012

:-) This is #13586. Having it open reminds us to fix it in the formula. No worries though.

2bits pushed a commit to 2bits/homebrew that referenced this issue Aug 2, 2012

serf: fix CPP invalid path build error on ML
serf-1.1.1 queries `apr-1-config --cpp` which return a non-existent
path on Mountain Lion.  This causes a build error where `configure`
can't find a working `CPP`.  Add an ENV var to use `#{ENV.cc} -E`

serf then tries to use `/usr/share/apr-1/build-1/libtool` which
also has that non-existent path buried inside it.  Add an ENV var
to specify using HB `glibtool`.

Tested on ML using clang and llvm from XCode-4.4 using the native
and universal options.

Fixes #13586

As noted by 2bits@f84fc31, this problem originates with apr-1-config, and not Xcode specifically. The mod_wsgi formula is also broken.

2bits' patched serf formula was able to route around this problem because serf's Makefile calls libtool directly. The problem affecting mod_wsgi, and the formula I'm working on, is that the Makefiles are building with apxs, which gleefully ignores environment variables and uses apr-1-config for configuration and paths.

I couldn't find a way to override apr-1-config's settings or to convince apxs to use my values instead.

The symlink workaround successfully patches the problem, but it would be nice to have a cleaner solution. While this is an upstream problem, it's a headache that may be around for some time.

Contributor

2bits commented Aug 3, 2012

Hmm. Looks like I should bug report the apr issues to Apple. I'll take a look at mod_wsgi and see if there's anything else we can do besides asking the user to make a symlink (nothing wrong with that, but it'd be better if it didn't fail at all).

@adamv adamv closed this in e492ff9 Aug 4, 2012

Contributor

samueljohn commented Aug 6, 2012

On Xcode-Only Mountain Lion system, an additional fix is needed: #13998.

fgeller added a commit to fgeller/homebrew that referenced this issue Aug 22, 2012

serf: fix CPP invalid path build error on ML
serf-1.1.1 queries `apr-1-config --cpp` which return a non-existent
path on Mountain Lion.  This causes a build error where `configure`
can't find a working `CPP`.  Add an ENV var to use `#{ENV.cc} -E`

serf then tries to use `/usr/share/apr-1/build-1/libtool` which
also has that non-existent path buried inside it.  Add an ENV var
to specify using HB `glibtool`.

Tested on ML using clang and llvm from XCode-4.4 using the native
and universal options.

Fixes #13586

Closes #13891.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012

serf: fix CPP invalid path build error on ML
serf-1.1.1 queries `apr-1-config --cpp` which return a non-existent
path on Mountain Lion.  This causes a build error where `configure`
can't find a working `CPP`.  Add an ENV var to use `#{ENV.cc} -E`

serf then tries to use `/usr/share/apr-1/build-1/libtool` which
also has that non-existent path buried inside it.  Add an ENV var
to specify using HB `glibtool`.

Tested on ML using clang and llvm from XCode-4.4 using the native
and universal options.

Fixes #13586

Closes #13891.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012

serf: fix CPP invalid path build error on ML
serf-1.1.1 queries `apr-1-config --cpp` which return a non-existent
path on Mountain Lion.  This causes a build error where `configure`
can't find a working `CPP`.  Add an ENV var to use `#{ENV.cc} -E`

serf then tries to use `/usr/share/apr-1/build-1/libtool` which
also has that non-existent path buried inside it.  Add an ENV var
to specify using HB `glibtool`.

Tested on ML using clang and llvm from XCode-4.4 using the native
and universal options.

Fixes #13586

Closes #13891.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

bsy-web commented Jun 18, 2013

Running into this issue without XCode installed on 10.8 (=> nor XCode command-line tools). Running homebrew using https://github.com/kennethreitz/osx-gcc-installer.

Created full XCode path first, then same symlink trick, but different source.

  1. mkdir -p "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/"
  2. ln -s /usr/bin/cc "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc"

@2bits solution seemed cleanest. Can someone clarify how to set this in bash:
"define the CPP environment variable for configure to be #{ENV.cc} -E"

Owner

MikeMcQuaid commented Jun 18, 2013

Running homebrew using https://github.com/kennethreitz/osx-gcc-installer.

Don't do that. It doesn't work.

bsy-web commented Jun 18, 2013

@MikeMcQuaid - Thanks for the heads up. Can you elaborate (I'm not heavily invested yet)?

  • does not work for serf?
  • does not work for serf-dependent apps?
  • does not work for an overwhelming number of brew formulas?

It has built a handfool of tools successfully so far (including serf based on output), but as you responded, svn failed...

Appreciate any feedback.

`==> Installing subversion dependency: serf
==> Downloading http://serf.googlecode.com/files/serf-1.2.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/serf-1.2.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/serf/1.2.0 --with-apr=/usr/bin
==> make install
/usr/local/Cellar/serf/1.2.0: 11 files, 356K, built in 6 seconds
==> Installing subversion
==> Downloading http://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.7.9.tar.bz2
==> Best Mirror http://download.nextag.com/apache/subversion/subversion-1.7.9.tar.bz2

curl: (22) The requested URL returned error: 404`

@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.