Opened 6 months ago
Last modified 6 months ago
#71481 assigned defect
portaudio @20240308-88ab584e +universal Undefined symbols for architecture x86_64
Reported by: | adamscott (Adam Scott) | Owned by: | ra1nb0w |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.5 |
Keywords: | sequoia | Cc: | |
Port: | portaudio |
Description
Here's the failing make log. (Building from a M3 MacBook Pro, running on macOS 15)
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf' if test -n " bindings/cpp" ; then for dir in " bindings/cpp"; do /Applications/Xcode.app/Contents/Developer/usr/bin/make -C $dir all; done ; fi make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp' Making all in lib make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/lib' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/lib' Making all in include make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/include' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/include' Making all in bin make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/bin' /bin/sh ../libtool --tag=CXX --mode=link /usr/bin/clang++ -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -arch x86_64 -o devs devs.o ../lib/libportaudiocpp.la ../../../lib/libportaudio.la libtool: link: /usr/bin/clang++ -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -arch arm64 -arch x86_64 -o .libs/devs devs.o -Wl,-bind_at_load -L/opt/local/lib ../lib/.libs/libportaudiocpp.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/lib/.libs/libportaudio.dylib ../../../lib/.libs/libportaudio.dylib -framework CoreServices -framework CoreFoundation -framework AudioUnit -framework AudioToolbox -framework CoreAudio ld: warning: -bind_at_load is deprecated on macOS ld: warning: -bind_at_load is deprecated on macOS Undefined symbols for architecture x86_64: "portaudio::StreamParameters::StreamParameters(portaudio::DirectionSpecificStreamParameters const&, portaudio::DirectionSpecificStreamParameters const&, double, unsigned long, unsigned long)", referenced from: printSupportedStandardSampleRates(portaudio::DirectionSpecificStreamParameters const&, portaudio::DirectionSpecificStreamParameters const&) in devs.o "portaudio::DirectionSpecificStreamParameters::null()", referenced from: _main in devs.o _main in devs.o "portaudio::DirectionSpecificStreamParameters::DirectionSpecificStreamParameters(portaudio::Device const&, int, portaudio::SampleDataFormat, bool, double, void*)", referenced from: _main in devs.o _main in devs.o "portaudio::Device::hostApi()", referenced from: _main in devs.o _main in devs.o _main in devs.o "portaudio::System::devicesEnd()", referenced from: _main in devs.o "portaudio::System::initialize()", referenced from: _main in devs.o "portaudio::System::deviceCount()", referenced from: _main in devs.o "portaudio::System::versionText()", referenced from: _main in devs.o "portaudio::System::devicesBegin()", referenced from: _main in devs.o "portaudio::System::DeviceIterator::operator++()", referenced from: _main in devs.o "portaudio::System::exists()", referenced from: _main in devs.o _main in devs.o "portaudio::System::version()", referenced from: _main in devs.o "portaudio::System::instance()", referenced from: _main in devs.o "portaudio::System::terminate()", referenced from: _main in devs.o _main in devs.o "portaudio::PaException::paErrorText() const", referenced from: _main in devs.o "portaudio::StreamParameters::isSupported() const", referenced from: printSupportedStandardSampleRates(portaudio::DirectionSpecificStreamParameters const&, portaudio::DirectionSpecificStreamParameters const&) in devs.o "portaudio::DirectionSpecificStreamParameters::numChannels() const", referenced from: _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o ... "portaudio::Device::maxInputChannels() const", referenced from: _main in devs.o _main in devs.o "portaudio::Device::defaultSampleRate() const", referenced from: _main in devs.o "portaudio::Device::maxOutputChannels() const", referenced from: _main in devs.o _main in devs.o "portaudio::Device::defaultLowInputLatency() const", referenced from: _main in devs.o "portaudio::Device::defaultHighInputLatency() const", referenced from: _main in devs.o "portaudio::Device::defaultLowOutputLatency() const", referenced from: _main in devs.o "portaudio::Device::defaultHighOutputLatency() const", referenced from: _main in devs.o "portaudio::Device::isSystemDefaultInputDevice() const", referenced from: _main in devs.o "portaudio::Device::isHostApiDefaultInputDevice() const", referenced from: _main in devs.o "portaudio::Device::isSystemDefaultOutputDevice() const", referenced from: _main in devs.o "portaudio::Device::isHostApiDefaultOutputDevice() const", referenced from: _main in devs.o "portaudio::Device::name() const", referenced from: _main in devs.o "portaudio::Device::index() const", referenced from: _main in devs.o "portaudio::System::DeviceIterator::operator*() const", referenced from: _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o _main in devs.o ... "portaudio::System::DeviceIterator::operator!=(portaudio::System::DeviceIterator const&) const", referenced from: _main in devs.o "portaudio::HostApi::name() const", referenced from: _main in devs.o _main in devs.o _main in devs.o "typeinfo for portaudio::PaException", referenced from: GCC_except_table2 in devs.o "typeinfo for portaudio::PaCppException", referenced from: GCC_except_table2 in devs.o ld: symbol(s) not found for architecture x86_64 clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [devs] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/bin' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp' make: *** [all-recursive] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf'
Attachments (3)
Change History (19)
comment:1 Changed 6 months ago by jmroot (Joshua Root)
Owner: | set to ra1nb0w |
---|---|
Status: | new → assigned |
comment:2 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)
Changed 6 months ago by adamscott (Adam Scott)
comment:3 Changed 6 months ago by adamscott (Adam Scott)
Is there a way to know why it fails? Is this something that I set locally?
Changed 6 months ago by adamscott (Adam Scott)
Attachment: | main_from-clean-install.log added |
---|
comment:4 Changed 6 months ago by adamscott (Adam Scott)
I created a fresh macOS Sequoia virtual machine where I just installed the latest XCode and MacPorts. I got the same error, you'll be able to see this in the main_from-clean-install.log
file I attached.
comment:5 Changed 6 months ago by kencu (Ken)
thd proximate cause for the link not finding the x86_64 symbols is that the library is not fat:
:info:build ld: warning: ignoring file '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/lib/.libs/libportaudiocpp.0.dylib-master.o': found architecture 'arm64', required architecture 'x86_64'
the reason the library is not fat is the next thing to sort out.
comment:6 Changed 6 months ago by kencu (Ken)
my guess is that this somewhat weird-looking link step doesn't have any arch flags in it, so defaults to the primary arch only:
:info:build libtool: link: /usr/bin/clang++ -r -keep_private_externs -nostdlib -o .libs/libportaudiocpp.0.dylib-master.o .libs/BlockingStream.o .libs/CallbackInterface.o .libs/CallbackStream.o .libs/CFunCallbackStream.o .libs/CppFunCallbackStream.o .libs/Device.o .libs/DirectionSpecificStreamParameters.o .libs/Exception.o .libs/HostApi.o .libs/InterfaceCallbackStream.o .libs/MemFunCallbackStream.o .libs/Stream.o .libs/StreamParameters.o .libs/System.o .libs/SystemDeviceIterator.o .libs/SystemHostApiIterator.o
comment:7 Changed 6 months ago by kencu (Ken)
you'd have to examine those objects in the build folder to see if they really are fat objects -- and if they are, try running that step manually with the added arch flags perhaps.
Of course, if it can't be sorted out, the fallback is the muniversal portgroup.
comment:8 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | sequoia added |
---|
I can't reproduce this on macOS 12. Either with the +universal variant or without, all clang invocations use -arch
flags. The weird link line in this log that uses -nostdlib
does not occur in my build.
This probably only affects Xcode 15 and later due to https://savannah.gnu.org/support/?110937
We probably need to patch or autoreconf, although the project also includes an aclocal.m4 that might contain the bad code that needs to be patched.
I filed https://github.com/PortAudio/portaudio/issues/994 to request the portaudio developers update their autotools.
comment:9 Changed 6 months ago by adamscott (Adam Scott)
you'd have to examine those objects in the build folder to see if they really are fat objects -- and if they are, try running that step manually with the added arch flags perhaps.
Only .libs/libportaudiocpp.0.dylib-master.o
seems to be arm64 only.
❯ file .libs/libportaudiocpp.0.dylib-master.o .libs/BlockingStream.o .libs/CallbackInterface.o .libs/CallbackStream.o .libs/CFunCallbackStream.o .libs/CppFunCallbackStream.o .libs/Device.o .libs/DirectionSpecificStreamParameters.o .libs/Exception.o .libs/HostApi.o .libs/InterfaceCallbackStream.o .libs/MemFunCallbackStream.o .libs/Stream.o .libs/StreamParameters.o .libs/System.o .libs/SystemDeviceIterator.o .libs/SystemHostApiIterator.o .libs/libportaudiocpp.0.dylib-master.o: Mach-O 64-bit object arm64 .libs/BlockingStream.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/BlockingStream.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/BlockingStream.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/CallbackInterface.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/CallbackInterface.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/CallbackInterface.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/CallbackStream.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/CallbackStream.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/CallbackStream.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/CFunCallbackStream.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/CFunCallbackStream.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/CFunCallbackStream.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/CppFunCallbackStream.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/CppFunCallbackStream.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/CppFunCallbackStream.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/Device.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/Device.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/Device.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/DirectionSpecificStreamParameters.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/DirectionSpecificStreamParameters.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/DirectionSpecificStreamParameters.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/Exception.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/Exception.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/Exception.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/HostApi.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/HostApi.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/HostApi.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/InterfaceCallbackStream.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/InterfaceCallbackStream.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/InterfaceCallbackStream.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/MemFunCallbackStream.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/MemFunCallbackStream.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/MemFunCallbackStream.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/Stream.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/Stream.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/Stream.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/StreamParameters.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/StreamParameters.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/StreamParameters.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/System.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/System.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/System.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/SystemDeviceIterator.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/SystemDeviceIterator.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/SystemDeviceIterator.o (for architecture arm64): Mach-O 64-bit object arm64 .libs/SystemHostApiIterator.o: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit object x86_64] [arm64:Mach-O 64-bit object arm64] .libs/SystemHostApiIterator.o (for architecture x86_64): Mach-O 64-bit object x86_64 .libs/SystemHostApiIterator.o (for architecture arm64): Mach-O 64-bit object arm64
It seems that .libs/libportaudiocpp.0.dylib-master.o
is related to libportaudiocpp.la
in this build line:
:info:build /bin/sh ../libtool --tag=CXX --mode=link /usr/bin/clang++ -pipe -Os -stdlib=libc++ -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk -arch arm64 -arch x86_64 -version-info 0:12:0 -no-undefined -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk -arch arm64 -arch x86_64 -o libportaudiocpp.la -rpath /opt/local/lib BlockingStream.lo CallbackInterface.lo CallbackStream.lo CFunCallbackStream.lo CppFunCallbackStream.lo Device.lo DirectionSpecificStreamParameters.lo Exception.lo HostApi.lo InterfaceCallbackStream.lo MemFunCallbackStream.lo Stream.lo StreamParameters.lo System.lo SystemDeviceIterator.lo SystemHostApiIterator.lo ../../../lib/libportaudio.la
Here's the content of libportaudiocpp.la
:
# libportaudiocpp.la - a libtool library file # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='libportaudiocpp.0.dylib' # Names of this library. library_names='libportaudiocpp.0.dylib libportaudiocpp.dylib' # The name of the static archive. old_library='libportaudiocpp.a' # Linker flags that can not go in dependency_libs. inherited_linker_flags=' -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices' # Libraries that this one depends upon. dependency_libs=' -L/opt/local/lib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/lib/libportaudio.la' # Names of additional weak libraries provided by this library weak_library_names='' # Version information for libportaudiocpp. current=0 age=0 revision=12 # Is this an already installed library? installed=no # Should we warn about portability when linking against -modules? shouldnotlink=no # Files to dlopen/dlpreopen dlopen='' dlpreopen='' # Directory that this library needs to be installed in: libdir='/opt/local/lib' relink_command=""
comment:10 Changed 6 months ago by adamscott (Adam Scott)
I found where it fails, when creating .libs/libportaudiocpp.0.dylib
and .libs/libportaudiocpp.0.dylib-master.o
. It's even said verbatim in the log.
:info:build libtool: link: /usr/bin/clang++ -dynamiclib -o .libs/libportaudiocpp.0.dylib .libs/libportaudiocpp.0.dylib-master.o -L/opt/local/lib ../../../lib/.libs/libportaudio.dylib -Os -stdlib=libc++ -arch arm64 -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk -arch arm64 -arch x86_64 -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices -install_name /opt/local/lib/libportaudiocpp.0.dylib -compatibility_version 1 -current_version 1.12 :info:build ld: warning: ignoring file '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_portaudio/portaudio/work/portaudio-88ab584e7bf4358599744cd662cfbc978f41efbf/bindings/cpp/lib/.libs/libportaudiocpp.0.dylib-master.o': found architecture 'arm64', required architecture 'x86_64'
I was curious about ../../../lib/.libs/libportaudio.dylib
and I tested file
against it. It seems alright.
❯ file ../../../lib/.libs/libportaudio.dylib ../../../lib/.libs/libportaudio.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64:Mach-O 64-bit dynamically linked shared library arm64] ../../../lib/.libs/libportaudio.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 ../../../lib/.libs/libportaudio.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
comment:11 Changed 6 months ago by adamscott (Adam Scott)
I did try clang++ -v
to the command that fails and here's the ld
that is returning the warning:
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -dylib -dylib_compatibility_version 1 -dylib_current_version 1.12 -arch x86_64 -dylib_install_name /opt/local/lib/libportaudiocpp.0.dylib -platform_version macos 15.0.0 15.2 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Os -mllvm -enable-linkonceodr-outlining -o /var/folders/68/jzztkd794zn93hqll8l7lryw0000gn/T/libportaudiocpp-2a60ae/libportaudiocpp-x86_64.out -L/opt/local/lib .libs/libportaudiocpp.0.dylib-master.o ../../../lib/.libs/libportaudio.dylib -headerpad_max_install_names -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.sdk -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreFoundation -framework CoreServices -arch_multiple -final_output .libs/libportaudiocpp.0.dylib -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/lib/darwin/libclang_rt.osx.a
comment:12 Changed 6 months ago by adamscott (Adam Scott)
I found where it fails, when creating .libs/libportaudiocpp.0.dylib and .libs/libportaudiocpp.0.dylib-master.o. It's even said verbatim in the log.
Oops. The culprit was one line above. See that there's no -arch in the command:
:info:build libtool: link: /usr/bin/clang++ -r -keep_private_externs -nostdlib -o .libs/libportaudiocpp.0.dylib-master.o .libs/BlockingStream.o .libs/CallbackInterface.o .libs/CallbackStream.o .libs/CFunCallbackStream.o .libs/CppFunCallbackStream.o .libs/Device.o .libs/DirectionSpecificStreamParameters.o .libs/Exception.o .libs/HostApi.o .libs/InterfaceCallbackStream.o .libs/MemFunCallbackStream.o .libs/Stream.o .libs/StreamParameters.o .libs/System.o .libs/SystemDeviceIterator.o .libs/SystemHostApiIterator.o
comment:13 Changed 6 months ago by kencu (Ken)
Well, you’re refinding exactly what I posted above…
Ryan has sorted out above that the root cause of the issue is outdated autotools.
That should be pretty simple to fix, while we wait for upstream to update theirs.
comment:14 Changed 6 months ago by adamscott (Adam Scott)
Well, you’re refinding exactly what I posted above…
Sorry, yeah.
I tried to update the autotools files on my side (on the PortAudio repo cloned on my Mac), but it didn't seem to change the culprit build commands.
I instead tried to create a local Portfile that use CMake instead. It looks like that CMake is now the current buildtool used for PortAudio. And it compiled successfully.
Here's the diff of my functioning Portfile.
Changed 6 months ago by adamscott (Adam Scott)
Attachment: | Portfile-cmake.diff added |
---|
comment:15 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)
Switching from autotools to another build system is typically fraught with peril so I like to put it off until there is no alternative (i.e. until upstream removes the autotools build system). For example, library names and versions often vary between build systems, which has an impact on all other ports using the libraries. If there is any difference in the files installed by the port before and the files installed by the port after your changes, the revision must be increased, and if the library name or version changes, all ports using the library need their revisions increased and need to be checked to ensure they still build.
Your proposal removes all the flags that told autotools what features to enable or disable. Instead of removing them, you likely need to convert them to the cmake equivalents, otherwise the port may perform undesirable autodetection of features. You've also forgotten to make corresponding changes to the jack variant.
comment:16 Changed 6 months ago by adamscott (Adam Scott)
My Portfile-cmake.diff wasn't a proposal, I'm sorry (not used to the workflow here). I just wanted to share what I did to make it work, knowing that it isn't optimal.
We had successful builds of this port on all buildbot machines. Could you attach your main.log file, please?