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 667945 - Using new libxml2-2.7.8 causes xmlXPathCompExprPtr error on CentOS 5.7
Using new libxml2-2.7.8 causes xmlXPathCompExprPtr error on CentOS 5.7
Status: RESOLVED NOTABUG
Product: libxslt
Classification: Platform
Component: general
1.1.26
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-15 05:14 UTC by Bradford Sturtevant
Modified: 2013-08-04 15:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Output of ./configure attached (66.72 KB, text/x-log)
2012-01-15 05:14 UTC, Bradford Sturtevant
Details

Description Bradford Sturtevant 2012-01-15 05:14:45 UTC
Created attachment 205288 [details]
Output of ./configure attached

I am getting compile errors on CentOS 5.7 (at bottom of report) during make of libxslt-1.1.26 with shared libxml2-2.7.8 and zlib1.2.5. Maybe the new libxml is protecting xmlXPathCompExprPtr now? I saw this:

cd ~/libxml2-2.7.8; find . -name "*.h" -exec grep -Hi "xmlXPathFreeCompExpr" {} \;
./elfgcchack.h:#undef xmlXPathFreeCompExpr
./elfgcchack.h:extern __typeof (xmlXPathFreeCompExpr) xmlXPathFreeCompExpr __attribute((alias("xmlXPathFreeCompExpr__internal_alias")));
./elfgcchack.h:#ifndef xmlXPathFreeCompExpr
./elfgcchack.h:extern __typeof (xmlXPathFreeCompExpr) xmlXPathFreeCompExpr__internal_alias __attribute((visibility("hidden")));
./elfgcchack.h:#define xmlXPathFreeCompExpr xmlXPathFreeCompExpr__internal_alias
./include/libxml/xpath.h:                   xmlXPathFreeCompExpr        (xmlXPathCompExprPtr comp);

Just below is how I do the configure(s), make(s) for all my shared libs. I made some notes were I had to fix little things--any use of "env LIBS='-lz'" causes imediate error that is interesting--I use LDLIBS in general and that works, but your help files lead me to LIBS when struggling.

libxml2-2.7.8
-------------
wget ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz
tar xzf libxml2-2.7.8.tar.gz;  cd libxml2-2.7.8
Edit ./configure.in -- fix 'inttypes.h.h' problem
env CPPFLAGS='-I/opt/zlib1.2.5/lib -I/opt/readline6.2/include' LDFLAGS='-L/opt/zlib1.2.5/lib -L/opt/readline6.2/lib -Wl,-rpath,/opt/libxml2-2.7.8/lib -Wl,-rpath,/opt/zlib1.2.5/lib -Wl,-rpath,/opt/readline6.2/lib' LDLIBS='-lz -lreadline' ./configure --prefix=/opt/libxml2-2.7.8 --with-zlib=/opt/zlib1.2.5 --with-readline=/opt/readline6.2 --with-gnu-ld=yes --enable-ipv6=no --with-minimum=yes 
Edit xmllint.c -- fix #endif /* LIBXML_OUTPUT_ENABLED */ mv down 5 lines
Skip --with-python because it will not compile with 2.6.2 or 2.7.2
make; sudo make install
[build@developer1 libxml2-2.7.8]$ ldd .libs/libxml2.so.2.7.8 
        linux-gate.so.1 =>  (0x002e9000)
        libz.so.1 => /opt/zlib1.2.5/lib/libz.so.1 (0x005db000)
        libm.so.6 => /lib/libm.so.6 (0x00110000)
        libc.so.6 => /lib/libc.so.6 (0x002ea000)
        /lib/ld-linux.so.2 (0x007c6000)
Neither libxml2 or readline ever make it in to -RPATH of elf

libxslt-1.1.26
--------------
sudo yum install libgcrypt-devel
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
tar xzf libxslt-1.1.26.tar.gz;  cd libxslt-1.1.26
env CFLAGS='-Os' CPPFLAGS='-I/opt/zlib1.2.5/lib' LDFLAGS='-L/opt/zlib1.2.5/lib -Wl,-rpath,/opt/libxslt-1.1.26/lib -Wl,-rpath,/opt/libxml2-2.7.8/lib -Wl,-rpath,/opt/zlib1.2.5 ' LDLIBS='-llibxml2 -lz' ./configure --prefix=/opt/libxslt-1.1.26 --with-libxml-prefix=/opt/libxml2-2.7.8 --with-libxml-include-prefix=/opt/libxml2-2.7.8/include/libxml2 --with-libxml-libs-prefix=/opt/libxml2-2.7.8/lib


