Opened 12 years ago
Closed 11 years ago
#39195 closed defect (fixed)
py27-pyaudio @0.2.7 doesn't see portaudio.h during build
Reported by: | posita (Matt Bogosian) | Owned by: | Jakker (Jaap Akkerhuis) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.3 |
Keywords: | snowleopard | Cc: | |
Port: | py-pyaudio |
Description
Log file attached. Failure at:
:info:build /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -DMACOSX=1 -I/Users/matt/Library/Frameworks/Python.fr\ amework/Versions/2.7/include/python2.7 -c src/_portaudiomodule.c -o build/temp.macosx-10.6-x86_64-2.7/src/_portaudiomodule.o -fno-strict-aliasi\ ng :info:build src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found :info:build #include "portaudio.h" :info:build ^ :info:build 1 error generated. :info:build error: command '/usr/bin/clang' failed with exit status 1 :info:build Command failed: cd "/__PATH__/var/macports/build/___PATH___var_macports_sources_rsync.macports.org_release_tarballs_ports_python_p\ y-pyaudio/py27-pyaudio/work/pyaudio-0.2.7" && /Users/matt/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg\ build
But portaudio is installed:
% ls __PATH__/include/portaudio.h __PATH__/include/portaudio.h % port provides __PATH__/include/portaudio.h __PATH__/include/portaudio.h is provided by: portaudio
Attachments (2)
Change History (25)
comment:1 Changed 12 years ago by mf2k (Frank Schima)
Cc: | jaap@… removed |
---|---|
Owner: | changed from macports-tickets@… to jaap@… |
Port: | py-pyaudio added |
comment:3 Changed 12 years ago by larryv (Lawrence Velázquez)
What version of /usr/bin/clang
do you have? It might be too old to pick up CPATH, which means that the build would have to explicitly add an -I
argument to search MacPorts’ include directory.
comment:4 Changed 12 years ago by posita (Matt Bogosian)
I have Snow Leopard (10.6.8) with Xcode 4.2 (the highest available version for that platform).
% /usr/bin/clang --version Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) Target: x86_64-apple-darwin10.8.0
comment:5 Changed 12 years ago by Jakker (Jaap Akkerhuis)
I cannot reproduce this on my slightly newer Mac (10.8.3) with
/usr/bin/clang --version Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) Target: x86_64-apple-darwin12.3.0 Thread model: posix
I've just found older machine on which I will try to reproduce the problem and I will get back when I have result.
comment:6 follow-up: 13 Changed 12 years ago by Jakker (Jaap Akkerhuis)
Xcode 4.2 for Snow Leopard doesn't seem to be freely available anymore, the latest I could find was Xcode 3.6.2 which has
/usr/bin/clang --version Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn) Target: x86_64-apple-darwin10 Thread model: posix
and it seems to work fine.
However, I don't think that the problem has anything to do with the version of Xcode. It is related to your earlier ticket #39175. If you look closely to the error log, you'll notice that the 'cd' into the work directory doesn't work. So I suggest to update the port and try again.
comment:7 Changed 12 years ago by posita (Matt Bogosian)
Even with the fix for #39175, clang is still broken with 10.6.8 and Xcode 4.2 (see log attached). Xcode 4.2 for Snow Leopard is harder to find than most other versions (see this explanation as to why this anomaly exists). This may not provide much motivation to fix this issue, but (again) Xcode 4.2 is the highest and most recent version of Xcode that is installable in Snow Leopard.
FYI, here is a work-around that gets the job done:
% port install py27-pyaudio configure.compiler=llvm-gcc-4.2
Changed 12 years ago by posita (Matt Bogosian)
Attachment: | py27-pyaudio_main.log added |
---|
build log (after #39175 was fixed)
comment:9 follow-ups: 10 19 Changed 12 years ago by posita (Matt Bogosian)
Is there a way to create a conditional build dependency based on the environment? I.E., to use the llvm/gcc ports instead of Xcode for environments where Xcode's are known to be broken? Or is that beyond the scope of any particular port?
Had I not had the llvw/gcc ports installed, it appears Xcode 4.2 would still require a "-I PATH/include"....
comment:10 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to mtb19@…:
Is there a way to create a conditional build dependency based on the environment? I.E., to use the llvm/gcc ports instead of Xcode for environments where Xcode's are known to be broken? Or is that beyond the scope of any particular port?
There’s a blacklisting mechanism by which ports can prevent certain compilers from being used, but we greatly prefer that ports be fixed to work with Clang, since LLVM is the future of compiling on OS X. Additionally, ports that want to use MacPorts-provided compilers have to declare those dependencies explicitly; the functionality to automatically depend on compiler ports hasn’t made it out of Subversion trunk yet.
comment:11 Changed 12 years ago by larryv (Lawrence Velázquez)
:debug:build Executing command line: cd "/__PATH__/var/macports/build/___PATH___var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyaudio/py27-pyaudio/work/PyAudio-0.2.7" && /Users/matt/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build
:info:build /usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -DMACOSX=1 -I/Users/matt/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/_portaudiomodule.c -o build/temp.macosx-10.6-x86_64-2.7/src/_portaudiomodule.o -fno-strict-aliasing :info:build src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
Why is the installation process using ~matt/Library/Frameworks/Python.framework/Versions/2.7
? Are you using ~matt
as your MacPorts prefix?
comment:12 follow-up: 17 Changed 12 years ago by posita (Matt Bogosian)
It's a non-root local user install which uses "${HOME}/Applications/MacPorts" and "${HOME}/Library" for Mac-specific prefixes.
It sounds like given the rarity of Xcode 4.2 on Snow Leopard, and the state of compiler selection in MacPorts, that this should probably be closed as WONTFIX or NOTOURBUG or equivalent, especially with the work-around described above. At least unfortunate users like myself will have a relatively painless way to get around our own tools.... ;o)
comment:13 follow-up: 18 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to jaap@…:
Xcode 4.2 for Snow Leopard doesn't seem to be freely available anymore, the latest I could find was Xcode 3.6.2 which has
/usr/bin/clang --version Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn) Target: x86_64-apple-darwin10 Thread model: posixand it seems to work fine.
Is that the compiler being used for the build? MacPorts’ default compiler for Xcode 3.6 is gcc-4.2. Can you check the first line of debug output for the configure phase? It should say something like this:
:debug:configure Using compiler 'Mac OS X Clang'
comment:14 follow-up: 15 Changed 12 years ago by posita (Matt Bogosian)
% /usr/bin/clang --version Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn) Target: x86_64-apple-darwin10.8.0 Thread model: posix
Here's the pertinent output from "port -d build py27-pyaudio":
... DEBUG: Using compiler 'Mac OS X clang' ...
Here's the pertinent output from "port -d build py27-pyaudio configure.compiler=llvm-gcc-4.2":
... DEBUG: Using compiler 'Mac OS X llvm-gcc 4.2' ...
comment:15 Changed 12 years ago by larryv (Lawrence Velázquez)
I was asking jaap. The output from your build failure already made it clear which compiler you’re using.
comment:17 Changed 12 years ago by Jakker (Jaap Akkerhuis)
Replying to mtb19@…:
It sounds like given the rarity of Xcode 4.2 on Snow Leopard, and the state of compiler selection in MacPorts, that this should probably be closed as WONTFIX or NOTOURBUG or equivalent, especially with the work-around described above. At least unfortunate users like myself will have a relatively painless way to get around our own tools.... ;o)
Yes, this seems to be too much out of the standard setup.
comment:18 Changed 12 years ago by Jakker (Jaap Akkerhuis)
Replying to larryv@…:
Replying to jaap@…:
Xcode 4.2 for Snow Leopard doesn't seem to be freely available anymore, the latest I could find was Xcode 3.6.2 which has
/usr/bin/clang --version Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn) Target: x86_64-apple-darwin10 Thread model: posixand it seems to work fine.
Is that the compiler being used for the build? MacPorts’ default compiler for Xcode 3.6 is gcc-4.2. Can you check the first line of debug output for the configure phase? It should say something like this:
:debug:configure Using compiler 'Mac OS X Clang'
No, this is not the compile ysed at the build. It is indeed gcc-4.2, see below
:notice:configure ---> Configuring py27-pyaudio :debug:configure Using compiler 'Mac OS X gcc 4.2' :debug:configure Executing org.macports.configure (py27-pyaudio)
Changed 12 years ago by larryv (Lawrence Velázquez)
Attachment: | py-pyaudio.diff added |
---|
explicitly include MacPorts include directory, for older Clang
comment:19 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to mtb19@…:
Had I not had the llvw/gcc ports installed, it appears Xcode 4.2 would still require a
-I __PATH__/include
....
Matt, could you apply this patch and try installing again, without changing the compiler?
% curl 'https://trac.macports.org/raw-attachment/ticket/39195/py-pyaudio.diff' | patch -p0 -d `port dir py-pyaudio`
comment:20 follow-up: 21 Changed 12 years ago by posita (Matt Bogosian)
Larry, that did the trick. With the patch, it builds and installs without complaint.
comment:21 follow-up: 22 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to mtb19@…:
Larry, that did the trick. With the patch, it builds and installs without complaint.
Cool. jaap, do you mind if I commit this fix?
comment:22 follow-up: 23 Changed 11 years ago by Jakker (Jaap Akkerhuis)
comment:23 Changed 11 years ago by larryv (Lawrence Velázquez)
Keywords: | snowleopard added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Committed in r106435. And that’s all she wrote.
In the future, please fill in the Port field.