Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 106259 - xmlstarlet-1.0.1 does not build against recent libxml and libxslt
Summary: xmlstarlet-1.0.1 does not build against recent libxml and libxslt
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Text-Markup Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 109455
  Show dependency tree
 
Reported: 2005-09-17 03:41 UTC by Bruno
Modified: 2006-03-24 04:21 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno 2005-09-17 03:41:06 UTC
On a fresh system when emerging xmlstarlet libxml2 and libxslt got emerged as  
dependency:  
  dev-libs/libxml2-2.6.20-r2   
  dev-libs/libxslt-1.1.14-r2   
  
Compiling of xmlstarlet failed with the following error:  
gcc  -Wall -g -pedantic -lgcrypt -o xml  xml.o xml_edit.o xml_ls.o   
xml_escape.o xml_pyx.o xml_depyx.o xml_select.o xml_trans.o xml_validate.o   
xml_format.o xml_elem.o xml_C14N.o trans.o binsert.o stack.o   
strdup.o /usr/lib/libxslt.a /usr/lib/libexslt.a -lz -lm   
-lpthread /usr/lib/libxml2.a -lz   
-lm -lpthread -ldl -L/usr/lib   
gcc: /usr/lib/libxslt.a: No such file or directory   
gcc: /usr/lib/libexslt.a: No such file or directory   
gcc: /usr/lib/libxml2.a: No such file or directory   
make[2]: *** [xml] Error 1   
make[2]: Leaving directory   
`/var/tmp/portage/xmlstarlet-1.0.1/work/xmlstarlet-1.0.1/src'   
make[1]: *** [all-recursive] Error 1   
make[1]: Leaving directory   
`/var/tmp/portage/xmlstarlet-1.0.1/work/xmlstarlet-1.0.1'   
make: *** [all-recursive-am] Error 2   
  
  
libxml2 and libxslt seem to have stopped installing their static lib which 
xmlstarlet needs for static linking of both. 

Reproducible: Always
Steps to Reproduce:
1. Have up-to-date system with libxml2 and libxslt 
2. (re)emerge xmlstarlet 
or 
1. Install new gentoo system 
2. emerge xmlstarlet (which pulls in libxml2 and libxslt as dependency) 
Actual Results:  
xmlstarlet compilation fails 

Expected Results:  
Succeeding compilation 

Either xmlstarlet should be changed to not link statically agains libxml2 and 
libxslt anymore, or libxml2 and libxslt should install the static libs again.
Comment 1 Andy Kissner 2005-10-02 15:06:34 UTC
I know this doesn't really count as a fix, per s
Comment 2 Andy Kissner 2005-10-02 15:06:34 UTC
I know this doesn't really count as a fix, per sé, but if you re-merge libxslt
and libxml2 with USE="static" it works fine.
Comment 3 Andy Kissner 2005-10-18 12:13:05 UTC
http://bugs.gentoo.org/show_bug.cgi?id=109455 seems to be a duplicate of this one.
Comment 4 Mark D. 2005-11-10 15:31:17 UTC
Ya that (USE="static") worked for me too.

Without static xmlstarlet-1.0.1 would compile with the same error message as above.

This ebuild definitely needs to be fixed to check if libxml2 and libxslt were
compiled with the _static_ use variable on. Or some other fix...
Comment 5 Mike Summers 2005-11-17 17:00:15 UTC
xmlstartlet doesn't look like it requires static libs.

I modified configure and configure.ini to use shared libs, rebuilt the digest,
emerged and ran this test successfully:

xml sel --net -t -m "//item" -o "Title: " -v "title" -n    -o "Author: " -v
"author" -n  http://arstechnica.com/index.ars/rss
Comment 6 John Mylchreest (RETIRED) gentoo-dev 2006-02-28 03:20:13 UTC
this is purely an issue with includes.
So, 3 months on and we still have a problem.
Guys do we have any solution to this?
Comment 7 John Mylchreest (RETIRED) gentoo-dev 2006-03-03 14:34:52 UTC
Hi Leonardo, are you able to put any input into the bug please?
Comment 8 Leonardo Boshell (RETIRED) gentoo-dev 2006-03-03 15:27:07 UTC
xmlstarlet is not really my package, but I understand that this started to happen after the 'static' flag was introduced in libxml2 and libxslt (which turns out to be incorrect).

Unfortunately libxslt still hasn't been fixed in this regard, but regardless of that, the clean solution would be to fix xmlstarlet to stop depending on the .a files. If Mike could attach the patch he mentions on comment #4 I'd be happy to test it and commit it.

(removing myself from CC list since I'm in the text-markup alias as well)
Comment 9 Sam Jacobson 2006-03-10 03:50:29 UTC
(In reply to comment #7)
> If Mike could attach the patch he mentions on comment #4 I'd be happy to
> test it and commit it.

I had the same problem, but fixed it slightly differently. Following is (the very short) diff to the ebuild:

--- /usr/portage/app-text/xmlstarlet/xmlstarlet-1.0.1.ebuild    2005-06-02 18:35:24.000000000 +1200
+++ /usr/local/portage/app-text/xmlstarlet/xmlstarlet-1.0.1.ebuild      2006-03-11 00:33:24.000000000 +1300
@@ -22,7 +22,8 @@

 src_compile() {
        append-ldflags -lgcrypt
-       econf || die
+       LIBXSLT_LIBS="-lxslt -lexslt -lz -lm -lpthread" LIBXML_LIBS="-lxml2 -lz -lm -lpthread -ldl" econf || die
        emake || die
 }

This will cause the package xmlstarlet to dynamically link with libxml2 and lib(e)xslt.

I personally think this is an upstream bug. I fail to understand why it must link statically.
Comment 10 Mamoru KOMACHI (RETIRED) gentoo-dev 2006-03-24 04:21:30 UTC
I fixed xmlstarlet ebuilds wrt comment #8.
Me thinks this is an upstream bug, too.
Thanks for the bug report and patch.