[ale] help with lib

Jason Day jasonday at worldnet.att.net
Wed Jan 26 17:25:35 EST 2005


On Wed, Jan 26, 2005 at 03:17:50PM -0500, Davis, Ringo (Lester) wrote:
> Nope, I'll add it. Should this have been automatically by ldconfig, or
> something I should be doing manually?

The ldconfig command rebuilds the cache, using the contents of
/etc/ld.so.conf .  Any time you add another entry to /etc/ld.so.conf,
you need to run ldconfig (actually, /sbin/ldconfig, as root) to rebuild
the cache.

Note that the ld cache handles dynamic libraries only (.so files), not
static libraries (.a files), and it is invoked at runtime, whereas
static libraries are linked into the executable at link time.  Having
said that, the linker will attempt to use dynamic libraries first before
looking for a static library.  So, if you add /usr/lib/termcap to your
/etc/ld.so.conf file, then run ldconfig, then your linker (gcc) will
pick the dynamic library.  You can verify this with the ldd command.

I think, and I'm not 100% sure about this, that the linker does not use
the same search path for dynamic libraries as the dynamic loader.  So,
you still need to specify -L/usr/lib/termcap to gcc, even if that
directory is in /etc/ld.so.conf.

It's not really a bug in either the distro or the makefile, it's just
that each used different defaults.  Although, it could be considered a
bug in the program distribution, because if the program were using
autoconf/automake it could have determined on its own where the termcap
and curses libraries were installed.

Jason
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9



More information about the Ale mailing list