[erlang-bugs] Erlang 17.3: can't load crypto library on OSX Lion

Sverker Eriksson sverker.eriksson@REDACTED
Thu Sep 25 20:55:56 CEST 2014


On 09/25/2014 06:08 PM, Nicolas Charpentier wrote:
> Hi Ali,
>
>> Hi all,
>>
>> It looks like the crypto application in Erlang/OTP 17.3 fails on OSX Lion
>> as described here:
>> https://trac.macports.org/ticket/45114
>> https://github.com/Homebrew/homebrew/pull/32363
>>
>> Any input on why this would happen?
> It might be a problem related to the version of openssl used during the
> link of crypto.so.
>
> I can reproduce it on Maverick.
> crypto refuses to start with libcrypto.0.9.8 is used, but start correctly
> with libcrypto.1.0.0
>
> Either it's a compilation problem (mismatch of the header used for the
> compilation and the lib used to link) or a dependency on openssl 1.0.0 has
> been introduced in 17.3
>
> You can see the lib dynamique used by crypto.so with
> dyldinfo -dylibs $ROOT/lib/crypto-3.4/priv/lib/crypto.so
>
> When it doesn't work, it depends on /usr/lib/libcrypto.0.9.8.dylib
>
> You can change this dependency with ( the example assumes macport to be
> installed)
> install_name_tool -change /usr/lib/libcrypto.0.9.8.dylib
> /opt/local/lib/libcrypto.1.0.0.dylib
> $ROOT/lib/crypto-3.4/priv/lib/crypto.so
>
> Hope it helps
>
> /Nicolas
>
>


libcrypto.0.9.* and libcrypto.1.* are not compatible. You can not 
compile agains one and link against the other. If it seems to work, you 
are just (un)lucky.

In 17.3 the following ticket was fixed to refuse load of crypto with 
wrong version of libcrypto
and thereby avoid strange memory corruption leading to VM crash or other 
even worse effects.

    OTP-12146  Make crypto verify major version number of OpenSSL header
           files and runtime library. Loading of crypto will fail if
           there is a version mismatch.



/Sverker, Erlang/OTP



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140925/d2f7bc15/attachment.htm>


More information about the erlang-bugs mailing list