Re: ldconfig

Phillip Dillinger (Phillip.Dillinger@sealabs.com)
Wed, 18 Dec 1996 10:12:10 -0800


>
> I found another bug with ldconfig v1.8.5. It seems that when you link some
> libraries (or try to redo the cache file), it outputs the following:
>
> libforms.so.0.81 => libforms.so.0.81
>
> This, of course, is completely wrong. It should output:
>
> libforms.so.0 => libforms.so.0.81
>
> (This is just an example, its actually occuring with this and other libraries
> in the form .so.3.x and .so.2.x too.) That means, the "major version" link
> never gets created and loaded in the cache, and programs that are looking for
> that "major version" link can't load the library, and fail to run.
>
> Any ideas?
>

When making an ELF shared library, it should be done like this:

ld -shared -o libx.so.x.y.z -soname libx.so.x <object files>

If not done like that, the ELF library has no internal information on its
version. That is why when you run ldconfig, it links libforms.so.0.81 to
itself, and not libforms.so.0, like it should.

Try to recompile your library, and use the "-soname libforms.so.0" option
when linking to fix this problem.

Phillip Dillinger phillip.dillinger@sealabs.com