-
Notifications
You must be signed in to change notification settings - Fork 64
PortAudio: Enable build on macOS/arm64 #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tested and also worked on |
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: sysprog21#76
f19cd97 to
2757b2c
Compare
|
Could you try rewriting like this? $(PORTAUDIOLIB): export LDFLAGS :=
$(PORTAUDIOLIB): portaudio/Makefile
cd $(dir $<) && ./configure --without-sndio
$(MAKE) -C $(dir $<)
... |
|
Hi @ChinYikMing , It may take more time for me to review as my testing environment encounters an unrecoverable accident. @shengwen-tw and @jserv , if you and @ChinYikMing thinks no need to test on Linux Kernel 5.15, you can just approve this PR. |
@shengwen-tw Is this command redundant? Removing it doesn't affect functionality. It performs the same action as the proposed change, which unsets |
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