PortAudio: Enable build on macOS/arm64 #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Quote from portaudio/config.log:
...
configure:3194: checking whether the C compiler works
configure:3216: gcc -I/opt/homebrew/opt/zlib/include portaudio/lib/.libs/libportaudio.a -framework CoreServices -framework CoreFoundation -framework AudioUnit -framewo rk AudioToolbox -framework CoreAudio -lpthread -lm mini-gdbstub/build/libgdbstub.a conftest.c >&5
clang: error: no such file or directory: 'portaudio/lib/.libs/libportaudio.a'
...
configure:3265: error: C compiler cannot create executables
...
The ./configure script fails on macOS because LDFLAGS includes static libraries (libportaudio.a) that have not yet been built. This causes the compiler check to fail with "C compiler cannot create executables".
This patch unsets LDFLAGS during the configure step to allow the test program to compile and link successfully, enabling builds on macOS.
Related: #76
Environment
OS: macOS/arm64 Version 15.3.1 (Darwin 24.3.0 Darwin Kernel Version 24.3.0)
Compiler: Apple clang version 16.0.0 (clang-1600.0.26.6)
Reproduce
Expected error