PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.51k stars 308 forks source link

2 errors with make command after modified configure from the problem "configure sdks not found with new Xcode 7.0 update & Command Line Tools (OS X 10.10)" #241

Closed PortAudio-admin closed 4 years ago

PortAudio-admin commented 9 years ago

Issue created by Anonymous on Assembla

Hello

Like sdks problem related here https://www.assembla.com/wiki/show/portaudio/ReleaseNotes

i have added

          elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then
             mac_version_min="-mmacosx-version-min=10.4"
             mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.10 Path`"
          elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then
             mac_version_min="-mmacosx-version-min=10.4"
             mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.11 Path`"

in configure and configure.in

but with make command I have those 2 errors :

/bin/sh ./libtool --mode=compile gcc -c -std=c99 -O2 -Wall -pedantic -pipe -fPIC -DNDEBUG -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/unix -Werror -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.4 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_NANOSLEEP=1 -DPA_USE_COREAUDIO=1 src/hostapi/coreaudio/pa_mac_core_utilities.c -o src/hostapi/coreaudio/pa_mac_core_utilities.lo libtool: compile: gcc -c -std=c99 -O2 -Wall -pedantic -pipe -fPIC -DNDEBUG -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/unix -Werror -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.4 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_NANOSLEEP=1 -DPA_USE_COREAUDIO=1 src/hostapi/coreaudio/pa_mac_core_utilities.c -fno-common -DPIC -o src/hostapi/coreaudio/.libs/pa_mac_core_utilities.o src/hostapi/coreaudio/pa_mac_core_utilities.c:152:10: error: 'kAudioUnitErr_IllegalInstrument' is deprecated [-Werror,-Wdeprecated-declarations] case kAudioUnitErr_IllegalInstrument: ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AUComponent.h:1633:2: note: 'kAudioUnitErr_IllegalInstrument' has been explicitly marked deprecated here kAudioUnitErr_IllegalInstrument = -10873, ^ src/hostapi/coreaudio/pa_mac_core_utilities.c:155:10: error: 'kAudioUnitErr_InstrumentTypeNotFound' is deprecated [-Werror,-Wdeprecated-declarations] case kAudioUnitErr_InstrumentTypeNotFound: ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AUComponent.h:1634:2: note: 'kAudioUnitErr_InstrumentTypeNotFound' has been explicitly marked deprecated here kAudioUnitErr_InstrumentTypeNotFound = -10872, ^ 2 errors generated. make: *** [src/hostapi/coreaudio/pa_mac_core_utilities.lo] Error 1

Hello I have modified the configure and configure.ini by adding elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then mac_version_min="-mmacosx-version-min=10.4" mac_sysroot="-isysroot xcodebuild -version -sdk macosx10.10 Path" elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then mac_version_min="-mmacosx-version-min=10.4" mac_sysroot="-isysroot xcodebuild -version -sdk macosx10.11 Path"

but when i do sudo make i have those 2 errors :

/bin/sh ./libtool --mode=compile gcc -c -std=c99 -O2 -Wall -pedantic -pipe -fPIC -DNDEBUG -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/unix -Werror -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.4 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_NANOSLEEP=1 -DPA_USE_COREAUDIO=1 src/hostapi/coreaudio/pa_mac_core_utilities.c -o src/hostapi/coreaudio/pa_mac_core_utilities.lo libtool: compile: gcc -c -std=c99 -O2 -Wall -pedantic -pipe -fPIC -DNDEBUG -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/unix -Werror -arch i386 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.4 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_NANOSLEEP=1 -DPA_USE_COREAUDIO=1 src/hostapi/coreaudio/pa_mac_core_utilities.c -fno-common -DPIC -o src/hostapi/coreaudio/.libs/pa_mac_core_utilities.o src/hostapi/coreaudio/pa_mac_core_utilities.c:152:10: error: 'kAudioUnitErr_IllegalInstrument' is deprecated [-Werror,-Wdeprecated-declarations] case kAudioUnitErr_IllegalInstrument: ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AUComponent.h:1633:2: note: 'kAudioUnitErr_IllegalInstrument' has been explicitly marked deprecated here kAudioUnitErr_IllegalInstrument = -10873, ^ src/hostapi/coreaudio/pa_mac_core_utilities.c:155:10: error: 'kAudioUnitErr_InstrumentTypeNotFound' is deprecated [-Werror,-Wdeprecated-declarations] case kAudioUnitErr_InstrumentTypeNotFound: ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AUComponent.h:1634:2: note: 'kAudioUnitErr_InstrumentTypeNotFound' has been explicitly marked deprecated here kAudioUnitErr_InstrumentTypeNotFound = -10872, ^ 2 errors generated. make: *** [src/hostapi/coreaudio/pa_mac_core_utilities.lo] Error 1

Can you help me please ?

PortAudio-admin commented 9 years ago

Comment by Anonymous on Assembla

That's ok for 240 & 241 to configure make and install portaudio in /usr/local/lib


Downloaded portaudio snapshot


add elif xcodebuild -version -sdk macosx10.10 Path >/dev/null 2>&1 ; then mac_version_min="-mmacosx-version-min=10.4" mac_sysroot="-isysroot xcodebuild -version -sdk macosx10.10 Path" elif xcodebuild -version -sdk macosx10.11 Path >/dev/null 2>&1 ; then mac_version_min="-mmacosx-version-min=10.4" mac_sysroot="-isysroot xcodebuild -version -sdk macosx10.11 Path"

in configure and configure.in

According to https://www.assembla.com/wiki/show/portaudio/ReleaseNotes


replace CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Werror"

by CFLAGS="$CFLAGS -I\$(top_srcdir)/src/os/unix -Wall"

in configure

According to http://stackoverflow.com/questions/13214534/port-audio-wont-install-due-to-deprecated-core-audio-functions "... f updating to the latest PortAudio SVN doesn't fix the issue, this is the suggestion from the mailing list: Remove -Werror from the build script and replace it with -Wall Or try adding -Wno-deprecated before -Werror If you do try adding -Wno-deprecated please let us know how you go since this is currently the preferred option, although it hasn't been tested much yet. By "build script" they mean configure.in, I believe. ... "

sudo chmod -R 755 portaudio_snapshot/


cd portaudio_snapshot

./configure

make

sudo make install

ls -l /usr/local/lib/portaudio

you'll see

-rwxr-xr-x 1 root admin 183816 23 sep 07:53 /usr/local/lib/libportaudio.2.dylib -rw-r--r-- 1 root admin 223032 23 sep 07:53 /usr/local/lib/libportaudio.a lrwxr-xr-x 1 root admin 20 23 sep 07:53 /usr/local/lib/libportaudio.dylib -> libportaudio.2.dylib -rwxr-xr-x 1 root admin 1042 23 sep 07:53 /usr/local/lib/libportaudio.la

ls -l /usr/local/include/portaudio

you'll see

-rw-r--r-- 1 root admin 47194 23 sep 07:53 /usr/local/include/portaudio.h

Good luck

philburk commented 4 years ago

This bug was from 2015. I tried with the current build and am not seeing this error. Closing as obsolete.