VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: SOLVED compilation error xmlstarlet-1.0.1  (Read 2877 times)

bad_gui

  • Member
  • *
  • Posts: 61
SOLVED compilation error xmlstarlet-1.0.1
« on: July 04, 2009, 08:50:38 pm »

I ran ./configure with no errors

When I run make I get this error message

Quote
/usr/lib/libexslt.a(crypto.o): In function `exsltCryptoGcryptInit':
crypto.c:(.text+0x1dc): undefined reference to `gcry_check_version'


The function gcry_check_version is in libgcrypt which I find already installed on VL5.9


I found this on the web but don't know how to implement the manual linking fix in VL.  Can I
install libtool now or would I need to rebuild the libs from scratch?

http://lists.alioth.debian.org/pipermail/debian-xml-sgml-pkgs/2004-October/000455.html

Quote
On Wed, Sep 29, 2004 at 12:23:47PM -0500, Alex Mauer wrote:
> On Wed, 2004-09-29 at 10:29 +0900, Mike Hommey wrote:
> libgcypt7-dev is not installed.  The program in question statically
> links against libexslt.a; the change now requires it to also link
> against libgcrypt.a and libgpg-error.a.  Is this something that it needs
> to check for?  It seems to be that it should not be, since libgcrypt and
> libgpg-error are not otherwise needed to link against libxslt.

libexslt has now a crypto functionnality which need to use libgcrypt.
The static version then has to link all the static libraries needed.
If you use libtool for linking, there should not be any problem, it uses
the .la files to get all the dependency chain. If you don't, then, you
have to add libgcrypt and whatever else is needed to your link command.
The bug doesn't belong to libxslt1, thus closing the bug.

Mike

I modified the configure script because it couldn't find aclocal-1.4.  I have aclocal-1.9.6
so I changed the script so that it now finds aclocal (previously it reported "missing")
but make still fails with the same error

Quote
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal-1.9... found
checking for working autoconf... found
checking for working automake-1.9... found
checking for working autoheader... found
checking for working makeinfo... found
« Last Edit: July 05, 2009, 11:10:57 am by bad_gui »
Logged

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: compilation error xmlstarlet-1.0.1
« Reply #1 on: July 05, 2009, 12:46:00 am »

I was able to use the slackbuild below to build this on VL60, may work for 5.9 as well.

http://slackbuilds.org/repository/12.2/development/xmlstarlet/

Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

bad_gui

  • Member
  • *
  • Posts: 61
SOLVED compilation error xmlstarlet-1.0.1
« Reply #2 on: July 05, 2009, 11:10:23 am »

Thanks for the suggestion but I want to learn how to fix the problem here rather than
install a workaround version.  I may not have that option the next time I encounter a
situation like this.

After more Google, I found this fix http://bbs.archlinux.org/viewtopic.php?id=55564
which switches from the static to the shared version of the libraries

I changed the src/Makefile line as follows

from
Code: [Select]
LIBXSLT_LIBS = /usr/lib/libxslt.a /usr/lib/libexslt.a -lz -lm -lpthread

LDADDS =   /usr/lib/libxslt.a /usr/lib/libexslt.a -lz -lm -lpthread -lxml2 -lz -lm -lpthread -ldl -L/usr/lib $(EXTRA_LIBS)

to
Code: [Select]
LIBXSLT_LIBS = -lxslt -lexslt -lz -lm -lpthread

LDADDS =   -lxslt -lexslt -lz -lm -lpthread -lxml2 -lz -lm -lpthread -ldl -L/usr/lib $(EXTRA_LIBS)

« Last Edit: July 05, 2009, 02:31:15 pm by bad_gui »
Logged

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: SOLVED compilation error xmlstarlet-1.0.1
« Reply #3 on: July 05, 2009, 03:05:56 pm »

Quote
Thanks for the suggestion but I want to learn how to fix the problem here rather than
install a workaround version.  I may not have that option the next time I encounter a
situation like this.

I agree with you. Learning the fix is the most satisfying part. The Slackbuilds are good for that too.
Just download the slackbuild script and you can see the commands used inside it.  They are the same as what you would use in a terminal when you install it to your system.

For example in the link I sent you this is how the build was done in the script.

Code: [Select]
/configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man

sed -i 's/pthread/pthread -lgcrypt/' src/Makefile

# Compile the application and install it into the $PKG directory
make
make install

It's just another method of doing what you managed to by searching the internet and the archlinux bulletin board. It has one advantage though.  When you start getting good at slackbuilds you can then start packaging.  That way you would be able to solve the xmlstarlet problem for all vl-users by making it available as a .tlz in the repository.

Anyway, I'm babbling.  Glad you found your solution.  Good work.
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

bad_gui

  • Member
  • *
  • Posts: 61
Re: SOLVED compilation error xmlstarlet-1.0.1
« Reply #4 on: July 06, 2009, 05:41:37 pm »

Thanks for the tip!  I wrongly assumed the workaround was complex and now I see that it
is just a simple sed statement that I could have run from command line.


Logged