[Cialug] [OT] Compilation problem
Kendall Bailey
kendall at baileyplex.com
Tue Jun 29 16:38:45 CDT 2010
If you simply force the issue at the link stage you could be in for some
trouble. The reason each version of the library has a distinct soname is
because the ABI probably changed ( Application Binary Interface ). In that
case, compiling against 8.0 header files and forcing it to link to a 6.2
library is a bad idea. The header files define the ABI as well as the API.
You should absolutely make sure the headers found by the C/C++ compiler
match up with the libraries found by the linker. It's up to the user
running the build process to ensure this, since the compilation tool chain
typically doesn't check it for you. v6.2 and v8.0 might be API compatible,
but have different ABI. I think moving or renaming things in /usr/local/lib
is a bad idea.
Kendall
On Tue, Jun 29, 2010 at 3:21 PM, Matthew Steven <matthew at geniusweb.com>wrote:
> I think this is what I did last time I ran across this:
>
> As long as you _remember_ to put them right back, you can briefly move
> the other .so files out of the linker path ( to /var/tmp for example ),
> run ldconfig or update-modules or whatever your distro prefers, do the
> configure, and move them right back. Run ldconfig/whatever again once
> they are back to regenerate everything.
>
> If you're going to disrupt symlinks, save a copy of the state of things
> before you start, just to be safe.
> ls -l /usr/local/lib > /tmp/locallibs.txt
>
> I'd also do a backup of the lib directory if you have the space in
> advance, it's easy to goof it all up.
>
> tar cfv libs.tar /usr/local/lib
>
>
>
> Daniel A. Ramaley wrote:
> > If multiple versions of a library are installed, is is possible to
> > compile software against a specific version? If so, how?
> >
> > My specific situation is that a web server has 3 versions of libjpeg
> > installed, 6.2, 7.0, and 8.0. I need to compile PHP against version 6.2,
> > but it always finds the 8.0 version instead. All 3 versions are
> > installed in /usr/local. I tried configuring PHP specifying the exact
> > one using --with-jpeg-dir=/usr/local/lib/libjpeg.so.62, but it still
> > ended up using the 8.0 version. Unfortunately, i can't just remove the
> > newer versions as other running software is using it.
> >
>
> --
> Matthew Steven
> http://www.geniusweb.com/
> (515) 999 0842
> _______________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20100629/6cfe17d5/attachment.htm
More information about the Cialug
mailing list