After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624558 - configure --with-libxml-src does not do the expected
configure --with-libxml-src does not do the expected
Status: RESOLVED OBSOLETE
Product: libxslt
Classification: Platform
Component: general
1.1.x
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-16 18:00 UTC by Othmar Wigger
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libxml confiugure.in patch for better handling of with-libxml-src option (4.87 KB, patch)
2010-07-16 18:00 UTC, Othmar Wigger
none Details | Review

Description Othmar Wigger 2010-07-16 18:00:17 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.
Comment 1 GNOME Infrastructure Team 2021-07-05 10:59:58 UTC
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.