Closed DomT4 closed 10 years ago
Note that "class is not a module" is a ruby error that is unrelated to the actual build error, which is:
==> make PREFIX=/usr/local/Cellar/mercurial/3.1.1 install-bin
clang -bundle -undefined dynamic_lookup -Wl,-F. -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.Internal.sdk/System/Library/PrivateFrameworks -framework CrashReporterSupport build/temp.macosx-10.10-intel-2.7/mercurial/base85.o -o build/lib.macosx-10.10-intel-2.7/mercurial/base85.so
ld: framework not found CrashReporterSupport
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
as for "class is not a module", there is a constant name conflict happening somewhere between Homebrew and the ruby stdlib, but I haven't tracked it down yet. You can safely ignore it, as it only happens when a real build error occurs.
Can you post the outputs of:
python-config --includes
python-config --libs
python-config --cflags
python-config --ldflags
I'm guessing this is "Some python modules may fail to install." issue reported by Apple - python-config
probably recorded and is passing internal debug build flags.
➜ ~ python-config --includes
-I/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/include/python2.7
➜ ~ python-config --libs
-ldl -framework CoreFoundation -lpython2.7
➜ ~ python-config --cflags
-I/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
➜ ~ python-config --ldflags
-L/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7
@jacknagel Thanks for the clarification. I won't fret too much over that part then, and I'll rename the issue to reflect the build error.
Oh, sorry - could you redo the python-config
outputs with /usr/bin/python-config
? You have a Homebrew python first in your PATH but that's not what mercurial was building against.
Oh sure.
➜ ~ /usr/bin/python-config --includes
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
➜ ~ /usr/bin/python-config --libs
-ldl -framework CoreFoundation -lpython2.7
➜ ~ /usr/bin/python-config --cflags
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.Internal.sdk/System/Library/PrivateFrameworks -framework CrashReporterSupport -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE
➜ ~ /usr/bin/python-config --ldflags
-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -ldl -framework CoreFoundation -lpython2.7
Yep, the bad flags are coming from --cflags
.
Since Apple mentions this as a known issue, I'd expect it to be fixed in the next preview build.
Can we fold this and any others with the same root cause into a single issue? Maybe just track it in the 10.10 thread?
@mistydemeo Thanks! I'll just build it against the Homebrew-supplied Python for now then. Should tie me over till Apple ship a fix.
@jacknagel Yeah, I'll close this and link back to it in my big 10.10 thread.
@DomT4 I have not been able to build against my brew install python
(2.7). brew install mercurial
is using the system python even though which python
returns /usr/local/bin/python
. Can you share your steps/recipe?
I have the same problem. Please share your solution :)
Oh, the way Homebrew works is that even if something is ahead of an alternative in your $PATH
Homebrew won't touch any other formula installed via Homebrew unless there's a specific dependency added.
Depending on whether you prefer Vim or Nano, you can either do brew edit mercurial
and then add depends_on 'python'
before def install
or you can do nano /usr/local/library/formula/mercurial.rb
and make the same change.
brew install mercurial is using the system python even though which python returns /usr/local/bin/python
This is intentional. pip install
it instead if you wish to use it that way.
Ugh, This problem is back. I wonder if DP7 of Yosemite caused this issue, because Homebrew was working swimmingly prior to the update. Anyone else on 10.9 or 10.10 DP7 seeing this issue, or has my local setup screwed itself up again for some reason?