Potential patch for nALFS

James Robertson jwrober at linuxfromscratch.org
Mon Sep 1 19:21:04 PDT 2003


Kevin P. Fleming wrote:
> I've got a patch here that fixes a problem for me... I'd like to see if 
> anyone else would be interested, and if so what the proper way to design 
> it would be.
> 
> I have installed libxml2 into /opt/libxml2-2.5. I have installed nALFS 
> (latest from today) into /opt/nALFS-1.1. However, without adding 
> /opt/libxml2-2.5/lib into /etc/ld.so.conf (or LD_LIBRARY_PATH), nALFS 
> cannot find libxml2.so.2 at runtime.
> 
> I have crafted a solution to this that has two parts:
> 
> - modify libxml2's xml2-config program to support a new option that 
> reports the path to libxml2.la
> 
> - modify nALFS's configure.in to use that option, and the Makefile to 
> use libtool for the linking step
> 
> The result of this is that the nALFS executable knows the path to the 
> libxml2 it was linked against, it does not need to "find" it at runtime.
> 
> This has only a small number of downsides (that would keep me from 
> immediately making the patch available):
> 
> - building nALFS would require the patched libxml2 (I have just 
> submitted the patch to xml at gnome.org, but have no idea a release 
> incorporating it may appear)
> 
> - building nALFS requires libtool (not a big deal, it's standard on LFS 
> anyway)
> 
> - it is not possible to rebuild libxml2 into a different location and 
> then use that new version without also rebuilding nALFS
> 
> If people would like to test or are otherwise interested, I can post 
> both patches. If a libxml2-2.5.10 (or higher) does get released 
> incorporating this change, then I will probably redo the nALFS patch to 
> actually check whether the new option is supported and only use it if it 
> was found. At that point the nALFS patch could be in the main 
> distribution without causing a problem.
> 
> Comments?
> 

This is quite interesting.  I have seen similar behavior myself.  I 
always thought it was the way I was setting up nALFS.  To fully comment, 
I want to make sure I am on the same page as you.

You have two patches available.  One of them pathces libxml2 and the 
other patches nALFS, but both are required to make the desired behavior 
present itself.  The major downside is that nALFS will always be bound 
to that libxml2 file even if you upgrade libxml2 to a new version.

I do not understand were libtool comes in.  My ignorance is showing here.

Is this not something that we can change in the nALFS code with a 
configure option fix?  I know we can pass the location of libxml2 to 
configure, why does it not remember it then?  How about a nALFSrc file 
in /etc that holds global settings and the location of libxml2?  This 
would seem easier, but I could be very wrong.

Thanks
-- 
James Robertson -- jwrober at linuxfromscratch dot org
Reg. Linux User -- #160424 -- http://counter.li.org
Reg. LFS User   -- #6981   -- http://www.linuxfromscratch.org
LFS Bugzilla Maintainer    -- http://{blfs-}bugs.linuxfromscratch.org




More information about the alfs-discuss mailing list