jeroen / openssl

OpenSSL bindings for R
Other
63 stars 20 forks source link

install error in RHEL 6.4 (santiago) #29

Closed hari1987 closed 7 years ago

hari1987 commented 7 years ago

I wanted to install the openssl via R. Here is the output of it. It was not able to install it.

R CMD INSTALL -d -l /home/ehadhai/R/x86_64-unknown-linux-gnu-library/3.1 openssl_0.9.4.tar.gz
processing 'openssl_0.9.4.tar.gz'
a file
* build_help_types=
* DBG: 'R CMD INSTALL' now doing do_install()
* created lock directory '/home/ehadhai/R/x86_64-unknown-linux-gnu-library/3.1/00LOCK-openssl'
* installing *source* package 'openssl' ...
** package 'openssl' successfully unpacked and MD5 sums checked
configure command: ' ./configure '
Found pkg-config cflags and libs!
Using PKG_CFLAGS= 
Using PKG_LIBS=-Wl,-z,relro -lssl -lcrypto -ldl -lz  
** libs
about to run R CMD SHLIB -o openssl.so aes.c base64.c bignum.c cert.c diffie.c envelope.c error.c hash.c info.c keygen.c onload.c openssh.c rand.c read.c rsa.c signing.c ssl.c stream.c write.c
gcc -std=gnu99 -I/app/vbuild/RHEL6-x86_64/R/3.1.2/lib/R/include -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c aes.c -o aes.o
aes.c: In function 'R_aes_any':
aes.c:22: error: 'EVP_CIPH_GCM_MODE' undeclared (first use in this function)
aes.c:22: error: (Each undeclared identifier is reported only once
aes.c:22: error: for each function it appears in.)
aes.c:24: error: 'EVP_CTRL_GCM_SET_IVLEN' undeclared (first use in this function)
make: *** [aes.o] Error 1
ERROR: compilation failed for package 'openssl'
* removing '/home/ehadhai/R/x86_64-unknown-linux-gnu-library/3.1/openssl'

Futher useful things:

cat /etc/system-release Red Hat Enterprise Linux Server release 6.4 (Santiago)

cat /proc/version Linux version 2.6.32-358.6.2.el6.x86_64 (mockbuild@x86-022.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Tue May 14 15:48:21 EDT 2013

ldconfig -p | grep libssl libssl3.so (libc6,x86-64) => /usr/lib64/libssl3.so libssl3.so (libc6) => /usr/lib/libssl3.so libssl.so.10 (libc6,x86-64) => /usr/lib64/libssl.so.10 libssl.so.10 (libc6) => /usr/lib/libssl.so.10 libssl.so.6 (libc6,x86-64) => /usr/lib64/libssl.so.6 libssl.so (libc6,x86-64) => /usr/lib64/libssl.so

pkg-config --cflags --libs openssl -Wl,-z,relro -lssl -lcrypto -ldl -lz

jeroen commented 7 years ago

You seem to have multiple conflicting versions of openssl on your system. What do you get for:

pkg-config --libs openssl --atleast-version=1.0
hari1987 commented 7 years ago

with that command i don't get any output

esekilx6293 [18:17] [ehadhai/R/openssl] -> pkg-config --libs openssl --atleast-version=1.0
esekilx6293 [18:17] [ehadhai/R/openssl] -> 

but with this i get these things as output

esekilx6293 [18:17] [ehadhai/R/openssl] -> pkg-config --libs openssl 
-Wl,-z,relro -lssl -lcrypto -ldl -lz  
esekilx6293 [18:17] [ehadhai/R/openssl] -> 
jeroen commented 7 years ago

Your compiler is setting /usr/local/include. What do you see for:

grep OPENSSL_VERSION_TEXT /usr/local/include/openssl/opensslv.h
hari1987 commented 7 years ago

Nothing is present inside this dir /usr/local/include

esekilx6293 [9:27] [/] -> grep OPENSSL_VERSION_TEXT /usr/local/include/openssl/opensslv.h
grep: /usr/local/include/openssl/opensslv.h: No such file or directory
esekilx6293 [9:27] [/] -> 
esekilx6293 [9:29] [/] -> ll /usr/local/include/
total 8
drwxr-xr-x.  2 root root 4096 Jun 28  2011 ./
drwxr-xr-x. 12 root root 4096 Aug  1  2014 ../
esekilx6293 [9:29] [/] -> 

But I tried to search here instead /usr/include and I found the version

esekilx6293 [9:28] [/] -> grep OPENSSL_VERSION_TEXT /usr/include/openssl/opensslv.h
#define OPENSSL_VERSION_TEXT    "OpenSSL 1.0.0-fips 29 Mar 2010"
#define OPENSSL_VERSION_TEXT    "OpenSSL 1.0.0 29 Mar 2010"
#define OPENSSL_VERSION_PTEXT   " part of " OPENSSL_VERSION_TEXT
jeroen commented 7 years ago

Huh this is EL6, correct? What gives yum info openssl ?

jeroen commented 7 years ago

I'm going to fire up a centos 6.4 box to reproduce this issue. So you're using openssl from yum, correct? Or did you manually build and install some other version?

hari1987 commented 7 years ago
esekilx6293 [10:02] [/] -> yum info openssl
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
*Note* Red Hat Network repositories are not listed below. You must run this command as root to access RHN repositories.
Installed Packages
Name        : openssl
Arch        : i686
Version     : 1.0.0
Release     : 27.el6_4.2
Size        : 3.5 M
Repo        : installed
From repo   : rhel-6-4-updates-x86_64
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.

Name        : openssl
Arch        : x86_64
Version     : 1.0.0
Release     : 27.el6_4.2
Size        : 3.6 M
Repo        : installed
From repo   : rhel-6-4-updates-x86_64
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.

esekilx6293 [10:02] [/] -> 

I am not sure of what is centos 6.4. It is a RedHat 6.4 machine

esekilx6293 [10:02] [/] -> cat /etc/system-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
esekilx6293 [10:05] [/] -> 
andref1989 commented 7 years ago

I have the very same issue installing openssl with the exact error message reported above. On EL6 machine

jeroen commented 7 years ago

Are you also using EL 6.4? I can't repo this on my CentOS 6.8 box (which has openssl 1.0.1)

jeroen commented 7 years ago

I tried to push a fix. Can you please try to reinstall?

install.packages("https://github.com/jeroenooms/openssl/archive/master.tar.gz", repos = NULL)
jeroen commented 7 years ago

OK so I assume this is solved. LMK if there are any other issues.

andref1989 commented 7 years ago

Fix works

On Wed, Aug 10, 2016 at 2:26 PM Jeroen Ooms notifications@github.com wrote:

Closed #29 https://github.com/jeroenooms/openssl/issues/29.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeroenooms/openssl/issues/29#event-751728322, or mute the thread https://github.com/notifications/unsubscribe-auth/AGx57rFMZGAkrRyfrpxst8DoUfaQDnjaks5qehfLgaJpZM4Jd3I1 .