On Fri, Oct 27, 2006 at 11:25:51AM +0200, Vincent Lefevre wrote:

> Not necessarily. The soname isn't defined in the header file, is it?
> (At compile time, it seems that the library was also 4.2.1, because
> I get the same problem when using -static, i.e., by not using shared
> libraries.)

Build-time linking has nothing to do with glibc. Besides, ld _does_
search /usr/local/lib before /usr/lib by default.

> > But that also means that adding /usr/local/lib to /etc/ld.so.conf
> > would _NOT_ solve your problem since the loader would still find
> > libgmp.so.X in /usr/lib first.
> 
> So, couldn't the dynamic loader take into account /usr/local/lib
> by default (before /usr/lib), just like cpp takes into account
> /usr/local/include by default (before /usr/include)?

That would be a security nightmare as /usr/local is often writable/owned
by users other than root (for example, looking at my etch chroot, it is
writable by group 'staff' by default). Btw., this is also one of the
many reasons why compiling software as root is generally considered
insecure and discouraged.

> If this is really the only possibility, it should probably be set
> in /etc/profile in the default configuration (at install time) and
> other shell init files.

That would be a security problem as well. Only the local system
administrator can decide whether things installed in /usr/local should
override system software or not.

Gabor

-- 
     ---------------------------------------------------------
     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences
     ---------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to