GNOME Bugzilla – Bug 624558
configure --with-libxml-src does not do the expected
Last modified: 2021-07-05 10:59:58 UTC
Created attachment 166031 [details] [review] libxml confiugure.in patch for better handling of with-libxml-src option configure --help says: --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above) That's what I want to do, namely: 1. cd; tar xzf libxml2-2.7.7.tar.gz; cd libxml2-2.7.7; ./configure; make 2. cd; tar xzf libxslt-1.1.26.tar.gz; cd libxslt-1.1.26; ./configure; make 3. ... build a few more packages 4. cd ~/libxml2-2.7.7; make install 5. cd ~/libxslt-1.1.26; make install This actually works if configure is given the --with-libxml-src option. However, the result is not what I expect: many of the resulting files contain references to the libxml source directory instead to the install directory: $ xslt-config --cflags /usr/bin/xslt-config: line 96: ~/libxml2-2.7.3/xml2-config: No such file or directory $ pkg-config --libs libxslt -L/home/othmar/libxml2-2.7.3 -lxslt -lz -lm -lxml2 $ grep dependency_libs= /usr/lib/libxslt.la dependency_libs=' -L/home/othmar/libxml2-2.7.3 /usr/lib/libxml2.la -ldl -lz -lm' The reason is that --with-libxml-src is implemented wrongly in configure.in. It simply sets LIBXML_LIBS and LIBXML_CFLAGS to the xml2 source directory (as the help text states) regardless whether these variables are later used to create various artifacts and should therefore not be modified. I suggest fixing the --with-libxml-src implementation according to the patch I submit in the attachment. It works as follows: In configure.in, the variables LIBXML_CFLAGS and LIBXML_LIBS are not modified by the --with-libxml-src option. Two new vaiables are assigned instead, I called them LIBXML_UNINST_CFLAGS and LIBXML_UNINST_LIBS. These are expanded in libexslt/Makefile.am, libxslt/Makefile.am, python/Makefile.am, tests/plugins/Makefile.am and xsltproc/Makefile.am. As a result, the necessary include and library options are used at compile time, but .pc, .la and xslt-config files are created with the installation time values. The xslt-config script needs special attention, because it executes the xml2-config script at run time, whose path it queries at compile time. I tested this patch on two different Linux systems, and I tried hard not to touch anything which I don't understand. Please comment.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxslt/-/issues/ Thank you for your understanding and your help.