Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#77179 - [binutils] ZSTD_compress ld library error
Attached to Project:
Arch Linux
Opened by HcgRandon (HcgRandon) - Thursday, 19 January 2023, 01:16 GMT
Last edited by freswa (frederik) - Thursday, 19 January 2023, 15:39 GMT
Opened by HcgRandon (HcgRandon) - Thursday, 19 January 2023, 01:16 GMT
Last edited by freswa (frederik) - Thursday, 19 January 2023, 15:39 GMT
|
DetailsDescription: Updating to 2.40-1 has caused an issue with using make, seems to be related to ld. The following message appears and is reproducible on several systems:
``` /usr/bin/ld: /usr/lib/libbfd.a(compress.o): undefined reference to symbol 'ZSTD_compress' /usr/bin/ld: /usr/lib/libzstd.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/looking-glass-client.dir/build.make:492: looking-glass-client] Error 1 make[1]: *** [CMakeFiles/Makefile2:382: CMakeFiles/looking-glass-client.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 ``` Downgrading back to 2.39-4 resolve the issue. Additional info: * 2.40-1 Steps to reproduce: Following the build steps at this URL will result with the error on 2.40-1 https://looking-glass.io/docs/B6/build/#building |
This task depends upon
Closed by freswa (frederik)
Thursday, 19 January 2023, 15:39 GMT
Reason for closing: Fixed
Additional comments about closing: binutils-2.40-2
Thursday, 19 January 2023, 15:39 GMT
Reason for closing: Fixed
Additional comments about closing: binutils-2.40-2
The attached diff, does not seem to resolve the issue as linking still fails.
echo 'INPUT( /usr/lib/libbfd.a -liberty -lz -ldl )' > "$pkgdir/usr/lib/libbfd.so"
1. Edit `/usr/lib/libbfd.so' (it's an ASCII text file) so that it reads:
INPUT( /usr/lib/libbfd.a -lzstd -liberty -lz -ldl )
Does that solve the problem?
/usr/bin/ld: /usr/lib/libbfd.a(elfxx-x86.o): in function `_bfd_x86_elf_write_sframe_plt.isra.0':
(.text+0xeaa): undefined reference to `sframe_encoder_write'
/usr/bin/ld: (.text+0xee2): undefined reference to `sframe_encoder_free'
/usr/bin/ld: /usr/lib/libbfd.a(elfxx-x86.o): in function `_bfd_x86_elf_create_sframe_plt.isra.0':
(.text+0xfe7): undefined reference to `sframe_encode'
/usr/bin/ld: (.text+0xff8): undefined reference to `sframe_calc_fre_type'
/usr/bin/ld: (.text+0x1004): undefined reference to `sframe_fde_create_func_info'
/usr/bin/ld: (.text+0x1019): undefined reference to `sframe_encoder_add_funcdesc'
/usr/bin/ld: (.text+0x1067): undefined reference to `sframe_encoder_add_fre'
/usr/bin/ld: (.text+0x10cf): undefined reference to `sframe_encode'
/usr/bin/ld: (.text+0x10e0): undefined reference to `sframe_calc_fre_type'
/usr/bin/ld: (.text+0x10ec): undefined reference to `sframe_fde_create_func_info'
/usr/bin/ld: (.text+0x1158): undefined reference to `sframe_encode'
/usr/bin/ld: (.text+0x1169): undefined reference to `sframe_calc_fre_type'
/usr/bin/ld: (.text+0x1175): undefined reference to `sframe_fde_create_func_info'
/usr/bin/ld: (.text+0x1194): undefined reference to `sframe_fde_create_func_info'
/usr/bin/ld: (.text+0x11ae): undefined reference to `sframe_encoder_add_funcdesc'
/usr/bin/ld: (.text+0x11f6): undefined reference to `sframe_encoder_add_fre'
/usr/bin/ld: (.text+0x124f): undefined reference to `sframe_encode'
/usr/bin/ld: /usr/lib/libbfd.a(elf-sframe.o): in function `_bfd_elf_parse_sframe':
(.text+0x13d): undefined reference to `sframe_decode'
/usr/bin/ld: (.text+0x157): undefined reference to `sframe_decoder_get_num_fidx'
/usr/bin/ld: (.text+0x287): undefined reference to `sframe_decoder_free'
/usr/bin/ld: /usr/lib/libbfd.a(elf-sframe.o): in function `_bfd_elf_discard_section_sframe':
(.text+0x2ec): undefined reference to `sframe_decoder_get_num_fidx'
/usr/bin/ld: /usr/lib/libbfd.a(elf-sframe.o): in function `_bfd_elf_merge_section_sframe':
(.text+0x757): undefined reference to `sframe_decoder_get_abi_arch'
/usr/bin/ld: (.text+0x762): undefined reference to `sframe_encoder_get_abi_arch'
/usr/bin/ld: (.text+0x778): undefined reference to `sframe_decoder_get_num_fidx'
/usr/bin/ld: (.text+0x787): undefined reference to `sframe_encoder_get_num_fidx'
/usr/bin/ld: (.text+0x818): undefined reference to `sframe_decoder_get_funcdesc'
/usr/bin/ld: (.text+0x869): undefined reference to `sframe_decoder_get_hdr_size'
/usr/bin/ld: (.text+0x8f2): undefined reference to `sframe_encoder_add_funcdesc'
/usr/bin/ld: (.text+0x92d): undefined reference to `sframe_decoder_get_fre'
/usr/bin/ld: (.text+0x945): undefined reference to `sframe_encoder_add_fre'
/usr/bin/ld: (.text+0x98d): undefined reference to `sframe_decoder_free'
/usr/bin/ld: (.text+0xb85): undefined reference to `sframe_decoder_get_abi_arch'
/usr/bin/ld: (.text+0xb96): undefined reference to `sframe_decoder_get_fixed_fp_offset'
/usr/bin/ld: (.text+0xba6): undefined reference to `sframe_decoder_get_fixed_ra_offset'
/usr/bin/ld: (.text+0xbcc): undefined reference to `sframe_encode'
/usr/bin/ld: /usr/lib/libbfd.a(elf-sframe.o): in function `_bfd_elf_write_section_sframe':
(.text+0xc89): undefined reference to `sframe_encoder_write'
/usr/bin/ld: (.text+0xcb7): undefined reference to `sframe_encoder_free'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/looking-glass-client.dir/build.make:492: looking-glass-client] Error 1
make[1]: *** [CMakeFiles/Makefile2:382: CMakeFiles/looking-glass-client.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
cmake -DENABLE_BACKTRACE=no ../
which will avoid linking against binutils libbfd.
echo 'INPUT( /usr/lib/libbfd.a -lsframe -liberty -lz -lzstd -ldl )' > "$pkgdir/usr/lib/libbfd.so"
@HcgRandon sorry for the earlier noise.
Can confirm that the changes @loqs suggested have fixed the issue and things compile properly now. :D