Linking error while compiling server/client from source on CentOS

Added by virajithj almost 8 years ago

Hi,

I am trying to compile Ryzom from source on CentOS. I was able to successfully do a "./configure" and "cmake" after installing most of the dependencies using their source code and some of them using yum. When tried to do a make, I got the following error:

=================================================================================================
Linking CXX executable ../../../bin/ryzom_client
/usr/local/lib/libwwwapp.so: undefined reference to `HTLoadFTP'
/usr/local/lib/libwwwapp.so: undefined reference to `HTLoadCache'
/usr/local/lib/libwwwapp.so: undefined reference to `HTNewsList'
/usr/local/lib/libwwwapp.so: undefined reference to `HTIcon_addDir'
/usr/local/lib/libwwwmime.so: undefined reference to `HTCacheMode_enabled'
/usr/local/lib/libwwwapp.so: undefined reference to `HTStreamToChunk'
/usr/local/lib/libwwwapp.so: undefined reference to `HTLoadGopher'
/usr/local/lib/libwwwapp.so: undefined reference to `HTXML_new'
/usr/local/lib/libwwwapp.so: undefined reference to `HTFWriter_new'
/usr/local/lib/libwwwapp.so: undefined reference to `HTIcon_add'
/usr/local/lib/libwwwmime.so: undefined reference to `HTPipeBuffer'
/usr/local/lib/libwwwapp.so: undefined reference to `HTSaveLocally'
/usr/local/lib/libwwwapp.so: undefined reference to `HTNewsGroup'
/usr/local/lib/libwwwapp.so: undefined reference to `HTCacheWriter'
/usr/local/lib/libwwwhttp.so: undefined reference to `HTTee'
/usr/local/lib/libwwwhttp.so: undefined reference to `MD5Init'
/usr/local/lib/libwwwfile.so: undefined reference to `HTDir_free'
/usr/local/lib/libwwwapp.so: undefined reference to `HTLoadTelnet'
/usr/local/lib/libwwwapp.so: undefined reference to `HTSaveAndExecute'
/usr/local/lib/libwwwhttp.so: undefined reference to `MD5Final'
/usr/local/lib/libwwwfile.so: undefined reference to `HTDir_addElement'
/usr/local/lib/libwwwapp.so: undefined reference to `HTGuess_new'
/usr/local/lib/libwwwhttp.so: undefined reference to `MD5Update'
/usr/local/lib/libwwwapp.so: undefined reference to `HTIcon_addParent'
/usr/local/lib/libwwwfile.so: undefined reference to `HTDir_new'
/usr/local/lib/libwwwmime.so: undefined reference to `HTMerge'
/usr/local/lib/libwwwapp.so: undefined reference to `HTIcon_addBlank'
/usr/local/lib/libwwwapp.so: undefined reference to `HTIcon_addUnknown'
/usr/local/lib/libwwwapp.so: undefined reference to `HTLoadNews'
/usr/local/lib/libwwwmime.so: undefined reference to `HTCache_addHit'
/usr/local/lib/libwwwmime.so: undefined reference to `HTCache_name'
/usr/local/lib/libwwwmime.so: undefined reference to `HTCache_find'
/usr/local/lib/libwwwapp.so: undefined reference to `HTCacheAppend'
collect2: ld returned 1 exit status
make2: * [bin/ryzom_client] Error 1
make1:
[ryzom/client/src/CMakeFiles/ryzom_client.dir/all] Error 2
make: *
* [all] Error 2

=================================================================================================

I installed w3c-libwww from source code as well with a "./configure & make & make install". Can some one help out with this issue?

Thanks a lot
Virajith


Replies (2)

RE: Linking error while compiling server/client from source on CentOS - Added by rti almost 8 years ago

This happens because the libwww sub-libraries are not properly linked together.
This is even the case on some distributions providing it as a binary package.

Kervala build a detection mechanism for that. Seems like it does not work for you. So he might be interested in some details. :)
Here is the ticket for that issue #1152.

As a quick fix, you can open up FindLibWWW.cmake and change some "OPTIONAL"s to "REQUIRED".
Seeing the missing symbols you posted this should be libwwwcache, libwwwnews, libwwwftp, libwwwstream and libwwwxml.
Those might not be all of the though.

RE: Linking error while compiling server/client from source on CentOS - Added by kervala almost 8 years ago

I suspect CheckDepends.cmake script is not working well under CentOS. I will have to check it myself if nobody can fix it :(

Else you could try with : ./configure --with-ssl=yes --with-zlib --with-expat --with-gnu-ld --enable-shared

(1-2/2)