Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 418349 - games-board/pokerth-0.9.4: link fails with undefined reference to ssl
Summary: games-board/pokerth-0.9.4: link fails with undefined reference to ssl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-31 09:17 UTC by Alexander Stein
Modified: 2012-08-21 19:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (log,329.10 KB, text/plain)
2012-05-31 09:17 UTC, Alexander Stein
Details
pokerth-0.9.5-underlinking.patch (pokerth-0.9.5-underlinking.patch,376 bytes, patch)
2012-08-16 22:54 UTC, Julian Ospald
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Stein 2012-05-31 09:17:37 UTC
Created attachment 313683 [details]
build.log

I need to recompile pokerth due to boost update and the link step fails:
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -L/usr/lib64/boost-1_48 -o bin/pokerth_server obj/pokerth_server.o obj/nonqttoolswrapper.o obj/nonqthelper.o obj/net_helper_server.o obj/loghelper_server.o obj/ircthread.o obj/servermanagerirc.o obj/servermanagerfactoryserver.o obj/convhelper.o    -Llib -L/usr/lib -L/opt/gsasl/lib -L/usr/lib64/qt4 -lpokerth_lib -lpokerth_db -lpokerth_protocol -lcurl -lircclient -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_iostreams-mt -lboost_regex-mt -lboost_random-mt -lboost_system-mt -lsqlite3 -ltinyxml -lgsasl -lgcrypt -lpthread 
/usr/lib/libircclient.a(libircclient.o): In function `ssl_send':
(.text+0x115): undefined reference to `ERR_clear_error'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_send':
(.text+0x12e): undefined reference to `SSL_write'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_send':
(.text+0x153): undefined reference to `SSL_get_error'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_send':
(.text+0x166): undefined reference to `ERR_get_error'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_recv':
(.text+0x1dd): undefined reference to `ERR_clear_error'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_recv':
(.text+0x1f6): undefined reference to `SSL_read'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_recv':
(.text+0x223): undefined reference to `SSL_get_error'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_recv':
(.text+0x236): undefined reference to `ERR_get_error'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x3e8): undefined reference to `SSL_new'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x407): undefined reference to `SSL_set_fd'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x431): undefined reference to `SSL_load_error_strings'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x436): undefined reference to `CRYPTO_num_locks'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x498): undefined reference to `CRYPTO_set_id_callback'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x4a2): undefined reference to `CRYPTO_set_locking_callback'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x4a7): undefined reference to `SSL_library_init'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x4b4): undefined reference to `RAND_status'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x4c1): undefined reference to `SSLv23_method'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x4c9): undefined reference to `SSL_CTX_new'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x4ed): undefined reference to `SSL_CTX_ctrl'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x509): undefined reference to `SSL_CTX_set_cipher_list'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x526): undefined reference to `SSL_CTX_ctrl'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x53c): undefined reference to `SSL_CTX_set_verify'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x551): undefined reference to `SSL_CTX_ctrl'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x56b): undefined reference to `SSL_CTX_ctrl'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x58b): undefined reference to `SSL_set_connect_state'
/usr/lib/libircclient.a(libircclient.o): In function `ssl_init':
(.text+0x5a3): undefined reference to `SSL_CTX_set_verify'
collect2: ld returned 1 exit status
make[1]: *** [bin/pokerth_server] Error 1
make[1]: Leaving directory `/var/tmp/portage/games-board/pokerth-0.9.4/work/PokerTH-0.9.4-src'

The same is for version 0.9.1. It seems pokerth does not link explicitly against openssl.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2012-05-31 14:21:22 UTC
Looks like you need to rebuild libircclient
Comment 2 Alexander Stein 2012-06-01 06:36:47 UTC
I've done that, but it doesn't change anything. Well, it contains effectively only /usr/lib64/libircclient.a which doesn't have it's own dependencies.
Comment 3 Alexander Stein 2012-06-01 07:18:04 UTC
A workaround to get pokerth compiling is to use USE="-ssl" for libircclient. But  well, you won't get any SSL support.
Comment 4 cyberbat 2012-06-13 17:54:47 UTC
I'm not skilled in all this coding stuff, but I've just taken eroneous command:
x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -L/usr/lib64/boost-1_48 -o bin/pokerth_server obj/pokerth_server.o obj/nonqttoolswrapper.o obj/nonqthelper.o obj/net_helper_server.o obj/loghelper_server.o obj/ircthread.o obj/servermanagerirc.o obj/servermanagerfactoryserver.o obj/convhelper.o    -Llib -L/usr/lib -L/opt/gsasl/lib -L/usr/lib64/qt4 -lpokerth_lib -lpokerth_db -lpokerth_protocol -lcurl -lircclient -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_iostreams-mt -lboost_regex-mt -lboost_random-mt -lboost_system-mt -lsqlite3 -ltinyxml -lgsasl -lgcrypt -lpthread

and added -lssl at end of it, so

x86_64-pc-linux-gnu-g++ -Wl,-O1 -Wl,--as-needed -L/usr/lib64/boost-1_48 -o bin/pokerth_server obj/pokerth_server.o obj/nonqttoolswrapper.o obj/nonqthelper.o obj/net_helper_server.o obj/loghelper_server.o obj/ircthread.o obj/servermanagerirc.o obj/servermanagerfactoryserver.o obj/convhelper.o    -Llib -L/usr/lib -L/opt/gsasl/lib -L/usr/lib64/qt4 -lpokerth_lib -lpokerth_db -lpokerth_protocol -lcurl -lircclient -lboost_thread-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_iostreams-mt -lboost_regex-mt -lboost_random-mt -lboost_system-mt -lsqlite3 -ltinyxml -lgsasl -lgcrypt -lpthread -lssl

and it have finished correctly.
Comment 5 cyberbat 2012-06-13 18:09:58 UTC
Don't know how to make ebuild add it while emerging. Devs can you help?
Comment 6 Alexander Stein 2012-06-14 06:18:57 UTC
The problem is IMO that libircclient is compiled with ssl support, but pokerth doesn't know. As static libraries don't have its own dependencies pokerth doesn't try to link against libssl resulting in that linker error.
One could patch the pokerth build system to link against ssl if libircclient has ssl enabled.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2012-06-14 06:48:51 UTC
It builds fine for me on stable amd64.
Comment 8 Alexander Stein 2012-06-15 10:28:22 UTC
(In reply to comment #7)
> It builds fine for me on stable amd64.

Did you build net-libs/libircclient with USE="ssl"?
Comment 9 Mr. Bones. (RETIRED) gentoo-dev 2012-06-15 14:57:37 UTC
[ebuild   R    ] net-libs/libircclient-1.6  USE="ssl -doc -ipv6 -threads"
Comment 10 Alexander Stein 2012-06-15 15:24:28 UTC
I tried exactly your USE-flags:
[ebuild   R    ] net-libs/libircclient-1.6  USE="ssl -doc -ipv6 -threads"
[ebuild   R    ] games-board/pokerth-0.9.4  USE="-dedicated"

Still no success. Have you (re)built pokerth _after_ libircclient?
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-06-16 16:09:34 UTC
Get libircclient to either use pkg-config or build a shared objects and that will solve it. Also note that it might jsut work fine if you have curl[ssl,openssl] (and might fail badly if you have curl built with any other ssl implementation).
Comment 12 Alexander Stein 2012-06-19 09:40:09 UTC
(In reply to comment #11)
> Get libircclient to either use pkg-config or build a shared objects and that
> will solve it. Also note that it might jsut work fine if you have
> curl[ssl,openssl] (and might fail badly if you have curl built with any
> other ssl implementation).

Yep, you're right. With the new stable version net-misc/curl-7.25.0-r1 the linking problem has gone away. The old stable version net-misc/curl-7.24.0 showed the errors.
This is my current config for curl.
net-misc/curl-7.25.0-r1  USE="ipv6 ldap ssl threads -ares -idn -kerberos -ssh -static-libs -test" CURL_SSL="openssl -axtls -cyassl -gnutls -nss -polarssl"
Comment 13 cyberbat 2012-06-20 18:10:31 UTC
Bug has gone away with new curl.
Comment 14 Johannes Huber (RETIRED) gentoo-dev 2012-08-16 08:52:29 UTC
Please try with ld.gold ;)
Comment 15 Julian Ospald 2012-08-16 22:54:17 UTC
Created attachment 321528 [details, diff]
pokerth-0.9.5-underlinking.patch

"pkg-config --libs --static libcurl" includes those libs which are underlinked afais, tested with gold, opinions?
Comment 16 Julian Ospald 2012-08-21 19:44:23 UTC
+  21 Aug 2012; Julian Ospald <hasufell@gentoo.org> pokerth-0.9.5.ebuild,
+  +files/pokerth-0.9.5-underlinking.patch:
+  fix underlinking issues wrt #418349