On 2022-11-22 18:51:49 [+0100], John Paul Adrian Glaubitz wrote:
> Hello!
Hi,

> [ 36%] Linking CXX shared module ha_archive.so
> cd /<<PKGBUILDDIR>>/builddir/storage/archive && /usr/bin/cmake -E 
> cmake_link_script CMakeFiles/archive.dir/link.txt --verbose=1
> /usr/bin/c++ -fPIC -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. 
> -specs=/usr/share/dpkg/pie-compile.specs -Wformat -Werror=format-security 
> -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -pie -fPIC 
> -fstack-protector --param=ssp-buffer-size=4 -O2 -g -static-libgcc 
> -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized 
> -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2 -DDBUG_OFF -Wall -Wenum-compare 
> -Wenum-conversion -Wextra -Wformat-security -Wmissing-braces 
> -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare 
> -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla 
> -Wwrite-strings -specs=/usr/share/dpkg/pie-link.specs -Wl,-z,relro,-z,now 
> -shared  -o ha_archive.so CMakeFiles/archive.dir/azio.c.o 
> CMakeFiles/archive.dir/ha_archive.cc.o  ../../libservices/libmysqlservices.a 
> -lz
> /usr/bin/ld: warning: -z relro ignored
> /usr/bin/ld: ha_archive.so: version node not found for symbol 
> lzma_get_progress@@XZ_5.2
> /usr/bin/ld: failed to set dynamic section sizes: bad value
> collect2: error: ld returned 1 exit status
> make[4]: *** [storage/archive/CMakeFiles/archive.dir/build.make:118: 
> storage/archive/ha_archive.so] Error 1
> make[4]: Leaving directory '/<<PKGBUILDDIR>>/builddir'
> make[3]: *** [CMakeFiles/Makefile2:4913: 
> storage/archive/CMakeFiles/archive.dir/all] Error 2

I'm not sure if this an ia64 issue or something else is missing. Looking
at the symbols:

| bigeasy@yttrium:~$ readelf -W --dyn-syms 
/lib/ia64-linux-gnu/liblzma.so.5|grep lzma_get_progress
|    160: 0000000000007480   208 FUNC    GLOBAL DEFAULT   12 
lzma_get_progress@@XZ_5.2
|    161: 0000000000007480   208 FUNC    GLOBAL DEFAULT   12 
lzma_get_progress@XZ_5.2.2
| bigeasy@yttrium:~$ readelf -W --dyn-syms /usr/bin/xz|grep progress
|     45: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND 
lzma_get_progress@XZ_5.2 (8)

The @@ thingy is used in the library to mark the default symbol. So
liblzma provides two lzma_get_progress and default is XZ_5.2. The XZ
binary picked it up properly. Looking around in your build:

| bigeasy@yttrium:~$ readelf -W --dyn-syms 
../glaubitz/mariadb-10.6/mariadb-10.6-10.6.11/builddir/client/mariadb-conv 
|grep lzma_get_progress
|    812: 000000000011c140   208 FUNC    GLOBAL DEFAULT   14 
lzma_get_progress@@XZ_5.2
|    813: 000000000011c140   208 FUNC    GLOBAL DEFAULT   14 
lzma_get_progress@XZ_5.2.2

This looks like it is staticaly linked against liblzma. I didn't find
lzma_get_progress anywhere else. So it looks like this function isn't
used by mariadb itself but appears due to static linking somewhere and
asks for trouble. I didn't find any reference to lzma_get_progress in
/lib/ia64-linux-gnu/libgcc_s.so.1, /lib/ia64-linux-gnu/libz.so.1.2.13,
ha_archive.cc.o or libmysqlservices.a. This seems to be all that is
passed to the compiler for linking.

Sebastian

Reply via email to