Opened 15 months ago

Closed 15 months ago

Last modified 14 months ago

#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

https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/176060/steps/install-port/logs/stdio

[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)

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

comment:2 Changed 15 months ago by chrstphrchvz (Christopher Chavez)

comment:3 Changed 15 months ago by chrstphrchvz (Christopher Chavez)

Resolution: fixed
Status: assignedclosed

In debfb6c2ad44008d4c6e472c6cfd09f5cd5bfff5/macports-ports (master):

qt6-qtbase: fix build with LLVM clang 16

Fixes: #67980

comment:4 Changed 14 months ago by chrstphrchvz (Christopher Chavez)

In 35be769cf088851304c82d36a29cd863d9e5b4ca/macports-ports (master):

qt6-qtbase: revbump

Needed because debfb6c2ad44 affected installed files.
See: #67980

[skip ci]

Note: See TracTickets for help on using tickets.