#67980 closed defect (fixed)
qt6-qtbase @6.4.3_1: undefined symbols "std::__1::pmr::…" when LLVM clang used
Reported by: | chrstphrchvz (Christopher Chavez) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | qt6-qtbase |
Description
[311/3727] : && /opt/local/bin/clang++-mp-16 -I/opt/local/libexec/openssl3/include -DNDEBUG -Oz -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.14 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -Wl,-dead_strip -fPIE -Xlinker -pie src/tools/tracegen/CMakeFiles/tracegen.dir/etw.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/helpers.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/lttng.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/panic.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/provider.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/qtheaders.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/tracegen.cpp.o -o libexec/tracegen src/tools/bootstrap/libBootstrap.a -framework Foundation -framework CoreServices /opt/local/lib/libpcre2-16.dylib && : FAILED: libexec/tracegen : && /opt/local/bin/clang++-mp-16 -I/opt/local/libexec/openssl3/include -DNDEBUG -Oz -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.14 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -Wl,-dead_strip -fPIE -Xlinker -pie src/tools/tracegen/CMakeFiles/tracegen.dir/etw.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/helpers.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/lttng.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/panic.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/provider.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/qtheaders.cpp.o src/tools/tracegen/CMakeFiles/tracegen.dir/tracegen.cpp.o -o libexec/tracegen src/tools/bootstrap/libBootstrap.a -framework Foundation -framework CoreServices /opt/local/lib/libpcre2-16.dylib && : Undefined symbols for architecture x86_64: "std::__1::pmr::get_default_resource()", referenced from: std::__1::pmr::monotonic_buffer_resource::monotonic_buffer_resource[abi:v160006](void*, unsigned long) in libBootstrap.a(qstringlist.cpp.o) "vtable for std::__1::pmr::monotonic_buffer_resource", referenced from: std::__1::pmr::monotonic_buffer_resource::~monotonic_buffer_resource() in libBootstrap.a(qstringlist.cpp.o) std::__1::pmr::monotonic_buffer_resource::monotonic_buffer_resource[abi:v160006](void*, unsigned long) in libBootstrap.a(qstringlist.cpp.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "std::__1::pmr::memory_resource::~memory_resource()", referenced from: std::__1::pmr::monotonic_buffer_resource::~monotonic_buffer_resource() in libBootstrap.a(qstringlist.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)
[313/3727] : && /opt/local/bin/clang++-mp-16 -I/opt/local/libexec/openssl3/include -DNDEBUG -Oz -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.14 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -Wl,-dead_strip -fPIE -Xlinker -pie src/tools/moc/CMakeFiles/moc.dir/collectjson.cpp.o src/tools/moc/CMakeFiles/moc.dir/generator.cpp.o src/tools/moc/CMakeFiles/moc.dir/main.cpp.o src/tools/moc/CMakeFiles/moc.dir/moc.cpp.o src/tools/moc/CMakeFiles/moc.dir/parser.cpp.o src/tools/moc/CMakeFiles/moc.dir/preprocessor.cpp.o src/tools/moc/CMakeFiles/moc.dir/token.cpp.o -o libexec/moc src/tools/bootstrap/libBootstrap.a -framework Foundation -framework CoreServices /opt/local/lib/libpcre2-16.dylib && : FAILED: libexec/moc : && /opt/local/bin/clang++-mp-16 -I/opt/local/libexec/openssl3/include -DNDEBUG -Oz -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.14 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -Wl,-dead_strip -fPIE -Xlinker -pie src/tools/moc/CMakeFiles/moc.dir/collectjson.cpp.o src/tools/moc/CMakeFiles/moc.dir/generator.cpp.o src/tools/moc/CMakeFiles/moc.dir/main.cpp.o src/tools/moc/CMakeFiles/moc.dir/moc.cpp.o src/tools/moc/CMakeFiles/moc.dir/parser.cpp.o src/tools/moc/CMakeFiles/moc.dir/preprocessor.cpp.o src/tools/moc/CMakeFiles/moc.dir/token.cpp.o -o libexec/moc src/tools/bootstrap/libBootstrap.a -framework Foundation -framework CoreServices /opt/local/lib/libpcre2-16.dylib && : Undefined symbols for architecture x86_64: "std::__1::pmr::get_default_resource()", referenced from: std::__1::pmr::monotonic_buffer_resource::monotonic_buffer_resource[abi:v160006](void*, unsigned long) in moc.cpp.o "vtable for std::__1::pmr::monotonic_buffer_resource", referenced from: std::__1::pmr::monotonic_buffer_resource::~monotonic_buffer_resource() in moc.cpp.o std::__1::pmr::monotonic_buffer_resource::monotonic_buffer_resource[abi:v160006](void*, unsigned long) in moc.cpp.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "std::__1::pmr::memory_resource::~memory_resource()", referenced from: std::__1::pmr::monotonic_buffer_resource::~monotonic_buffer_resource() in moc.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)
This is reproducible on macOS 12 using configure.compiler=macports-clang-16
. I would guess that qtbase is incorrectly making assumptions about availability of <memory_resource>
features in the libc++ runtime based on whether Xcode clang is used. (And it seems <memory_resource>
will only available starting with macOS 14: https://developer.apple.com/xcode/cpp/)
Change History (4)
comment:1 Changed 15 months ago by chrstphrchvz (Christopher Chavez)
comment:2 Changed 15 months ago by chrstphrchvz (Christopher Chavez)
Backporting https://github.com/qt/qtbase/commit/c70145c6bf54 does appear to fix this issue. PR opened: https://github.com/macports/macports-ports/pull/19923
comment:3 Changed 15 months ago by chrstphrchvz (Christopher Chavez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 14 months ago by chrstphrchvz (Christopher Chavez)
Note: See
TracTickets for help on using
tickets.
Someone else reported this issue upstream: https://bugreports.qt.io/browse/QTBUG-112335
Due to a related problem building with the macOS 14 SDK (from Xcode 15) and then running on macOS 13 or earlier, I believe this is likely fixed in upcoming Qt 6.5/6.6 releases: https://bugreports.qt.io/browse/QTBUG-114316