jeroen / openssl

OpenSSL bindings for R
Other
63 stars 19 forks source link

problem with soname version in libressl ? #76

Open matt-wirtz opened 4 years ago

matt-wirtz commented 4 years ago

Hi,

I think I have a very similar issue as mentioned here already: (https://github.com/jeroen/openssl/issues/39)

When trying to install the openssl package under R I get the folliowing error:

* installing *source* package ‘openssl’ ...
** package ‘openssl’ successfully unpacked and MD5 sums checked
Found pkg-config cflags and libs!
Using PKG_CFLAGS=
Using PKG_LIBS=-l:libssl.so.1.0.0 -l:libcrypto.so.1.0.0
** libs
...
** testing if installed package can be loaded
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/user/R/x86_64-suse-linux-gnu-library/3.5/openssl/libs/openssl.so':
  /home/user/R/x86_64-suse-linux-gnu-library/3.5/openssl/libs/openssl.so: undefined symbol: RSA_set0_factors
Error: loading failed

I'm running opensuse 15 and openssl is installed:

sudo ldconfig -p | grep ssl
        libssl3.so (libc6,x86-64) => /usr/lib64/libssl3.so
        libssl.so.45 (libc6,x86-64) => /usr/lib64/libssl.so.45
        libssl.so.1.1 (libc6,x86-64) => /usr/lib64/libssl.so.1.1
        libssl.so.1.1 (libc6) => /usr/lib/libssl.so.1.1
        libssl.so.1.0.0 (libc6,x86-64) => /usr/lib64/libssl.so.1.0.0
        libssl.so.1.0.0 (libc6) => /usr/lib/libssl.so.1.0.0
        libssl.so (libc6,x86-64) => /usr/lib64/libssl.so
        libevent_openssl-2.1.so.6 (libc6,x86-64) => /usr/lib64/libevent_openssl-2.1.so.6

On my system there are different libssl versions installed too, as there were in the linked issue mentioned above. But all reside in the same directory /usr/lib64. So I don't think I can fix it by specifying the LD_LIBRARY_PATH.

Any help is appreciated.

My sessioninfo:

R version 3.5.0 (2018-04-23)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: openSUSE Leap 15.0

Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=nds_DE.UTF-8       LC_NUMERIC=C                LC_TIME=de_DE.UTF-8         LC_COLLATE=nds_DE.UTF-8    
 [5] LC_MONETARY=nds_DE.UTF-8    LC_MESSAGES=nds_DE.UTF-8    LC_PAPER=de_DE.UTF-8        LC_NAME=C                  
 [9] LC_ADDRESS=C                LC_TELEPHONE=C              LC_MEASUREMENT=nds_DE.UTF-8 LC_IDENTIFICATION=C        

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0
jeroen commented 4 years ago

I just tried this using the latest opensuse/leap image from dockerhub and I was able to install the R package against the standard openssl-devel library from zypper. This is the env:

R version 3.5.0 (2018-04-23)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: openSUSE Leap 15.1

So which version of the openssl headers do you have installed? What version of openssl-devel is installed on your system? And What do you see for:

grep SHLIB_VERSION_NUMBER /usr/include/openssl/opensslv.h

It sounds like somehow you managed to install conflicting ssl headers.

matt-wirtz commented 4 years ago

Thanks for looking into it.

The libressl-devel is installed on my system:

Information for package libressl-devel:
---------------------------------------
Repository     : Update-Oss                                                        
Name           : libressl-devel                                                    
Version        : 2.8.0-lp150.2.3.1                                                 
Arch           : x86_64                                                            
Vendor         : openSUSE                                                          
Installed Size : 1,3 MiB                                                           
Installed      : Yes                                                               
Status         : up-to-date                                                        
Source package : libressl-2.8.0-lp150.2.3.1.src                                    
Summary        : Development files for LibreSSL, an SSL/TLS protocol implementation
Description    :                                                                   
    LibreSSL is an open-source implementation of the Secure Sockets Layer
    (SSL) and Transport Layer Security (TLS) protocols. It derives from
    OpenSSL, with the aim of refactoring the OpenSSL code so as to
    provide a more secure implementation.

    This subpackage contains libraries and header files for developing
    applications that want to make use of libressl.

The openssl-devel package is not installed. Might that be the reason, why the openssl package in R is not compiling?

Unfortunately the installation of openssl-devel conflicts with other packages like mysql-workbench and libmariadb-devel. So I would need to remove these packages before I could install openssl-devel.

grep SHLIB_VERSION_NUMBER /usr/include/openssl/opensslv.h
#define SHLIB_VERSION_NUMBER "1.0.0"
matt-wirtz commented 4 years ago

I removed all packages relying on libressl and then installed openssl-devel. After this I could successfully install the R package openssl.

Thanks for your help.

jeroen commented 4 years ago

I'll see if I can make it work with libressl as well.