<div dir="ltr">Another option is to build OpenSSL and then statically link it with Erlang of your choosing<div>(<span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">--with-ssl=/usr/local/openssl/ --disable-dynamic-ssl-lib)</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;font-size:14px;line-height:20px">I would really like to know why would someone add a OpenSSL package with</span></div><div><font color="#333333" face="Arial, sans-serif"><span style="font-size:14px;line-height:20px">elliptic curves disabled...</span></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 3, 2015 at 3:00 AM, Bryan <span dir="ltr"><<a href="mailto:bryan@go-factory.net" target="_blank">bryan@go-factory.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you so much - you rock! You saved me a headache and I really appreciate it.<br>
<br>
Adding the group back in, for prosperity reasons if someone is searching the list.<br>
<span class=""><br>
Cheers,<br>
Bryan<br>
<br>
----<br>
<br>
Bryan Hughes<br>
Go Factory<br>
<br>
<a href="http://www.go-factory.net" target="_blank">http://www.go-factory.net</a><br>
<br>
Connecting the Internet of Things<br>
<br>
</span>> On Feb 2, 2015, at 6:57 PM, Vance Shipley <<a href="mailto:vances@motivity.ca">vances@motivity.ca</a>> wrote:<br>
><br>
> This problem is described here:<br>
><br>
>     <a href="http://erlang.org/pipermail/erlang-questions/2013-December/076327.html" target="_blank">http://erlang.org/pipermail/erlang-questions/2013-December/076327.html</a><br>
><br>
> Configure with:<br>
><br>
>     CFLAGS="-DOPENSSL_NO_EC=1" ./configure<br>
<div><div class="h5">><br>
><br>
><br>
> On Tue, Feb 3, 2015 at 8:06 AM, Bryan <<a href="mailto:bryan@go-factory.net">bryan@go-factory.net</a>> wrote:<br>
>> Howdy fellow Erlangers,<br>
>><br>
>> I have built many many Erlang systems from source, but today I am having a<br>
>> very unusual problem in that no matter how I build erlang, it fails to link<br>
>> properly to the crypto libraries.<br>
>><br>
>> Here is the issue:<br>
>><br>
>> [adam-dev@localhost otp_src_R16B03-1]$ erl<br>
>> Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:8:8] [async-threads:10]<br>
>> [hipe] [kernel-poll:false]<br>
>><br>
>> Eshell V5.10.4  (abort with ^G)<br>
>> 1> l(crypto).<br>
>> {error,on_load_failure}<br>
>><br>
>> =ERROR REPORT==== 2-Feb-2015::18:26:50 ===<br>
>> Unable to load crypto library. Failed with error:<br>
>> "load_failed, Failed to load NIF library:<br>
>> '/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so:<br>
>> undefined symbol: EC_GROUP_new_curve_GF2m'"<br>
>> OpenSSL might not be installed on this system.<br>
>><br>
>> =ERROR REPORT==== 2-Feb-2015::18:26:50 ===<br>
>> The on_load function for module crypto returned {error,<br>
>>                                                 {load_failed,<br>
>>                                                  "Failed to load NIF<br>
>> library:<br>
>> '/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so:<br>
>> undefined symbol: EC_GROUP_new_curve_GF2m'”}}<br>
>><br>
>> The shared library is there:<br>
>><br>
>> [adam-dev@localhost otp_src_R16B03-1]$ ls -la<br>
>> /home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so<br>
>> -rwxr-xr-x. 1 adam-dev adam-dev 172170 Feb  2 18:25<br>
>> /home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/lib/crypto.so<br>
>><br>
>> I did find this in the log:<br>
>><br>
>> gcc -c -o ../priv/obj/x86_64-unknown-linux-gnu/crypto.o -Werror=return-type<br>
>> -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement<br>
>> -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS<br>
>> -D_POSIX_THREAD_SAFE_FUNCTIONS -m64 -g -O2<br>
>> -I/home/adam-dev/erlang/otp_src_R16B03-1/erts/x86_64-unknown-linux-gnu<br>
>> -fno-tree-copyrename  -D_GNU_SOURCE -fPIC -DHAVE_DYNAMIC_CRYPTO_LIB<br>
>> -I/usr/include -I/usr/include<br>
>> -I/home/adam-dev/erlang/otp_src_R16B03-1/erts/emulator/beam<br>
>> -I/home/adam-dev/erlang/otp_src_R16B03-1/erts/include<br>
>> -I/home/adam-dev/erlang/otp_src_R16B03-1/erts/include/x86_64-unknown-linux-gnu<br>
>> -I/home/adam-dev/erlang/otp_src_R16B03-1/erts/include/internal<br>
>> -I/home/adam-dev/erlang/otp_src_R16B03-1/erts/include/internal/x86_64-unknown-linux-gnu<br>
>> -I/home/adam-dev/erlang/otp_src_R16B03-1/erts/emulator/sys/unix crypto.c<br>
>> crypto.c: In function ‘ec_key_new’:<br>
>> crypto.c:3018: warning: implicit declaration of function<br>
>> ‘EC_GROUP_new_curve_GF2m’<br>
>> crypto.c:3018: warning: assignment makes pointer from integer without a cast<br>
>><br>
>><br>
>><br>
>> The rest of the details. I have a brand spanking new CentOS install:<br>
>><br>
>> [adam-dev@localhost otp_src_R16B03-1]$ uname -a<br>
>> Linux localhost.localdomain 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6<br>
>> 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux<br>
>><br>
>> Here is the installation information for openssl and openssl-devel:<br>
>><br>
>> [adam-dev@localhost otp_src_R16B03-1]$ yum info openssl<br>
>> Loaded plugins: fastestmirror<br>
>> Loading mirror speeds from cached hostfile<br>
>> * base: <a href="http://mirror.keystealth.org" target="_blank">mirror.keystealth.org</a><br>
>> * extras: <a href="http://mirror.hostduplex.com" target="_blank">mirror.hostduplex.com</a><br>
>> * updates: <a href="http://mirror.pac-12.org" target="_blank">mirror.pac-12.org</a><br>
>> Installed Packages<br>
>> Name        : openssl<br>
>> Arch        : x86_64<br>
>> Version     : 1.0.1e<br>
>> Release     : 30.el6_6.5<br>
>> Size        : 4.0 M<br>
>> Repo        : installed<br>
>> From repo   : updates<br>
>> Summary     : A general purpose cryptography library with TLS implementation<br>
>> URL         : <a href="http://www.openssl.org/" target="_blank">http://www.openssl.org/</a><br>
>> License     : OpenSSL<br>
>> Description : The OpenSSL toolkit provides support for secure communications<br>
>> between<br>
>>            : machines. OpenSSL includes a certificate management tool and<br>
>> shared<br>
>>            : libraries which provide various cryptographic algorithms and<br>
>>            : protocols.<br>
>><br>
>> Available Packages<br>
>> Name        : openssl<br>
>> Arch        : i686<br>
>> Version     : 1.0.1e<br>
>> Release     : 30.el6_6.5<br>
>> Size        : 1.5 M<br>
>> Repo        : updates<br>
>> Summary     : A general purpose cryptography library with TLS implementation<br>
>> URL         : <a href="http://www.openssl.org/" target="_blank">http://www.openssl.org/</a><br>
>> License     : OpenSSL<br>
>> Description : The OpenSSL toolkit provides support for secure communications<br>
>> between<br>
>>            : machines. OpenSSL includes a certificate management tool and<br>
>> shared<br>
>>            : libraries which provide various cryptographic algorithms and<br>
>>            : protocols.<br>
>><br>
>> [adam-dev@localhost otp_src_R16B03-1]$ yum info openssl-devel<br>
>> Loaded plugins: fastestmirror<br>
>> Loading mirror speeds from cached hostfile<br>
>> * base: <a href="http://mirror.keystealth.org" target="_blank">mirror.keystealth.org</a><br>
>> * extras: <a href="http://mirror.hostduplex.com" target="_blank">mirror.hostduplex.com</a><br>
>> * updates: <a href="http://mirror.pac-12.org" target="_blank">mirror.pac-12.org</a><br>
>> Installed Packages<br>
>> Name        : openssl-devel<br>
>> Arch        : x86_64<br>
>> Version     : 1.0.1e<br>
>> Release     : 30.el6_6.5<br>
>> Size        : 2.2 M<br>
>> Repo        : installed<br>
>> From repo   : updates<br>
>> Summary     : Files for development of applications which will use OpenSSL<br>
>> URL         : <a href="http://www.openssl.org/" target="_blank">http://www.openssl.org/</a><br>
>> License     : OpenSSL<br>
>> Description : OpenSSL is a toolkit for supporting cryptography. The<br>
>> openssl-devel<br>
>>            : package contains include files needed to develop applications<br>
>> which<br>
>>            : support various cryptographic algorithms and protocols.<br>
>><br>
>> Available Packages<br>
>> Name        : openssl-devel<br>
>> Arch        : i686<br>
>> Version     : 1.0.1e<br>
>> Release     : 30.el6_6.5<br>
>> Size        : 1.2 M<br>
>> Repo        : updates<br>
>> Summary     : Files for development of applications which will use OpenSSL<br>
>> URL         : <a href="http://www.openssl.org/" target="_blank">http://www.openssl.org/</a><br>
>> License     : OpenSSL<br>
>> Description : OpenSSL is a toolkit for supporting cryptography. The<br>
>> openssl-devel<br>
>>            : package contains include files needed to develop applications<br>
>> which<br>
>>            : support various cryptographic algorithms and protocols.<br>
>><br>
>> And here is my configuration:<br>
>><br>
>> [adam-dev@localhost otp_src_R16B03-1]$ ./configure<br>
>> --prefix=/home/adam-dev/erlang/R16B03-1 --enable-ssl=yes<br>
>> --enable-kernel-poll --enable-smp-support --enable-threads --with-odbc=yes<br>
>> --enable-m64-build<br>
>><br>
>> Configure finds everything ok. Here is snippet of the output relating to<br>
>> ssl:<br>
>><br>
>> checking for OpenSSL >= 0.9.7 in standard locations... /usr<br>
>> checking for OpenSSL kerberos 5 support... yes<br>
>> checking for krb5.h in standard locations... found in /usr/include<br>
>> checking for ssl runtime library path to use...<br>
>> /usr/lib64:/usr/local/lib64:/usr/sfw/lib64:/opt/local/lib64:/usr/pkg/lib64:/usr/local/openssl/lib64:/usr/lib/openssl/lib64:/usr/openssl/lib64:/usr/local/ssl/lib64:/usr/lib/ssl/lib64:/usr/ssl/lib64:/usr/local/lib:/usr/sfw/lib:/usr/lib:/opt/local/lib:/usr/pkg/lib:/usr/local/openssl/lib:/usr/lib/openssl/lib:/usr/openssl/lib:/usr/local/ssl/lib:/usr/lib/ssl/lib:/usr/ssl/lib<br>
>><br>
>> make and make install complete without error. Another snippet:<br>
>><br>
>> === Entering application crypto<br>
>> make[3]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/src'<br>
>> make -w RELEASE_PATH="/home/adam-dev/erlang/R16B03-1/lib/erlang"<br>
>> release_spec<br>
>> make[4]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/src'<br>
>> /usr/bin/install -c -d<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/src"<br>
>> /usr/bin/install -c -m 644 crypto_app.erl crypto.erl crypto_server.erl<br>
>> crypto_sup.erl<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/src"<br>
>> /usr/bin/install -c -d<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/ebin"<br>
>> /usr/bin/install -c -m 644 ../ebin/crypto_app.beam ../ebin/crypto.beam<br>
>> ../ebin/crypto_server.beam ../ebin/crypto_sup.beam ../ebin/crypto.app \<br>
>> ../ebin/crypto.appup<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/ebin"<br>
>> make[4]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/src'<br>
>> make[3]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/src'<br>
>> make[3]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> make -f x86_64-unknown-linux-gnu/Makefile release<br>
>> make[4]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> make -w RELEASE_PATH="/home/adam-dev/erlang/R16B03-1/lib/erlang"<br>
>> release_spec<br>
>> make[5]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> make -f x86_64-unknown-linux-gnu/Makefile release_spec<br>
>> make[6]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> /usr/bin/install -c -d<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/obj"<br>
>> /usr/bin/install -c -d<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/lib"<br>
>> /usr/bin/install -c -m 644 ../priv/Makefile<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/obj"<br>
>> /usr/bin/install -c ../priv/obj/x86_64-unknown-linux-gnu/crypto.o<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/obj"<br>
>> /usr/bin/install -c ../priv/lib/x86_64-unknown-linux-gnu/crypto.so<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/lib"<br>
>> /usr/bin/install -c ../priv/obj/x86_64-unknown-linux-gnu/crypto_callback.o<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/obj"<br>
>> /usr/bin/install -c ../priv/lib/x86_64-unknown-linux-gnu/crypto_callback.so<br>
>> "/home/adam-dev/erlang/R16B03-1/lib/erlang/lib/crypto-3.2/priv/lib"<br>
>> make[6]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> make[5]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> make[4]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> make[3]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/c_src'<br>
>> make[3]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/doc/src'<br>
>> make -w RELEASE_PATH="/home/adam-dev/erlang/R16B03-1/lib/erlang"<br>
>> release_spec<br>
>> make[4]: Entering directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/doc/src'<br>
>> make[4]: Nothing to be done for `release_spec'.<br>
>> make[4]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/doc/src'<br>
>> make[3]: Leaving directory<br>
>> `/home/adam-dev/erlang/otp_src_R16B03-1/lib/crypto/doc/src'<br>
>> === Leaving application crypto<br>
>><br>
>><br>
>> Any help would be greatly appreciated!<br>
>><br>
>> Cheers,<br>
>> Bryan<br>
>><br>
>> ----<br>
>><br>
>> Bryan Hughes<br>
>> Go Factory<br>
>><br>
>> <a href="http://www.go-factory.net" target="_blank">http://www.go-factory.net</a><br>
>><br>
>> Connecting the Internet of Things<br>
>><br>
>><br>
</div></div>>> _______________________________________________<br>
>> erlang-questions mailing list<br>
>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
>> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> --<br>
>     -Vance<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>