[build@developer1 libxslt-1.1.26]$ make
make  all-recursive
make[1]: Entering directory `/home/build/libxslt-1.1.26'
Making all in libxslt
make[2]: Entering directory `/home/build/libxslt-1.1.26/libxslt'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/opt/libxml2-2.7.8/include/libxml2 -I/opt/libxml2-2.7.8/include/libxml2  -I/opt/zlib1.2.5/lib  -Os -Wall -MT attrvt.lo -MD -MP -MF .deps/attrvt.Tpo -c -o attrvt.lo attrvt.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../libxslt -I/opt/libxml2-2.7.8/include/libxml2 -I/opt/libxml2-2.7.8/include/libxml2 -I/opt/zlib1.2.5/lib -Os -Wall -MT attrvt.lo -MD -MP -MF .deps/attrvt.Tpo -c attrvt.c  -fPIC -DPIC -o .libs/attrvt.o
In file included from xsltutils.h:23,
                 from attrvt.c:26:
xsltInternals.h:355: error: expected specifier-qualifier-list before ‘xmlXPathCompExprPtr’
xsltInternals.h:1411: error: expected specifier-qualifier-list before ‘xmlXPathCompExprPtr’
xsltInternals.h:1434: error: expected specifier-qualifier-list before ‘xmlXPathObjectPtr’
xsltInternals.h:1694: error: expected specifier-qualifier-list before ‘xmlNodeSetPtr’
xsltInternals.h:1863: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xsltFormatNumberConversion’
xsltInternals.h:1892: error: expected declaration specifiers or ‘...’ before ‘xmlXPathObjectPtr’
In file included from attrvt.c:26:
xsltutils.h:178: error: expected ‘)’ before ‘list’
xsltutils.h:192: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
xsltutils.h:243: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘xsltXPathCompile’
In file included from attrvt.c:28:
templates.h:25: error: expected declaration specifiers or ‘...’ before ‘xmlXPathCompExprPtr’
templates.h:47: error: expected declaration specifiers or ‘...’ before ‘xmlXPathCompExprPtr’
templates.h:50: error: expected declaration specifiers or ‘...’ before ‘xmlXPathCompExprPtr’
attrvt.c: In function ‘xsltFreeAttrVT’:
attrvt.c:105: warning: implicit declaration of function ‘xmlXPathFreeCompExpr’
attrvt.c:105: error: ‘xmlXPathCompExprPtr’ undeclared (first use in this function)
attrvt.c:105: error: (Each undeclared identifier is reported only once
attrvt.c:105: error: for each function it appears in.)
attrvt.c:105: error: expected ‘)’ before ‘avt’
attrvt.c:108: error: expected ‘)’ before ‘avt’
attrvt.c: In function ‘xsltCompileAttr’:
attrvt.c:212: warning: implicit declaration of function ‘xmlGetNsList’
attrvt.c:212: warning: assignment makes pointer from integer without a cast
attrvt.c:274: error: ‘xmlXPathCompExprPtr’ undeclared (first use in this function)
attrvt.c:274: error: expected ‘;’ before ‘comp’
attrvt.c:276: error: ‘comp’ undeclared (first use in this function)
attrvt.c:276: warning: implicit declaration of function ‘xsltXPathCompile’
attrvt.c: In function ‘xsltEvalAVT’:
attrvt.c:361: error: ‘xmlXPathCompExprPtr’ undeclared (first use in this function)
attrvt.c:361: error: expected ‘;’ before ‘comp’
attrvt.c:373: error: ‘comp’ undeclared (first use in this function)
attrvt.c:373: error: expected ‘;’ before ‘cur’
attrvt.c:374: warning: passing argument 3 of ‘xsltEvalXPathStringNs’ makes pointer from integer without a cast
attrvt.c:374: error: too many arguments to function ‘xsltEvalXPathStringNs’
make[2]: *** [attrvt.lo] Error 1
make[2]: Leaving directory `/home/build/libxslt-1.1.26/libxslt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/build/libxslt-1.1.26'
make: *** [all] Error 2


I have been using the "env CFLAGS='-Os'" to shrink my shared libs when something like the libxml2 --with-minimum=yes isn't around. Will be using python bindings from RPMs because not building on libxml2.
wget http://rpm.eprints.org/RHEL/5/i386/libxml2-python-2.7.8-1.i386.rpm
rpm2cpio ./libxml2-python-2.7.8-1.i386.rpm | cpio -i --make-directories
wget http://rpm.eprints.org/RHEL/5/i386/libxslt-python-1.1.26-1.i386.rpm
rpm2cpio ./libxslt-python-1.1.26-1.i386.rpm | cpio -i --make-directories
cp to my /opt directories.

Thanks for providing these incredible libraries,
Brad
Comment 1 Nick Wellnhofer 2013-08-04 15:45:34 UTC
You built libxml2 with the "--with-minimum" option which disables XPath. This can't work because libxslt needs XPath support. Try something like "--with-minimum --with-xpath". Then you probably have to manually enable other libxml2 features needed by libxslt.