XPost: linux.debian.bugs.dist
On Mon, 2025-02-03 at 09:50:11 +0100, Bill Allombert wrote:
On Mon, Feb 03, 2025 at 12:51:02AM +0100, Guillem Jover wrote:
On Sun, 2025-02-02 at 23:40:45 +0100, Aurelien Jarno wrote:
Here is a proposal to update the existing paragraph:
The development package should contain either a symlink or a linker
script for the associated shared library without a version number. For
example, the libgdbm-dev package should include a symlink from
/usr/lib/libgdbm.so to libgdbm.so.3.0.0, or a linker script that
achieves the same effect. This symlink or linker script is needed by
the linker (ld) when compiling packages, as it will only look for
libgdbm.so when compiling dynamically.
I'm not sure whether it would be worth stating that such linker
scripts should include the "GNU ld script" string as a comment or use
the GROUP directive, in the first 512 bytes of the file, otherwise
ldconfig will be unhappy.
For what is worth,
% cat /usr/lib/x86_64-linux-gnu/libncurses.so
INPUT(libncurses.so.6 -ltinfo)
Ah, right, the check also includes whether the file is smaller than
either an a.out header (32 bytes on 32-bit systems, and 40 bytes on
64-bit systems) or an ELF file header (52 bytes on 32-bit systems,
and 64 bytes on 64-bit systems), if it is 0-sized then it will print
an error (and stop processing the file), otherwise if the file does
not contain an ELF file magic, then it will print an error too (and
also stop processing it).
[ For reference, this is in glibc/elf/readlib.c:process_file(). ]
So if the contents of the ld script are larger or equal than 32 bytes,
then that could generate error messages (on different systems) when
running ldconfig. The ncurses.so file is luckily 31 bytes long! :D
But 32 bytes seems short enough to still warrant a note I guess?
Thanks,
Guillem
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)