-
Notifications
You must be signed in to change notification settings - Fork 70
Description
We're trying to build FastANI in the scope of EasyBuild (see easybuilders/easybuild-easyconfigs#25010).
Tests on some machines worked fine, but a build on one system failed with undefined references during the link step:
g++ -O2 -ftree-vectorize -mcpu=native -fno-math-errno -O3 -DNDEBUG -std=c++11 -Isrc -I /usr/local//include -fopenmp -include src/common/memcpyLink.h -I/p/project1/cswmanage/reuter1/EasyBuild/jedi/apps/software/binutils/2.44-GCCcore-14.3.0/include -I/p/project1/cswmanage/reuter1/EasyBuild/jedi/apps/software/zlib/1.3.1-GCCcore-14.3.0/include -I/p/project1/cswmanage/reuter1/EasyBuild/jedi/apps/software/GSL/2.8-GCC-14.3.0/include src/cgi/core_genome_identity.cpp src/cgi/main.cpp -o fastANI -L/usr/local//lib -lgsl -lgslcblas -lstdc++ -lz -lm
binutils/2.44-GCCcore-14.3.0/bin/ld: /tmp/eb-gmj3a9b5/ccqv5FPw.o: in function `ks_getuntil2(__kstream_t*, int, __kstring_t*, int*, int) [clone .constprop.0]':
core_genome_identity.cpp:(.text+0xe8): undefined reference to `memcpy@GLIBC_2.2.5'
binutils/2.44-GCCcore-14.3.0/bin/ld: /tmp/eb-gmj3a9b5/ccqv5FPw.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) [clone .isra.0]':
core_genome_identity.cpp:(.text+0x708): undefined reference to `memcpy@GLIBC_2.2.5'
binutils/2.44-GCCcore-14.3.0/bin/ld: /tmp/eb-gmj3a9b5/ccqv5FPw.o: in function `void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .isra.0]':
core_genome_identity.cpp:(.text+0xc18): undefined reference to `memcpy@GLIBC_2.2.5'
binutils/2.44-GCCcore-14.3.0/bin/ld: /tmp/eb-gmj3a9b5/ccqv5FPw.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) [clone .isra.0]':
core_genome_identity.cpp:(.text+0xe0c): undefined reference to `memcpy@GLIBC_2.2.5'
binutils/2.44-GCCcore-14.3.0/bin/ld: /tmp/eb-gmj3a9b5/ccqv5FPw.o: in function `kseq_read(kseq_t*)':
core_genome_identity.cpp:(.text+0x117c): undefined reference to `memcpy@GLIBC_2.2.5'
binutils/2.44-GCCcore-14.3.0/bin/ld: /tmp/eb-gmj3a9b5/ccqv5FPw.o:core_genome_identity.cpp:(.text+0x1d2c): more undefined references to `memcpy@GLIBC_2.2.5' follow
collect2: error: ld returned 1 exit status
Looking through the sources, I've found this line which likely is the culprit here:
FastANI/src/common/memcpyLink.h
Line 7 in 491e061
| __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); |
Checking for memcpy in the libc.so.6 on that machine, memcpy@GLIBC_2.2.5 is not found:
$ nm -a /lib64/libc.so.6 | grep memcpy
000000000009c640 t __GI___memcpy_a64fx
000000000009c3c0 t __GI___memcpy_falkor
000000000009b7c0 t __GI___memcpy_simd
000000000009ba00 t __GI___memcpy_thunderx
000000000009bcc0 t __GI___memcpy_thunderx2
000000000009b540 t __GI_memcpy
00000000000958f0 i __libc_memcpy
00000000000958f0 t __libc_memcpy_ifunc
000000000009c640 t __memcpy_a64fx
00000000000f9810 T __memcpy_chk
000000000009c3c0 t __memcpy_falkor
000000000009b540 t __memcpy_generic
000000000009b7c0 t __memcpy_simd
000000000009ba00 t __memcpy_thunderx
000000000009bcc0 t __memcpy_thunderx2
000000000009e1c0 t __wmemcpy
00000000000fa930 T __wmemcpy_chk
00000000000958f0 i memcpy
000000000009e1c0 W wmemcpyIt is present on x86 though:
nm -a /lib64/libc.so.6 | grep memcpy | grep GLIBC
000000000009de30 i memcpy@@GLIBC_2.14
00000000000a40b0 T memcpy@GLIBC_2.2.5Is there a particular reason why this is used? Unfortunately, this blocks FastANI from being built on aarch64.
System information:
Linux Rocky Linux 9.6, AArch64, ARM UNKNOWN (neoverse_v2), 1 x NVIDIA NVIDIA GH200 480GB, NVIDIA driver 580.95.05, Python 3.9.21