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.<br>
<br>Kendall<br><br><br><div class="gmail_quote">On Tue, Jun 29, 2010 at 3:21 PM, Matthew Steven <span dir="ltr"><<a href="mailto:matthew@geniusweb.com">matthew@geniusweb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I think this is what I did last time I ran across this:<br>
<br>
As long as you _remember_ to put them right back, you can briefly move<br>
the other .so files out of the linker path ( to /var/tmp for example ),<br>
run ldconfig or update-modules or whatever your distro prefers, do the<br>
configure, and move them right back. Run ldconfig/whatever again once<br>
they are back to regenerate everything.<br>
<br>
If you're going to disrupt symlinks, save a copy of the state of things<br>
before you start, just to be safe.<br>
ls -l /usr/local/lib > /tmp/locallibs.txt<br>
<br>
I'd also do a backup of the lib directory if you have the space in<br>
advance, it's easy to goof it all up.<br>
<br>
tar cfv libs.tar /usr/local/lib<br>
<div class="im"><br>
<br>
<br>
Daniel A. Ramaley wrote:<br>
> If multiple versions of a library are installed, is is possible to<br>
> compile software against a specific version? If so, how?<br>
><br>
> My specific situation is that a web server has 3 versions of libjpeg<br>
> installed, 6.2, 7.0, and 8.0. I need to compile PHP against version 6.2,<br>
> but it always finds the 8.0 version instead. All 3 versions are<br>
> installed in /usr/local. I tried configuring PHP specifying the exact<br>
> one using --with-jpeg-dir=/usr/local/lib/libjpeg.so.62, but it still<br>
> ended up using the 8.0 version. Unfortunately, i can't just remove the<br>
> newer versions as other running software is using it.<br>
><br>
<br>
--<br>
</div><font color="#888888">Matthew Steven<br>
<a href="http://www.geniusweb.com/" target="_blank">http://www.geniusweb.com/</a><br>
(515) 999 0842<br>
</font><div><div></div><div class="h5">_______________________________________________<br></div></div></blockquote></div>