[MacPorts] #71694: llvm-19 @19.1.6_0: Undefined symbols

MacPorts noreply at macports.org
Fri Jan 3 07:16:35 UTC 2025


#71694: llvm-19 @19.1.6_0: Undefined symbols
-----------------------+-------------------------------
  Reporter:  thetrial  |      Owner:  (none)
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.10.5
Resolution:            |   Keywords:  legacy-os, sierra
      Port:  llvm-19   |
-----------------------+-------------------------------

Comment (by kencu):

 my llvm-19 and clang-19 are still going, but I bet they will error out.

 Your errors:

 {{{
 :info:build Undefined symbols for architecture i386:
 :info:build   "_llvm_blake3_hash_many_sse41", referenced from:
 :info:build       _llvm_blake3_hash_many in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_compress_xof_avx512", referenced from:
 :info:build       _llvm_blake3_compress_xof in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_hash_many_avx512", referenced from:
 :info:build       _llvm_blake3_hash_many in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_compress_xof_sse2", referenced from:
 :info:build       _llvm_blake3_compress_xof in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_compress_in_place_sse41", referenced from:
 :info:build       _llvm_blake3_compress_in_place in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_compress_in_place_avx512", referenced from:
 :info:build       _llvm_blake3_compress_in_place in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_hash_many_avx2", referenced from:
 :info:build       _llvm_blake3_hash_many in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_compress_xof_sse41", referenced from:
 :info:build       _llvm_blake3_compress_xof in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_hash_many_sse2", referenced from:
 :info:build       _llvm_blake3_hash_many in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build   "_llvm_blake3_compress_in_place_sse2", referenced from:
 :info:build       _llvm_blake3_compress_in_place in
 libLLVMSupport.a(blake3_dispatch.c.o)
 :info:build ld: symbol(s) not found for architecture i386
 :info:build clang++: error: linker command failed with exit code 1 (use -v
 to see invocation)
 }}}

 show that the i386 build can't find the needed blake3 i386 SIMD symbols.
 This is no big surprise, as during the build, we see this in your log:

 {{{
 :info:build /opt/local/bin/libtool: for architecture: i386 file:
 lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_neon.c.o has no
 symbols
 :info:build /opt/local/bin/libtool: for architecture: i386 file:
 lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_sse2_x86-64_unix.S.o
 has no symbols
 :info:build /opt/local/bin/libtool: for architecture: i386 file:
 lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_sse41_x86-64_unix.S.o
 has no symbols
 :info:build /opt/local/bin/libtool: for architecture: i386 file:
 lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx2_x86-64_unix.S.o
 has no symbols
 :info:build /opt/local/bin/libtool: for architecture: i386 file:
 lib/Support/BLAKE3/CMakeFiles/LLVMSupportBlake3.dir/blake3_avx512_x86-64_unix.S.o
 has no symbols
 :info:build /opt/local/bin/libtool: for architecture: i386 file:
 lib/Support/CMakeFiles/LLVMSupport.dir/AutoConvert.cpp.o has no symbols
 }}}

 and indeed, Apple and LLVM are not really considering i386 as a build to
 be reckoned with in their handling of the SIMD code in blake3 any longer.

 See this CMakeLists.txt file that controls the blake3 build:

 https://github.com/llvm/llvm-
 project/blob/main/llvm/lib/Support/BLAKE3/CMakeLists.txt

 would have to account for an Apple x86_64/i386 build in that file, or
 disable is386 assembly, or disable all assembly in blake3, or disable all
 assembly in llvm as a whole (in order of painful outcomes).

 OR -- MacPorts could disable +universal building of llvm/clang-19 as
 i386/x86_64. It's not really necessary  to build it actually universal for
 it to generate universal code (see our gcc builds, for example). But we do
 build it universal as sometimes software links against the LLVM/CLANG
 libraries themselves, and they might expect those libraries to be
 universal, so we (up to now) have made sure they are universal.

-- 
Ticket URL: <https://trac.macports.org/ticket/71694#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list