Summary: | lang/erlang r11b5,1 build fails on amd64 | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Benno Rice <benno> | ||||
Component: | Individual Port(s) | Assignee: | Jimmy Olgeni <olgeni> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Benno Rice
![]() ![]() Responsible Changed From-To: freebsd-ports-bugs->olgeni Over to maintainer Just as a datapoint, what seems to be happening is that erlang is configuring itself to link the static crypto library directly in to the crypto driver. The command line it's using is this: cc -shared -o ../priv/lib/amd64-unknown-freebsd6.1/crypto_drv.so ../ priv/obj/amd64-unknown-freebsd6.1/crypto_drv.o /usr/lib/libcrypto.a If I edit the Makefile.in in otp_src_R11B-5/lib/crypto/c_src and force DYNAMIC_CRYPTO_LIB to be 'yes', it does the following instead: cc -shared -o ../priv/lib/amd64-unknown-freebsd6.1/crypto_drv.so ../ priv/obj/amd64-unknown-freebsd6.1/crypto_drv.o -L/usr/lib -lcrypto This works and the build runs to completion. I'm not entirely sure how it's coming to the decision to use the static library instead of the dynamic. -- Benno Rice benno@freebsd.org State Changed From-To: open->patched The crypto_drv.so issue was fixed in r11b5_1. Could you please check if it works for you? Just tried to build again but it failed like reported in ports/114021. Here is the output: #+v === Entering application crypto gmake[3]: Entering directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib/crypto/src' gmake[3]: Für das Ziel »opt« ist nichts zu tun. gmake[3]: Leaving directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib/crypto/src' gmake[3]: Entering directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib/crypto/c_src' gmake -f amd64-unknown-freebsd6.2/Makefile TYPE=opt gmake[4]: Entering directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib/crypto/c_src' /usr/bin/install -c -o root -g wheel -d ../priv/obj/amd64-unknown-freebsd6.2 cc -c -o ../priv/obj/amd64-unknown-freebsd6.2/crypto_drv.o -O2 -pipe -I/usr/local/include -I/usr/ports/lang/erlang/work/otp_src_R11B-5/erts/amd64-unknown-freebsd6.2 -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -fPIC -I/usr/include -I/usr/ports/lang/erlang/work/otp_src_R11B-5/erts/emulator/beam -I/usr/ports/lang/erlang/work/otp_src_R11B-5/erts/emulator/sys/unix crypto_drv.c /usr/bin/install -c -o root -g wheel -d ../priv/lib/amd64-unknown-freebsd6.2 cc -shared -o ../priv/lib/amd64-unknown-freebsd6.2/crypto_drv.so ../priv/obj/amd64-unknown-freebsd6.2/crypto_drv.o /usr/lib/libcrypto.a /usr/bin/ld: /usr/lib/libcrypto.a(sha1_one.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /usr/lib/libcrypto.a: could not read symbols: Bad value gmake[4]: *** [../priv/lib/amd64-unknown-freebsd6.2/crypto_drv.so] Fehler 1 gmake[4]: Leaving directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib/crypto/c_src' gmake[3]: *** [opt] Fehler 2 gmake[3]: Leaving directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib/crypto/c_src' gmake[2]: *** [opt] Fehler 2 gmake[2]: Leaving directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib/crypto' gmake[1]: *** [opt] Fehler 2 gmake[1]: Leaving directory `/usr/ports/lang/erlang/work/otp_src_R11B-5/lib' gmake: *** [libs] Fehler 2 *** Error code 2 Stop in /usr/ports/lang/erlang. #-v Ports updated via portsnap at 17:00 UTC on 2007-07-09. When using the instructions from Benno Rice the build finishes sucessfully. -- Ich verwalte sie. Ich zähle sie und zähle sie wieder. Das ist nicht leicht. Aber ich bin ein ernsthafter Mann. \\ ---> Antoine de Saint-Exupery, "Der kleine Prinz" On 09/07/2007, at 2:41 PM, Jimmy Olgeni wrote: > Synopsis: lang/erlang r11b5,1 build fails on amd64 > > State-Changed-From-To: open->patched > State-Changed-By: olgeni > State-Changed-When: Mon Jul 9 14:38:07 UTC 2007 > State-Changed-Why: > The crypto_drv.so issue was fixed in r11b5_1. Could you please > check if it works for you? As pointed out by Nikolai Nespor this appears to be a separate issue to the one fixed in r11b5_1 and I'll note that I did attempt to install r11b5_1 and hit the exact same problem. It's more to do with trying to link a static object into a dynamic one and the linker not dealing. For some reason it's deciding to link against libcrypto.a instead of libcrypto.so. -- Benno Rice benno@freebsd.org Found the issue. the "configure" file in erts directory contained the following :- 19647 # Remove all SKIP files from previous runs 19648 for a in ssl crypto ssh; do 19649 /bin/rm -f $ERL_TOP/lib/$a/SKIP 19650 done 19651 19652 SSL_DYNAMIC_ONLY=no 19653 SSL_DYNAMIC_ONLY is hard coded to "no", which forced it to link with libcrypto.a instead of libcrypto.so cheers -Mike After looking through the code again. I realised that I missed a section where SSL_DYNAMIC_ONLY=yes was defined. However, in configure.in 2633 if test '!' -f $SSL_LIBDIR/libcrypto.a; then 2634 SSL_DYNAMIC_ONLY=yes 2635 fi In my installation of FreeBSD AMD64, this will always fail. As both libcrypto.a and libcrypto.so exists. cheers -Mike olgeni 2007-07-31 21:22:04 UTC FreeBSD ports repository Modified files: lang/erlang/files patch-erts_configure Log: Force use of libcrypto.so. This will fix the build on amd64 (tested on sledge). PR: ports/114022 Submitted by: benno Revision Changes Path 1.11 +10 -1 ports/lang/erlang/files/patch-erts_configure _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" State Changed From-To: patched->feedback The latest port upgrade builds fine on sledge. Could you check if it works for you too? Port now builds and installs fine. Many thanks. -- Benno Rice benno@freebsd.org State Changed From-To: feedback->closed Fixed. Thanks to everybody for the troubleshooting tips! |