I still cannot create the Portaudio library on my system, that is, OSX 10.7.5 with Xcode 4.3.2, with installed command line tools and having SDK10.6 and SDK10.7 under
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
I describe briefly (also for others who are facing the same problem) what I have done so far (following the various solutions that I found on the Internet).
1) I downloaded "Portaudio" / pa _stable_v19_20111121.tgz (latest stable release):
www.portaudio.com/download.html
2) I read the instructions for creating Portaudio here:
www.portaudio.com/docs/v19-doxydocs/compile_mac_coreaudio.html
and tried to compile from the terminal window using the proposed command:
./configure && make
This led (not so surprisingly) to a lot of errors ending in:
llvm-gcc-4.2: the error tries to execute exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: there is no such file or directory lipo: impossible open the input file: /var/folders/1_/xkp08ky561jg02zjjrpsxg940000gn/T//ccPxCTrJ.out (There is no such file or directory) make: * [src / hostapi / coreaudio / pa_mac_core.lo] Error 1
This is because "ppc" is no longer supported with OSX 10.5. In addition, the Developer folder does not exist in OSX 10.7, and everything that was in the developer folder moved to
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
3) I downloaded the patch (mac_configure_patch.txt) to fix the "configure" from:
https://www.assembla.com/spaces/portaudio/tickets/216#/activity/ticket :
and copied it to the portaudio directory and applied it by typing in a terminal:
$ patch <mac_configure_patch.txt
The confirmation message says:
configure.in patch file
So everything seems beautiful. But still Portaudio is trying to build for "ppc".
4) Now I install ARCHFLAGS, CFLAGS, LDFLAGS only for the i386 architecture for assembly (disabling universal assembly):
$ MACOSX_DEPLOYMENT_TARGET = "10.7" ARCHFLAGS = "- arch i386" CFLAGS = "- O2 -g -Wall -isysroot / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10. 7.sdk -arch i386 -mmacosx-version-min = 10.7 "LDFLAGS =" - isysroot / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.7.sd -arch i386 - mmacosx-version -min = 10.7 ". / configure --disable-mac-universal
5) Further, I found that:
A): "#include AudioToolbox.h" in ".include / pa_mac_core.h" should be REQUIRED
B): you need to remove "-wError" from the "Makefile" (not Makefile.in).
according to: http://www.fluxforge.com/blog/building-portaudio-under-os-x-107-lion
6) Now I'm trying to build (using: "sudo make"), compilation starts, but with an error:
ld: framework not found CoreAudio
collect2: ld returned 1 exit status
make: * [lib / libportaudio.la] Error 1
7) So, I'm trying to point to the framework using "-F / System / Library / Frameworks -framework CoreAudio"
leading to the following terminal command:
$ MACOSX_DEPLOYMENT_TARGET = "10.7" ARCHFLAGS = "- arch i386" CFLAGS = "- O2 -g -Wall -isysroot / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10. 7.sdk -arch i386 -mmacosx-version-min = 10.7 "LDFLAGS =" - isysroot / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.7.sd -arch i386 - mmacosx-version -min = 10.7 -F / System / Library / Frameworks -framework CoreAudio ". / configure --disable-mac-universal
which apparently fixes the CoreAudio kernel problem, but leads to another error:
ld: library not found for -lSystem
collect2: ld returned 1 exit status
make: * [lib / libportaudio.la] Error 1
I'm stuck now. Has anyone experienced the same problems when trying to build Portaudio on OSX 10.7 using SDK10.6 or SDK10.7. Has anyone found a solution on how to build Portaudio from a terminal? I am very grateful for any tips !!! Thanks in advance!