Compiling erlang-12.2.2 with gcc-3.4.6-r2 hardened compiler with ssl USE flag enabled. Compiler fails to properly link crypto_drv.so against /usr/lib/libcrypto.so.0.9.8 Here is the output: ldd /usr/lib/erlang/lib/crypto-1.5.1.1/priv/lib/crypto_drv.so linux-gate.so.1 => (0x5376b000) libc.so.6 => /lib/libc.so.6 (0x535b4000) /lib/ld-linux.so.2 (0x5376c000) I should be seeing a line like this: libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7ea5000) Here is the specific failure message: Erlang (BEAM) emulator version 5.6.2 [source] [smp:4] [async-threads:0] Eshell V5.6.2 (abort with ^G) 1> crypto:start(). sh: line 0: exec: crypto_drv: not found {error,{shutdown,{crypto_app,start,[normal,[]]}}} I can attach any other requested debug output. I think this is fairly self-explanatory. I see several other references to this bug other places, but with different compilers, and different versions of Erlang. I'm sure this is an upstream issue, just not sure it there is an appropriate patch.
Please attach your `emerge --info' too.
Apart from emerge --info, I'd like to have your config.log...and a try with 12.2.3. You seem to run into this problem often. :)
Ok, I see the problem, I have it on a non-hardened machine, too.
I'm just getting back to testing on this bug. I just hadn't complained about it in a while. I will attach emerge --info and my config.log as well. I'll give 12.2.3 a shot also. Thanks for looking into fixing this.
Created attachment 160137 [details] emege --info
Created attachment 160141 [details] 12.2.2 config.log
dev-lang/erlang-12.2.3 has same issue: Erlang (BEAM) emulator version 5.6.3 [source] [smp:4] [async-threads:0] Eshell V5.6.3 (abort with ^G) 1> crypto:start(). sh: line 0: exec: crypto_drv: not found {error,{shutdown,{crypto_app,start,[normal,[]]}}} Let me know if you need the config log for this.
(In reply to comment #7) > Let me know if you need the config log for this. I don't. Bug is reported upstream, let's see what they tell.
Linking the file manually like this fixes the problem: gcc -shared -o /usr/lib/erlang/lib/crypto-1.5.2/priv/lib/crypto _drv.so /usr/lib/erlang/lib/crypto-1.5.2/priv/obj/crypto_drv.o /usr/lib/libcrypto.so I think the problem is in the Makefile found at lib/crypto/c_src/Makefile.in line 97. If you try to link against /usr/lib/libcrypto.a a TEXTREL error is generated: /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object.
Adding URL for upstream bug report, no reaction yet. Not much time at the moment, maybe I will try to tweak the Makefile soon.
I haven't forgotten you, but I have limited Internet access at the moment (and for months to come). Anyway. Please modify the ebuild in a way that configure has --enable-dynamic-ssl-lib, and maybe remove the sed lines for DYNAMIC_SSL in src_unpack. Please report back.
I will do this within the next few days and attach the modified ebuild. Thanks for the feedback. I fixed the problem temporarily by linking the library, so I'm in no rush for a fix.
It did the trick on my home system.