Compile-time shared library name mismatching base name (SDL)

Miroslav Lichvar mlichvar at redhat.com
Thu Jul 4 13:29:45 UTC 2013


On Mon, Jul 01, 2013 at 09:36:19AM +0000, Petr Pisar wrote:
> root at fedora-20:~ # ls -o /usr/lib64/libSDL*
> lrwxrwxrwx. 1 root     20 Jul  1 10:43 /usr/lib64/libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.4
> -rwxr-xr-x. 1 root 444176 Jun 19 12:58 /usr/lib64/libSDL-1.2.so.0.11.4
> lrwxrwxrwx. 1 root     20 Jul  1 10:55 /usr/lib64/libSDL.so -> libSDL-1.2.so.0.11.4

> root at fedora-20:~ # ldconfig -v |grep SDL
> ldconfig: Can't stat /libx32: No such file or directory
> ldconfig: Path `/usr/lib' given more than once
> ldconfig: Path `/usr/lib64' given more than once
> ldconfig: Can't stat /usr/libx32: No such file or directory
>         libSDL-1.2.so.0 -> libSDL.so
> 
> If I remove the libSDL.so, then ldconfig leaves this silly idea and
> returns to expected value (libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.4).

> Is adding the libSDL-1.2.so symlink (and preserving libSDL.so) for
> backward compatibility wise?

Perhaps the best option would be to rename the symlink and replace it
with a linker script containing just "INPUT(-lSDL-1.2)" to keep
ldconfig happy. This is how it's done in the ncurses-devel package for
libcurses.

-- 
Miroslav Lichvar


More information about the devel mailing list