Skip to content
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

macOS 13 build failure: Undefined symbols for architecture x86_64: "std::exception_ptr::__from_native_exception_pointer(void*)" #526

Open
barracuda156 opened this issue Sep 15, 2024 · 2 comments

Comments

@barracuda156
Copy link
Contributor

This fails specifically on macOS 13:

  [  9%] Linking CXX shared library liblmscore.dylib
  cd /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_audio_lms/lms/work/build/src/libs/core && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/lmscore.dir/link.txt --verbose=ON
  /opt/local/bin/clang++-mp-18 -pipe -I/opt/local/libexec/boost/1.81/include -Os -DNDEBUG -I/opt/local/libexec/boost/1.81/include -I/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -mmacosx-version-min=13.0 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/libexec/boost/1.81/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -o liblmscore.dylib -install_name @rpath/liblmscore.dylib CMakeFiles/lmscore.dir/impl/http/Client.cpp.o CMakeFiles/lmscore.dir/impl/http/SendQueue.cpp.o CMakeFiles/lmscore.dir/impl/ArchiveZipper.cpp.o CMakeFiles/lmscore.dir/impl/ChildProcess.cpp.o CMakeFiles/lmscore.dir/impl/ChildProcessManager.cpp.o CMakeFiles/lmscore.dir/impl/Config.cpp.o CMakeFiles/lmscore.dir/impl/FileResourceHandler.cpp.o CMakeFiles/lmscore.dir/impl/IOContextRunner.cpp.o CMakeFiles/lmscore.dir/impl/Logger.cpp.o CMakeFiles/lmscore.dir/impl/NetAddress.cpp.o CMakeFiles/lmscore.dir/impl/Path.cpp.o CMakeFiles/lmscore.dir/impl/Random.cpp.o CMakeFiles/lmscore.dir/impl/RecursiveSharedMutex.cpp.o CMakeFiles/lmscore.dir/impl/StreamLogger.cpp.o CMakeFiles/lmscore.dir/impl/String.cpp.o CMakeFiles/lmscore.dir/impl/TraceLogger.cpp.o CMakeFiles/lmscore.dir/impl/UUID.cpp.o CMakeFiles/lmscore.dir/impl/WtLogger.cpp.o  -Wl,-rpath,/opt/local/lib /opt/local/libexec/boost/1.81/lib/libboost_system-mt.dylib /opt/local/lib/libwt.4.10.4.dylib /opt/local/lib/libconfig++.dylib /opt/local/lib/libarchive.dylib /opt/local/libexec/boost/1.81/lib/libboost_thread-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_chrono-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_atomic-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_filesystem-mt.dylib
  Undefined symbols for architecture x86_64:
    "std::exception_ptr::__from_native_exception_pointer(void*)", referenced from:
        std::exception_ptr std::make_exception_ptr[abi:ne180100]<boost::asio::multiple_exceptions>(boost::asio::multiple_exceptions) in SendQueue.cpp.o
        std::exception_ptr std::make_exception_ptr[abi:ne180100]<boost::asio::multiple_exceptions>(boost::asio::multiple_exceptions) in ChildProcess.cpp.o
    "___cxa_init_primary_exception", referenced from:
        std::exception_ptr std::make_exception_ptr[abi:ne180100]<boost::asio::multiple_exceptions>(boost::asio::multiple_exceptions) in SendQueue.cpp.o
        std::exception_ptr std::make_exception_ptr[abi:ne180100]<boost::asio::multiple_exceptions>(boost::asio::multiple_exceptions) in ChildProcess.cpp.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]: *** [src/libs/core/liblmscore.dylib] Error 1

Both macOS 14 and macOS 12 CI pass normally.

Build log: https://github.com/macports/macports-ports/actions/runs/10869345322/job/30160418556

@epoupon
Copy link
Owner

epoupon commented Sep 15, 2024

Hmm looks like a header/linked lib mismatch for libc++
macOS 13 is using clang18? What about macOS 12/14?

@barracuda156
Copy link
Contributor Author

barracuda156 commented Sep 15, 2024

Hmm looks like a header/linked lib mismatch for libc++ macOS 13 is using clang18? What about macOS 12/14?

Ok, macOS 12 uses Clang 17.0.6 and macOS 14 uses AppleClang 15.0.0.15000309.
For now, I can just disable using Clang 18, then it should fall back to Clang 17, and hopefully the build works.

But that is really a suboptimal solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants