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