Rack: libportaudio fails compilation with XCode 9

Created on 26 Sep 2017  路  15Comments  路  Source: VCVRack/Rack

OS (if applicable): macOS 10.12.6
Version (or "dev" if compiling from source): dev

Dependencies are almost compiling on my machine. XCode 9 comes with the 10.13 SDK now, so libportaudio is failing with a missing SDK error:

checking size of short... 2
checking size of int... 4
checking size of long... 8
checking for clock_gettime in -lrt... no
checking for clock_gettime... yes
checking for nanosleep... yes
configure: error: Could not find 10.5 to 10.12 SDK.
make: * [lib/libportaudio.dylib] Error 64

build system

Most helpful comment

may be you can try './configure --disable-mac-universal && make'

All 15 comments

I'll have to complain upstream in the portaudio project.

Yeah, I went over to the binary page to update my local makefile with something newer... last release was 2016. I'll see if I can find a faster workaround in the meantime, like symlinking my Homebrew binaries to the dependency folder.

As a heads-up to anyone else facing this problem, simply dropping the 10.12 SDK from https://github.com/phracker/MacOSX-SDKs into the correct XCode folder fixed this. It is a good workaround until it is fixed on portaudio's end. I didn't need to modify the plist or makefile after copying the SDK.

Ran into this problem today. As a temporary workaround, the following worked for me in order to compile against the latest SDK:

  1. run make dep, this downloads the portaudio tarball and extracts it.
  2. edit dep/Makefile and comment out these lines to avoid overwriting the changes you'll make to the portaudio build config:
#$(WGET) http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
#$(UNTAR) pa_stable_v190600_20161030.tgz
  1. edit dep/portaudio/configure.in and add the following lines at line 261:
elif xcodebuild -version -sdk macosx10.13 Path >/dev/null 2>&1 ; then  
    mac_version_min="-mmacosx-version-min=10.5"  
    mac_sysroot="-isysroot `xcodebuild -version -sdk macosx10.13 Path`"
  1. in dep/portaudio, run autoreconf -if && ./configure, that should generate the makefile with the correct SDK
  2. run make dep again from the rack root directory

Running into this error too. I wanted to understand something about this project and try to contribute, but I can't make deps :(

Can you guys successfully compile the nightly at http://portaudio.com/archives/pa_snapshot.tgz ?

@AndrewBelt nope, configure: error: Could not find 10.5 to 10.12 SDK.

Here the full output:

$ ./configure
checking build system type... x86_64-apple-darwin16.7.0
checking host system type... x86_64-apple-darwin16.7.0
checking target system type... x86_64-apple-darwin16.7.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin16.7.0 file names to x86_64-apple-darwin16.7.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin16.7.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin16.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ar... /usr/bin/ar
checking whether byte ordering is bigendian... no
checking for snd_pcm_open in -lasound... no
checking for HPI_SubSysCreate in -lhpi... no
checking sys/soundcard.h usability... no
checking sys/soundcard.h presence... no
checking for sys/soundcard.h... no
checking linux/soundcard.h usability... no
checking linux/soundcard.h presence... no
checking for linux/soundcard.h... no
checking machine/soundcard.h usability... no
checking machine/soundcard.h presence... no
checking for machine/soundcard.h... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for JACK... no
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking for clock_gettime in -lrt... no
checking for clock_gettime... yes
checking for nanosleep... yes
configure: error: Could not find 10.5 to 10.12 SDK.

Okay, thanks. I'll send an email to their mailing list. Hopefully someone will bump the version in their build system up to 10.13, if no changes to the MacOS 10.13 SDK break compilation.

may be you can try './configure --disable-mac-universal && make'

bump this issue, any updates?

portaudio is no longer used, so this issue is obsolete.

may be you can try './configure --disable-mac-universal && make'

Thanks, it worked for me.

may be you can try './configure --disable-mac-universal && make'

Thanks.

may be you can try './configure --disable-mac-universal && make'

It may not be used any more but this is the first page that comes up when you try to build portaudio and google the error. This solution is the least intrusive that I see and worked here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaffasplaffa picture jaffasplaffa  路  7Comments

ShofB picture ShofB  路  4Comments

ryan-allen picture ryan-allen  路  5Comments

LazyPike picture LazyPike  路  6Comments

gogobanziibaby picture gogobanziibaby  路  4Comments