jeroen / openssl

OpenSSL bindings for R
Other
63 stars 22 forks source link

'_PKCS12_SAFEBAG_free' symbol not found in flat namespace #124

Open zhuxr11 opened 3 months ago

zhuxr11 commented 3 months ago

I saw this message when installing openssl 2.2.0 in \R:

** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘openssl’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Users/admin/Projects/proj_name/renv/staging/1/00LOCK-openssl/00new/openssl/libs/openssl.so':
  dlopen(/Users/admin/Projects/proj_name/renv/staging/1/00LOCK-openssl/00new/openssl/libs/openssl.so, 0x0006): symbol not found in flat namespace '_PKCS12_SAFEBAG_free'
Error: loading failed
Execution halted

session info:

R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 14.5

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
[1] compiler_4.0.5 tools_4.0.5    yaml_2.3.8     renv_1.0.7    

openssl version:

→ which brew
/opt/homebrew/bin/brew
→ openssl version -a
OpenSSL 3.3.1 4 Jun 2024 (Library: OpenSSL 3.3.1 4 Jun 2024)
built on: Tue Jun  4 12:53:04 2024 UTC
platform: darwin64-arm64-cc
options:  bn(64,64)
compiler: clang -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
OPENSSLDIR: "/opt/homebrew/etc/openssl@3"
ENGINESDIR: "/opt/homebrew/Cellar/openssl@3/3.3.1/lib/engines-3"
MODULESDIR: "/opt/homebrew/Cellar/openssl@3/3.3.1/lib/ossl-modules"
Seeding source: os-specific
CPUINFO: OPENSSL_armcap=0x987d

BTW, openssl 2.0.0 works fine and installs in seconds.

jeroen commented 3 months ago

I just tested this locally but I cannot reproduce your problem, it works fine for me. Could it be that your system is mixing up multiple versions of libssl? Could you pls include the full output of install.packages?

Also why are you running such an old R version? The current version is R 4.4.1.

==> R CMD INSTALL --preclean --no-multiarch --with-keep.source --install-tests openssl

* installing to library ‘/Users/jeroen/Library/R/x86_64/4.4/library’
* installing *source* package ‘openssl’ ...
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/local/Cellar/openssl@3/3.3.1/include
Using PKG_LIBS=-L/usr/local/Cellar/openssl@3/3.3.1/lib -lssl.3 -lcrypto.3
** libs
using C compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using SDK: ‘MacOSX14.4.sdk’
rm -f aes.o base64.o bignum.o cert.o compatibility.o diffie.o envelope.o error.o hash.o info.o keygen.o keys.o onload.o openssh.o password.o pbkdf.o pem.o pkcs12.o pkcs7.o rand.o rsa.o signing.o ssl.o stream.o write.o x25519.o openssl.so bcrypt/libstatbcrypt.a bcrypt/bcrypt_pbkdf.o bcrypt/blowfish.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c aes.c -o aes.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c base64.c -o base64.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c bignum.c -o bignum.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c cert.c -o cert.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c compatibility.c -o compatibility.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c diffie.c -o diffie.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c envelope.c -o envelope.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c error.c -o error.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c hash.c -o hash.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c info.c -o info.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c keygen.c -o keygen.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c keys.c -o keys.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c onload.c -o onload.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c openssh.c -o openssh.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c password.c -o password.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c pbkdf.c -o pbkdf.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c pem.c -o pem.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c pkcs12.c -o pkcs12.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c pkcs7.c -o pkcs7.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c rand.c -o rand.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c rsa.c -o rsa.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c signing.c -o signing.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c ssl.c -o ssl.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c stream.c -o stream.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c write.c -o write.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c x25519.c -o x25519.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c bcrypt/bcrypt_pbkdf.c -o bcrypt/bcrypt_pbkdf.o
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/Cellar/openssl@3/3.3.1/include -DOPENSSL_SUPPRESS_DEPRECATED  -I/opt/R/x86_64/include    -fPIC  -Wall -pedantic -Wformat -Wdeprecated -c bcrypt/blowfish.c -o bcrypt/blowfish.o
ar rcs bcrypt/libstatbcrypt.a bcrypt/bcrypt_pbkdf.o bcrypt/blowfish.o
clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o openssl.so aes.o base64.o bignum.o cert.o compatibility.o diffie.o envelope.o error.o hash.o info.o keygen.o keys.o onload.o openssh.o password.o pbkdf.o pem.o pkcs12.o pkcs7.o rand.o rsa.o signing.o ssl.o stream.o write.o x25519.o -Lbcrypt -lstatbcrypt -L/usr/local/Cellar/openssl@3/3.3.1/lib -lssl.3 -lcrypto.3 -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/jeroen/Library/R/x86_64/4.4/library/00LOCK-openssl/00new/openssl/libs
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (openssl)
*