[Ffmpeg-devel] Shared libraries install script broken in cvs
Måns Rullgård
mru
Thu Dec 15 21:17:25 CET 2005
Diego Biurrun <diego at biurrun.de> writes:
> On Thu, Dec 15, 2005 at 11:06:05AM +0000, M?ns Rullg?rd wrote:
>>
>> The current makefile attempts to run ldconfig, but fails if 'make install'
>> is not run as root, or if $libdir is not in /etc/ld.so.conf.
>
> Yes. Is that really a problem? I mean that in the sense of: Don't all
> (most) install routines work that way? What's the alternative?
If you configure --prefix=/home/user/ffmpeg or whatever, installing is
no problem at all, but ldconfig won't even look there unless told to
do so.
>> If we are to
>> rely on ldconfig creating the links, we should be running it in a way that
>> doesn't fail, or at the very least document that the user must do whatever
>> it takes to have the links created. Furthermore, just running ldconfig is
>> not enough to create all links needed, as ldconfig only creates a link for
>> the library SONAME (e.g. libavcodec.so.0), not the unversioned name of the
>> library (e.g. libavcodec.so). The latter is required for linking with the
>> library, since the linker will only search for lib*.so and lib*.a, and not
>> names with a version number appended. Creating libfoo.so links is not the
>> job of ldconfig. Its job is to create the links needed to resolve runtime
>> dependencies, nothing else.
>
> We already do that, here are some of the lines printed by 'make -n
> install':
>
> install -d /usr/local/lib
> install -s -m 755 libavcodec.so /usr/local/lib/libavcodec-CVS.so
> ln -sf libavcodec-CVS.so /usr/local/lib/libavcodec.so
> ldconfig || true
Since we are already creating that link, what's so bad about creating
the other one?
> So this should be enough. Unless we could drop ldconfig entirely in
> favor of creating the links ourselves.
I don't see a problem with that. If a system requires ldconfig to be
run after installing libraries, it should be up to the system
administrator to do it. Package managers typically run ldconfig.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list