misc/124114: 7.0 shared libs cannot read errno when loaded into a 6.0 pthreaded program

Kris Kennaway kris at FreeBSD.org
Mon Jun 2 23:59:18 UTC 2008


Martin Simmons wrote:
> The following reply was made to PR misc/124114; it has been noted by GNATS.
> 
> From: Martin Simmons <martin at lispworks.com>
> To: bug-followup at FreeBSD.org
> Cc:  
> Subject: Re: misc/124114: 7.0 shared libs cannot read errno when loaded into a 6.0 pthreaded program
> Date: Fri, 30 May 2008 21:08:31 +0100
> 
>  Sorry for the noise.  I've misunderstood the scope of the compat packages.  I
>  thought they were to designed to allow prebuilt 6.x binaries to run on 7.x,
>  but I guess that only works if all of the dependencies are core FreeBSD
>  libraries, not on the ports like X11.

Yes, that's right.

>  It works fine if I arrange to use the 6.x X11 libraries.  Is there a correct
>  place to install these or is LD_LIBRARY_PATH the only solution?

It is safest to put them in a non-default place and use LD_LIBRARY_PATH 
or similar (or /etc/libmap.conf).  You don't want to risk the opposite 
problem of having a 7.0 binary pick up a 6.x library which can happen if 
they are installed in the default search path.

In principle the dynamic linker might be able to enforce that only 
libraries from the same branch are loaded, but we don't do that 
currently and as mentioned there are scenarios where it is safe to do 
this, which users may be relying on.

Kris


More information about the freebsd-bugs mailing list