libwww linker error

Added by flocke almost 5 years ago

If I try to build the hg version of the client on my archlinux (64bit) machine it fails with a linker error (at 100% while linking 'ryzom_client'):

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwhttp.so: undefined reference to `MD5Init'

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwhttp.so: undefined reference to `MD5Final'

/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwhttp.so: undefined reference to `MD5Update'

I found some infos on google about this, and it seems to happen if libmd5 is not linked.
I don´t know very much about cmake/Makefiles but running cmake shows that libmd5 is found:

Found LibWWW: /usr/lib/libmd5.so;/usr/lib/libwwwapp.so;/usr/lib/libwwwcache.so;/usr/lib/libwwwcore.so;/usr/lib/libwwwdir.so;/usr/lib/libwwwfile.so;/usr/lib/libwwwftp.so;/usr/lib/libwwwgopher.so;/usr/lib/libwwwhtml.so;/usr/lib/libwwwhttp.so;/usr/lib/libwwwinit.so;/usr/lib/libwwwmime.so;/usr/lib/libwwwmux.so;/usr/lib/libwwwnews.so;/usr/lib/libwwwstream.so;/usr/lib/libwwwtelnet.so;/usr/lib/libwwwtrans.so;/usr/lib/libwwwutils.so;/usr/lib/libwwwxml.so;/usr/lib/libwwwzip.so;/usr/lib/libexpat.so

So I have no idea what could cause this (I use the official archlinux 'libwww' package from the [community] repo).


Replies (3)

RE: libwww linker error - Added by kervala almost 5 years ago

Archlinux libwww package doesn't follow some link convention. libwwwhttp should be linked to libmd5 itself so an application which uses it doesn't need to be linked to libmd5. So we had to tweak our cmake scripts especially for archlinux...

PLease could you use "make VERBOSE=1" to see the link command and try to put the -lmd5 at the end if it's put at the beginning ? Thanks.

RE: libwww linker error - Added by flocke almost 5 years ago

Ok, if I put the -lm5 after the -lwww... stuff it seems to work.
Should I fix it in the cmake scripts localy or will you do some hg-commit fixing it ?

RE: libwww linker error - Added by kervala almost 5 years ago

Thanks for checking and confirming it was that :) I will fix it :)

Thanks again :)

(1-3/3)