Skip to content

weird "undefined reference" errors in config.log when building rsync from source #856

@devZer0

Description

@devZer0

does somebody have a clue why these errors appear in config.log during configure run - as all those symbols do exist in .so shared lib or .a static lib?

for me it looks, configure/autoconf is doing wrong, as it missing to add correct -l LIB params to ggc on test cases

these errros go away when adding these manually before configure run

LIBS="-llz4 -lz -lzstd -lxxhash" ./configure

configure.sh:8007: checking for library containing XXH64_createState
configure.sh:8037: gcc -o conftest -I./zlib -g -O2 -DHAVE_CONFIG_H -Wall -W   conftest.c -lcrypto  >&5
/usr/bin/ld: /tmp/ccIgxkS9.o: in function `main':
/tmp/rsync-3.4.1/conftest.c:83:(.text.startup+0x7): undefined reference to `XXH64_createState'
collect2: error: ld returned 1 exit status

configure.sh:8094: checking for library containing ZSTD_minCLevel
configure.sh:8124: gcc -o conftest -I./zlib -g -O2 -DHAVE_CONFIG_H -Wall -W   conftest.c -lxxhash -lcrypto  >&5
/usr/bin/ld: /tmp/ccrCQcuE.o: in function `main':
/tmp/rsync-3.4.1/conftest.c:84:(.text.startup+0x7): undefined reference to `ZSTD_minCLevel'
collect2: error: ld returned 1 exit status

configure.sh:8181: checking for library containing LZ4_compress_default
configure.sh:8211: gcc -o conftest -I./zlib -g -O2 -DHAVE_CONFIG_H -Wall -W   conftest.c -lzstd -lxxhash -lcrypto  >&5
/usr/bin/ld: /tmp/ccv8OS72.o: in function `main':
/tmp/rsync-3.4.1/conftest.c:85:(.text.startup+0x7): undefined reference to `LZ4_compress_default'
collect2: error: ld returned 1 exit status
# nm -D /usr/lib/x86_64-linux-gnu/libxxhash.so|grep XXH64_createState
0000000000004310 T XXH64_createState

# nm -A /usr/lib/x86_64-linux-gnu/libxxhash.a | grep XXH64_createState
/usr/lib/x86_64-linux-gnu/libxxhash.a:xxhash.o:0000000000002050 T XXH64_createState

# nm -D /usr/lib/x86_64-linux-gnu/libzstd.so | grep ZSTD_minCLevel
0000000000030470 T ZSTD_minCLevel

# nm -A /usr/lib/x86_64-linux-gnu/libzstd.a |grep ZSTD_minCLevel
/usr/lib/x86_64-linux-gnu/libzstd.a:zstd_compress.o:000000000000f1d0 T ZSTD_minCLevel

# nm -D /usr/lib/x86_64-linux-gnu/liblz4.so | grep LZ4_compress_default
00000000000073d0 T LZ4_compress_default

# nm -A /usr/lib/x86_64-linux-gnu/liblz4.a |grep LZ4_compress_default
/usr/lib/x86_64-linux-gnu/liblz4.a:lz4.c.o:0000000000003ed0 T LZ4_compress_default

# ldd rsync
	linux-vdso.so.1 (0x00007f4653209000)
	libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007f465314f000)
	libpopt.so.0 => /lib/x86_64-linux-gnu/libpopt.so.0 (0x00007f4653140000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f4653119000)
	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f465304f000)
	libxxhash.so.0 => /lib/x86_64-linux-gnu/libxxhash.so.0 (0x00007f465303c000)
	libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f4652a00000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f465280b000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f46527eb000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f465320b000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions