FS#69861 - [avr-binutils] avr-ld depends on nonexistent libctf.so.0 shared library
Attached to Project:
Community Packages
Opened by Sergey Vlasov (sigprof) - Tuesday, 02 March 2021, 21:21 GMT
Last edited by Anatol Pomozov (anatolik) - Tuesday, 09 March 2021, 05:58 GMT
Opened by Sergey Vlasov (sigprof) - Tuesday, 02 March 2021, 21:21 GMT
Last edited by Anatol Pomozov (anatolik) - Tuesday, 09 March 2021, 05:58 GMT
|
Details
Description: avr-binutils-2.36.1-1-x86_64 contains binaries
linked with libctf.so.0, which does not actually exist
Additional info: binutils 2.36.1-2 avr-binutils 2.36.1-1 Steps to reproduce: $ avr-ld --version avr-ld: error while loading shared libraries: libctf.so.0: cannot open shared object file: No such file or directory Apparently libctf.so.0 is built during the avr-binutils package build, but in package() the library is removed and not included into the binary package, with the intent that the binutils package would provide that shared library instead. However, since version 2.36.1 the binutils package does not contain that shared library, therefore executables like avr-ld, avr-objdump, ..., which are linked with that library, cannot be run. Looks like this problem can be fixed in the avr-binutils package by removing the --enable-shared option from the configure arguments, and then removing "rm -r "${pkgdir}"/usr/lib/libctf*" and "rm -r "${pkgdir}"/usr/include/{ctf.h,ctf-api.h}" commands from the end of package() (these files are not installed when --enable-shared is not used, and "rm -r" fails when asked to remove a file which does not actually exist). This problem was initially reported as a bug in the binutils package (https://bugs.archlinux.org/task/69567), but apparently the decision to remove libctf.so.0 from that package has been made and will not be reversed, therefore the problem should be fixed in the avr-binutils package. |
This task depends upon
Closed by Anatol Pomozov (anatolik)
Tuesday, 09 March 2021, 05:58 GMT
Reason for closing: Fixed
Additional comments about closing: 2.36.1-2
Tuesday, 09 March 2021, 05:58 GMT
Reason for closing: Fixed
Additional comments about closing: 2.36.1-2
What is going to be consequence of removing `--enable-shared`? My understanding that bare-metal AVR cannot use shared ELF libs and there is point of having *.so but I might miss something.
usr/x86_64-pc-linux-gnu/avr/lib/ <
usr/x86_64-pc-linux-gnu/avr/lib/libbfd-2.36.1.so <
usr/x86_64-pc-linux-gnu/avr/lib/libbfd.so <
usr/x86_64-pc-linux-gnu/avr/lib/libopcodes-2.36.1.so <
usr/x86_64-pc-linux-gnu/avr/lib/libopcodes.so
And the old way to build avr-binutils (build libctf.so.0 from avr-binutils sources, then remove the built file and hope that a shared library with the same name provided by binutils would be ABI-compatible) does not even look reliable (well, it could work if the versions of binutils and avr-binutils are exactly the same, and the difference in configure options does not affect the ABI, but it does not really match the normal way to use shared libraries).