Bug #1109
archlinux libwww linker error
Status: | Closed | Start date: | 09/30/2010 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | rti | % Done: | 100% |
|
Category: | Build | |||
Target version: | Version 0.8.0 |
Description
beacuse archlinux libwww package doesn't follow some link convention, the build of ryzom core failes with a libxmlparse linker error.
i added a patch to fix it (add libexpat directly to the linker command for ryzom_client)
Related issues
History
#1 Updated by Krolock almost 5 years ago
same issue on opensuse :(
#2 Updated by kervala almost 5 years ago
Please could you tell me what libwww library is depending on expat ?
I don't like overlinking so I will search a way to detect dependencies with tools like objdump.
#3 Updated by kervala almost 5 years ago
Or better, could you type:
objdump -T <full path of your lib> | grep "*UND*"
#4 Updated by Krolock almost 5 years ago
i'm not sure if this changes the situation, but I get some "unresolved symbols" errors about XML parsing after client compilation. So I think on other distributions libexpat is linked by some libwww libraries. But this is not working on opensuse and archlinux. The solution is to manually link it in the cmake script.
#5 Updated by kervala almost 5 years ago
Overlinking is not the the solution:
http://wiki.mandriva.com/en/Overlinking
And Lintian will complain about this.
To prevent "unresolved symbols" you need to link all your libs with --no-undefined, we did that for Ryzom and NeL but 3rd-party libs don't always make that.
Example: If libpng is using libz, it must be linked to, an application which uses libpng shouldn't need to link to libz.
Some distributions always compile all their packages with --as-needed and/or --no-undefined, so they avoid this kind of errors.
#6 Updated by Krolock almost 5 years ago
objdump -T /usr/lib/libxml2.so | grep "*UND*"
#7 Updated by Krolock almost 5 years ago
gnaahh, sorry, perhaps this was the wrong lib :/
#8 Updated by flocke almost 5 years ago
I think it was libxmlparse which produced the linker error without linking to expat.
objdump -T /usr/lib/libxmlparse.so | grep "*UND*"
#9 Updated by kervala almost 5 years ago
Yep, you're right :)
I made a CMake macro yesterday and it can detects if we need to manually link to it or not :)
So it should fix all your problems :)
#10 Updated by flocke almost 5 years ago
Is it in the hg repo already ?
Because there seem to be no changes since my (failed) last try yesterday ;)
#11 Updated by kervala almost 5 years ago
No, I need to do more checks :(
I put there another link for reference :
#12 Updated by kervala almost 5 years ago
- Category set to Build
- Status changed from New to Validated
#13 Updated by kervala almost 5 years ago
After checking libwww code, it seems like libwwwxml.so should be linked to libxmlparse.so which belongs to libwww package :) libxmlparse.so is similar to expat (it uses most of its code).
#14 Updated by kervala almost 5 years ago
- Status changed from Validated to Assigned
- Assignee set to kervala
#15 Updated by kervala almost 5 years ago
Please could you try with last changes ?
It should work but perhaps it needs some little tweaks.
#16 Updated by flocke almost 5 years ago
I would like to test it but now it fails at 79% with this msg:
[ 79%] Building CXX object ryzom/client/src/CMakeFiles/ryzom_client.dir/interface_v3/view_text.cpp.o /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp: In member function ‘void CViewText::setupDefault()’: /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp:80:21: error: ‘numeric_limits’ is not a member of ‘std’ /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp:80:45: error: expected primary-expression before ‘>’ token /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp:80:52: error: no matching function for call to ‘max()’ /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp: In member function ‘void CViewText::disableStringSelection()’: /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp:1798:21: error: ‘numeric_limits’ is not a member of ‘std’ /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp:1798:45: error: expected primary-expression before ‘>’ token /home/flocke/build/ryzom/code/ryzom/client/src/interface_v3/view_text.cpp:1798:52: error: no matching function for call to ‘max()’ make[2]: *** [ryzom/client/src/CMakeFiles/ryzom_client.dir/interface_v3/view_text.cpp.o] Error 1 make[1]: *** [ryzom/client/src/CMakeFiles/ryzom_client.dir/all] Error 2
#17 Updated by kervala almost 5 years ago
Thanks, it's fixed now :)
#18 Updated by ddougher almost 5 years ago
I notice that the error reported here is the same as the one reported in error 1113. A reported fix there was to add
#include <limits>
to the top of the file at the bottom of the other includes. Perhaps you could add that line to view_text.cpp at the top of the code after the other include lines and see if it then compiles - or at least gets past those errors...
#19 Updated by flocke almost 5 years ago
Ok with the newest hg version it works until the linking:
Linking CXX executable ../../../bin/ryzom_client /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwgopher.so: undefined reference to `HTIcon_alternative' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addDir' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTStreamToChunk' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTFWriter_new' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_add' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwmime.so: undefined reference to `HTPipeBuffer' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwnews.so: undefined reference to `HTBuffer_new' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTSaveLocally' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwhttp.so: undefined reference to `HTTee' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwgopher.so: undefined reference to `HTIcon_find' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwgopher.so: undefined reference to `HTIcon_url' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwfile.so: undefined reference to `HTDir_free' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTSaveAndExecute' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwfile.so: undefined reference to `HTDir_addElement' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTGuess_new' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addParent' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwfile.so: undefined reference to `HTDir_new' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwmime.so: undefined reference to `HTMerge' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addBlank' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addUnknown' collect2: ld returned 1 exit status make[2]: *** [bin/ryzom_client] Error 1 make[1]: *** [ryzom/client/src/CMakeFiles/ryzom_client.dir/all] Error 2 make: *** [all] Error 2
#20 Updated by flocke almost 5 years ago
This is the part of the cmake output about libwww stuff
-- Warning: Libwww: Library not found: LIBREGEX_LIBRARY -- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libwwwcache.so but is not linked to, manually linking... -- Linking with /usr/lib/libwwwcache.so -- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libwwwftp.so but is not linked to, manually linking... -- Linking with /usr/lib/libwwwftp.so -- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libwwwgopher.so but is not linked to, manually linking... -- Linking with /usr/lib/libwwwgopher.so -- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libwwwnews.so but is not linked to, manually linking... -- Linking with /usr/lib/libwwwnews.so -- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libwwwtelnet.so but is not linked to, manually linking... -- Linking with /usr/lib/libwwwtelnet.so -- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libwwwxml.so but is not linked to, manually linking... -- Linking with /usr/lib/libwwwxml.so -- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libwwwzip.so but is not linked to, manually linking... -- Linking with /usr/lib/libwwwzip.so -- Underlinking found: /usr/lib/libwwwxml.so needs /usr/lib/libxmlparse.so but is not linked to, manually linking... -- Linking with /usr/lib/libxmlparse.so -- Underlinking found: /usr/lib/libwwwxml.so needs /usr/lib/libexpat.so but is not linked to, manually linking... -- Linking with /usr/lib/libexpat.so -- Underlinking found: /usr/lib/libwwwhttp.so needs /usr/lib/libmd5.so but is not linked to, manually linking... -- Linking with /usr/lib/libmd5.so -- Found LibWWW: /usr/lib/libwwwapp.so;/usr/lib/libwwwcore.so;/usr/lib/libwwwfile.so;/usr/lib/libwwwhtml.so;/usr/lib/libwwwhttp.so;/usr/lib/libwwwmime.so;/usr/lib/libwwwtrans.so;/usr/lib/libwwwutils.so;/usr/lib/libwwwcache.so;/usr/lib/libwwwftp.so;/usr/lib/libwwwgopher.so;/usr/lib/libwwwnews.so;/usr/lib/libwwwtelnet.so;/usr/lib/libwwwxml.so;/usr/lib/libwwwzip.so;/usr/lib/libxmlparse.so;/usr/lib/libexpat.so;/usr/lib/libmd5.so
It seems that libwwwstream is missing and this is causing the linker error.
#21 Updated by kervala almost 5 years ago
Thanks a lot for providing us all the necessary details :)
Thanks to you, I will be able to add more checks for undefined symbols :)
#22 Updated by flocke almost 5 years ago
No problem :)
I´m glad I can help you.
Just ask if you need some more details or logs
#23 Updated by kervala almost 5 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset r915.
#24 Updated by flocke almost 5 years ago
I just compiled it and everything worked fine, thanks a lot :)
#25 Updated by kervala almost 5 years ago
- Target version set to Version 0.8.0
#26 Updated by kervala over 4 years ago
- Status changed from Resolved to Closed
#27 Updated by LinuxDonald over 4 years ago
I have now this problem on my lastest ryzom hg version:
[ 83%] Built target ryzom_entities_game_service
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTLoadFTP'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTLoadCache'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTNewsList'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addDir'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwmime.so: undefined reference to `HTCacheMode_enabled'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTStreamToChunk'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTLoadGopher'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTXML_new'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTFWriter_new'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_add'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwmime.so: undefined reference to `HTPipeBuffer'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTSaveLocally'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTNewsGroup'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTCacheWriter'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwhttp.so: undefined reference to `HTTee'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwhttp.so: undefined reference to `MD5Init'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwfile.so: undefined reference to `HTDir_free'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTLoadTelnet'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTSaveAndExecute'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwhttp.so: undefined reference to `MD5Final'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwfile.so: undefined reference to `HTDir_addElement'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTGuess_new'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwhttp.so: undefined reference to `MD5Update'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addParent'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwfile.so: undefined reference to `HTDir_new'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwmime.so: undefined reference to `HTMerge'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addBlank'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTIcon_addUnknown'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTLoadNews'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwmime.so: undefined reference to `HTCache_addHit'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwmime.so: undefined reference to `HTCache_name'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTZLib_inflate'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwmime.so: undefined reference to `HTCache_find'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libwwwapp.so: undefined reference to `HTCacheAppend'
collect2: ld gab 1 als Ende-Status zurück
make2: * [bin/ryzom_client] Fehler 1
make1: [ryzom/client/src/CMakeFiles/ryzom_client.dir/all] Fehler 2
make: ** [all] Fehler 2
#28 Updated by kervala over 4 years ago
Please what warnings do you have when CMake is checking for libwww ?
#29 Updated by HDStephan over 4 years ago
I have the same error as LinuxDonald. I use Archlinux 64bit.
[[-- Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libssl.so;/usr/lib/libcrypto.so but is not linked to, manually linking...
-- Linking with /usr/lib/libssl.so;/usr/lib/libcrypto.so
-- Found LibWWW: /usr/lib/libwwwapp.so;/usr/lib/libwwwcore.so;/usr/lib/libwwwfile.so;/usr/lib/libwwwhtml.so;/usr/lib/libwwwhttp.so;/usr/lib/libwwwmime.so;/usr/lib/libwwwcache.so;/usr/lib/libwwwstream.so;/usr/lib/libwwwtrans.so;/usr/lib/libwwwutils.so;/usr/lib/libssl.so;/usr/lib/libcrypto.so
]]
#30 Updated by flocke over 4 years ago
Seems like all the libs from my post #20 that should be detected manually are missing in this list.
Maybe there is something wrong with the script that detects the underlinking.
#31 Updated by kervala over 4 years ago
Underlinking found: /usr/lib/libwwwapp.so needs /usr/lib/libssl.so;/usr/lib/libcrypto.so but is not linked to, manually linking...
That's not normal.
It should list only one lib not two separated by a semi-column.
#32 Updated by flocke over 4 years ago
This is the value of OPENSSL_LIBRARIES after you called "FIND_PACKAGE(OpenSSL QUIET)" in FindLibwww.cmake.
I just started the build after I made some minor changes in CheckDepends.cmake, I will report if it worked soon.
#33 Updated by flocke over 4 years ago
- File checkdepends_bool.patch added
Ok, my build was successful.
I just switched some BOOL values in CheckDepends.cmake (patch is attached).
You need to check the Windows/Mac parts, I only changed the Unix stuff.
#34 Updated by flocke over 4 years ago
- File checkdepends_bool_v2.patch added
Damn, wrong patch, the one I uploaded reverts my changes :D
#35 Updated by HDStephan over 4 years ago
i can confirm. with the last patch from flocke all works great :)
#36 Updated by LinuxDonald about 4 years ago
It works for me too :) Thank you :)
#37 Updated by rti about 4 years ago
- File deleted (
checkdepends_bool.patch)
#38 Updated by rti about 4 years ago
It indeed needs some rethinking for windows. After your patch it reads:
[...] SET(${SYMBOL_FOUND} FALSE) IF(WIN32) # Always TRUE under Windows because we are using static libraries ELSEIF(APPLE) [...]
... which might lead to problems.
#39 Updated by sfb about 4 years ago
- Status changed from Closed to Assigned
- Assignee changed from kervala to rti
Re-opening for rti.
#40 Updated by rti about 4 years ago
Could you please recheck if the current version (r1423) works for you without patching?
#41 Updated by rti about 4 years ago
- Status changed from Assigned to Feedback
- % Done changed from 100 to 90
#42 Updated by flocke about 4 years ago
It works for me, I just compiled it without the patch!
#43 Updated by rti about 4 years ago
Ok thanks for reporting back!
And thanks a lot for your patch. Is was a great inspiration :)
#44 Updated by flocke about 4 years ago
No problem, I don't play Ryzom anymore but I 'm glad I can help.
You can always ask me if you need some testing on an Archlinux system ;)
#45 Updated by rti about 4 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
Sad to hear that. But thanks for your offer!
#46 Updated by flocke about 4 years ago
I think I will start playing again in the future, right now I don't have the money and time ;)