Linking a C++ project fails after upgrading to llvm 21 #6397
Unanswered
ojrosten
asked this question in
Everyday usage
Replies: 1 comment
-
Hmm, reminds me of when a function is moved from being template/header code to being part of the std library but you're not actually linking it. There looks to be some workaround in the repo that maybe is relevant to your issue. alive2: revision bump (llvm 21.1.0) · Homebrew/homebrew-core@e7425f0 The commit it links ([libc++] Instantiate hash function externally (#127040) · llvm/llvm-project@17d0569) peels back the change causing your issue which is what you'd expect really. Looks like the definition should be there though if built correctly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Output of
brew config
Output of
brew doctor
Description of issue
I just upgraded to llvm 21 and a project ceases to link with the following error:
Undefined symbols for architecture arm64:
"std::__1::__hash_memory(void const*, unsigned long)", referenced from:
unsigned long std::__1::__do_string_hash[abi:ne210100]<char const*>(char const*, char const*) in libavocet.a4
The project is built with cmake and the make output of the step which fails is:
//opt/homebrew/bin/cmake -E cmake_link_script CMakeFiles/TestAll.dir/link.txt --verbose=1
/opt/homebrew/opt/llvm/bin/clang++ -arch arm64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names
.......
-Wl,-rpath,/opt/homebrew/lib curlew/libcurlew.a curlew/glfw/src/libglfw3.a -framework Cocoa -framework IOKit -framework CoreFoundation -framework QuartzCore curlew/avocet/libavocet.a curlew/avocet/glad/libglad.a curlew/avocet/sequoia/libsequoia.a /opt/homebrew/lib/libtbb.12.16.dylib
If anyone can shed any light on this I'd be very grateful!
Beta Was this translation helpful? Give feedback.
All reactions