Hi, i'm trying to install FAAD (with success, also 'make install' didn't copied faad.h to the includes dir). The package installed everything to /usr/local/. (eof offtopic) Finally i added a dummy function call to the configure test, to check if library is installed too (not only headers). It works right, but, as it's placed to /usr/local/ and it isn't in my environment path, ldd returns with libfaad.so.0 => not found. (hmm, but gcc knows /usr/local, as it linked the binary) Shouldn't we check ldd's output too? I mean ldd $file | grep 'not found', if returned string isn't empty we should write a message or only set configure test to no (disable) and/or add a configure switch for this. We can gain some bugreports if mplayer will be linked but cannot be started becouse of libraries in unknown path. Or is my case very very special? Or simply i'm lame? (NO ;) - alex
On Wed, Mar 20, 2002 at 06:14:47PM +0100, Alex Beregszaszi wrote:
Hi,
i'm trying to install FAAD (with success, also 'make install' didn't copied faad.h to the includes dir). The package installed everything to /usr/local/.
(eof offtopic)
Finally i added a dummy function call to the configure test, to check if library is installed too (not only headers).
It works right, but, as it's placed to /usr/local/ and it isn't in my environment path, ldd returns with libfaad.so.0 => not found. (hmm, but gcc knows /usr/local, as it linked the binary)
Shouldn't we check ldd's output too? I mean ldd $file | grep 'not found', if returned string isn't empty we should write a message or only set configure test to no (disable) and/or add a configure switch for this.
What about the -rpath option to ld? If we add "-rpath /usr/local/lib" in the link stage the executable will search in /usr/local/lib even if /usr/local/lib isn't in /etc/ld.so.conf or LD_LIBRARY_PATH. If we do this the ldd test won't be necessary. / Fredrik
Hi,
i'm trying to install FAAD (with success, also 'make install' didn't copied faad.h to the includes dir). The package installed everything to /usr/local/.
(eof offtopic)
Finally i added a dummy function call to the configure test, to check if library is installed too (not only headers).
It works right, but, as it's placed to /usr/local/ and it isn't in my environment path, ldd returns with libfaad.so.0 => not found. (hmm, but gcc knows /usr/local, as it linked the binary)
Shouldn't we check ldd's output too? I mean ldd $file | grep 'not found', if returned string isn't empty we should write a message or only set configure test to no (disable) and/or add a configure switch for this.
What about the -rpath option to ld? If we add "-rpath /usr/local/lib" in the link stage the executable will search in /usr/local/lib even if /usr/local/lib isn't in /etc/ld.so.conf or LD_LIBRARY_PATH. If we do this the ldd test won't be necessary.
This isn't the question. The question is about running mplayer. If the libs which are linked with mplayer arent placed into the path (ld.so.conf) or into LD_LIBRARY_PAT, than mplayer will fail execution. - alex
On Wed, Mar 20, 2002 at 08:16:19PM +0100, Alex Beregszaszi wrote:
Hi,
i'm trying to install FAAD (with success, also 'make install' didn't copied faad.h to the includes dir). The package installed everything to /usr/local/.
(eof offtopic)
Finally i added a dummy function call to the configure test, to check if library is installed too (not only headers).
It works right, but, as it's placed to /usr/local/ and it isn't in my environment path, ldd returns with libfaad.so.0 => not found. (hmm, but gcc knows /usr/local, as it linked the binary)
Shouldn't we check ldd's output too? I mean ldd $file | grep 'not found', if returned string isn't empty we should write a message or only set configure test to no (disable) and/or add a configure switch for this.
What about the -rpath option to ld? If we add "-rpath /usr/local/lib" in the link stage the executable will search in /usr/local/lib even if /usr/local/lib isn't in /etc/ld.so.conf or LD_LIBRARY_PATH. If we do this the ldd test won't be necessary.
This isn't the question. The question is about running mplayer. If the libs which are linked with mplayer arent placed into the path (ld.so.conf) or into LD_LIBRARY_PAT, than mplayer will fail execution.
Yes this is exactly what I tried to say. I think that -rpath can be used in this situation.
On Wed, Mar 20, 2002 at 08:16:19PM +0100, Alex Beregszaszi wrote:
What about the -rpath option to ld? If we add "-rpath /usr/local/lib" in the link stage the executable will search in /usr/local/lib even if /usr/local/lib isn't in /etc/ld.so.conf or LD_LIBRARY_PATH. If we do this the ldd test won't be necessary.
This isn't the question. The question is about running mplayer. If the libs which are linked with mplayer arent placed into the path (ld.so.conf) or into LD_LIBRARY_PAT, than mplayer will fail execution.
IMHO it's not the responsibility of apps to work around a broken os install. If /usr/local/lib is missing from ld.so.conf, this needs to be fixed, not worked around. If you're installing your libs in a strange location you should either add that to ld.so.conf or use LD_LIBRARY_PATH yourself, but its better not to do such a thing in the first place. Rich
D Richard Felker III wrote:
IMHO it's not the responsibility of apps to work around a broken os install. If /usr/local/lib is missing from ld.so.conf, this needs to be fixed, not worked around. If you're installing your libs in a strange location you should either add that to ld.so.conf or use LD_LIBRARY_PATH yourself, but its better not to do such a thing in the first place.
Note that AFAIK on Solaris and probably other unixes there is no ld.so.conf and your only options are the right ld directive or setting LD_LIBRARY_PATH. The latter is ugly... -- Tobias PGP: 0x9AC7E0BC
Tobias Diedrich <td@informatik.uni-hannover.de> writes:
D Richard Felker III wrote:
IMHO it's not the responsibility of apps to work around a broken os install. If /usr/local/lib is missing from ld.so.conf, this needs to be fixed, not worked around. If you're installing your libs in a strange location you should either add that to ld.so.conf or use LD_LIBRARY_PATH yourself, but its better not to do such a thing in the first place.
Note that AFAIK on Solaris and probably other unixes there is no ld.so.conf and your only options are the right ld directive or setting LD_LIBRARY_PATH. The latter is ugly...
on solaris, you can/do use crle - configure runtime linking environment ([...]The crle utility provides for the creation and display of a runtime linking configuration file.[...] Defining user supplied alternative objects provides a means of replacing dependencies other than via symbolic links or requiring LD_LIBRARY_PATH settings.[...]) -- Peter FELECAN mailto:pfelecan@acm.org
Hi,
What about the -rpath option to ld? If we add "-rpath /usr/local/lib" in the link stage the executable will search in /usr/local/lib even if /usr/local/lib isn't in /etc/ld.so.conf or LD_LIBRARY_PATH. If we do this the ldd test won't be necessary.
This isn't the question. The question is about running mplayer. If the libs which are linked with mplayer arent placed into the path (ld.so.conf) or into LD_LIBRARY_PAT, than mplayer will fail execution.
IMHO it's not the responsibility of apps to work around a broken os install. If /usr/local/lib is missing from ld.so.conf, this needs to be fixed, not worked around. If you're installing your libs in a strange location you should either add that to ld.so.conf or use LD_LIBRARY_PATH yourself, but its better not to do such a thing in the first place.
Yes, you're right, but if we're so humanic, why don't display a warning message?:) This -rpath stuff looks nice, but dunno nothing about how portable it is. (i think it's gnu only) - alex
On Wed, Mar 20, 2002 at 10:06:12PM +0100, Alex Beregszaszi wrote:
This -rpath stuff looks nice, but dunno nothing about how portable it is. (i think it's gnu only)
Wrong. At least Solaris cc has it but the option is -R instead of -rpath. (gcc accepts -R too) I am pretty sure that other Unixes has it too. Don't we require gcc anyway? / Fredrik
On Wed, Mar 20, 2002 at 02:51:26PM -0500, D Richard Felker III wrote:
On Wed, Mar 20, 2002 at 08:16:19PM +0100, Alex Beregszaszi wrote:
What about the -rpath option to ld? If we add "-rpath /usr/local/lib" in the link stage the executable will search in /usr/local/lib even if /usr/local/lib isn't in /etc/ld.so.conf or LD_LIBRARY_PATH. If we do this the ldd test won't be necessary.
This isn't the question. The question is about running mplayer. If the libs which are linked with mplayer arent placed into the path (ld.so.conf) or into LD_LIBRARY_PAT, than mplayer will fail execution.
IMHO it's not the responsibility of apps to work around a broken os install. If /usr/local/lib is missing from ld.so.conf, this needs to be fixed, not worked around. If you're installing your libs in a strange location you should either add that to ld.so.conf or use LD_LIBRARY_PATH yourself, but its better not to do such a thing in the first place.
Users can't change /etc/ld.so.conf. If I want to install some application, such as mplayer, as an ordinary user on a system where I don't have root access and this application requires a shared library I would prefer that -rpath was used during the link stage rather than that I had to mess with LD_LIBRARY_PATH. What if this library is only used by one application? Why should I add the path to LD_LIBRARY_PATH then? There might be valid reason for people to install libraries in "strange" locations. (Users, with write access only to their home directories, is only one example.) David Barr has some interesting thoughts about LD_LIBRARY_PATH and ld.so.conf, at least some of it is relevant in this discussion. Read it at: http://www.visi.com/~barr/ldpath.html / Fredrik
On Wed, Mar 20, 2002 at 10:34:29PM +0100, Fredrik Kuivinen wrote:
On Wed, Mar 20, 2002 at 02:51:26PM -0500, D Richard Felker III wrote:
On Wed, Mar 20, 2002 at 08:16:19PM +0100, Alex Beregszaszi wrote:
What about the -rpath option to ld? If we add "-rpath /usr/local/lib" in the link stage the executable will search in /usr/local/lib even if /usr/local/lib isn't in /etc/ld.so.conf or LD_LIBRARY_PATH. If we do this the ldd test won't be necessary.
This isn't the question. The question is about running mplayer. If the libs which are linked with mplayer arent placed into the path (ld.so.conf) or into LD_LIBRARY_PAT, than mplayer will fail execution.
IMHO it's not the responsibility of apps to work around a broken os install. If /usr/local/lib is missing from ld.so.conf, this needs to be fixed, not worked around. If you're installing your libs in a strange location you should either add that to ld.so.conf or use LD_LIBRARY_PATH yourself, but its better not to do such a thing in the first place.
Users can't change /etc/ld.so.conf. If I want to install some application, such as mplayer, as an ordinary user on a system where I don't have root access and this application requires a shared library I would prefer that -rpath was used during the link stage rather than that I had to mess with LD_LIBRARY_PATH.
What if this library is only used by one application? Why should I add the path to LD_LIBRARY_PATH then?
There might be valid reason for people to install libraries in "strange" locations. (Users, with write access only to their home directories, is only one example.)
Yeah, although personally on such systems, I would add ~/lib to my LD_LIBRARY_PATH if I were installing my own libs there. Rich
participants (5)
-
Alex Beregszaszi -
D Richard Felker III -
Fredrik Kuivinen -
Peter FELECAN -
Tobias Diedrich