Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got an app which won't link, giving error:

/usr/lib64/libcroco-0.6.so.3: undefined reference to `xmlGetProp@LIBXML2_2.4.30'
/usr/lib64/libcroco-0.6.so.3: undefined reference to `xmlFree@LIBXML2_2.4.30'
/usr/lib64/libcroco-0.6.so.3: undefined reference to `xmlHasProp@LIBXML2_2.4.30'

I've got libxml installed:

libxml++.x86_64                  2.33.2-1.fc15      @koji-override-    0/$releasever
libxml++-devel.x86_64            2.33.2-1.fc15      @fedora                     
libxml2.i686                     2.7.8-6.fc15       @fedora                     
libxml2.x86_64                   2.7.8-6.fc15       @koji-override-0/$releasever
libxml2-devel.x86_64             2.7.8-6.fc15       @fedora                     
libxml2-python.x86_64            2.7.8-6.fc15       @koji-override-0/$releasever

Any ideas? Maybe libcroco was compiled with older version and I need older libxml installed?

share|improve this question
    
Show us the linker command line, and the output of ldd /usr/lib64/libcroco-0.6.so.3. –  Gilles Jul 22 '11 at 13:16
    
thanks, libcroco was looking for libxml in a strange place :) works now... –  Marin Jul 22 '11 at 13:44
add comment

2 Answers

up vote 2 down vote accepted

The only thing I can think of is that the .so files aren't in a directory the linker looks for libraries in. Can you find out where the file libxml2.so resides, and then put that directory on the link command line with a -L ?

share|improve this answer
    
yeah, for some reason, libcroco was looking for the file in the absolutely wrong place :) –  Marin Jul 22 '11 at 13:44
add comment

Although is a versioned symbol it still seems to be the current, linkable, version of the symbol in 2.7.8 as far as I can see.

I take it you do have -lxml2 on your link line? If you're relying on linking to libcroco pulling it in then that won't work on recent Fedora releases and you will need to link against it directly.

share|improve this answer
    
yes, i've got -lxml2... –  Marin Jul 22 '11 at 13:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.