jeroen / mongolite

Fast and Simple MongoDB Client for R
https://jeroen.github.io/mongolite/
286 stars 65 forks source link

Installation failure in alpine linux (Docker) #131

Closed blmayer closed 6 years ago

blmayer commented 6 years ago

Hi, I can't build this package in alpine linux from docker, here's the stack's last lines:


gcc -shared -L/usr/lib/R/lib -Wl,--as-needed -o mongolite.so bson.o client.o collection.o cursor.o hex.o mongo_log.o reader.o utils.o -Lmongoc -lstatmongoc -Lbson -lstatbson -lsasl2 -lssl -lcrypto -lresolv -lz -L/usr/lib/R/lib -lR
installing to /usr/lib/R/library/mongolite/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
Warning in file.copy(file.path(R.home("doc"), "html", "R.css"), outman) :
  problem copying /usr/share/doc/R/html/R.css to /usr/lib/R/library/mongolite/html/R.css: No such file or directory
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘mongolite’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/lib/R/library/mongolite/libs/mongolite.so':
  Error relocating /usr/lib/R/library/mongolite/libs/mongolite.so: ASN1_STRING_get0_data: symbol not found
Error: loading failed
Execution halted
ERROR: loading failed```

I have all compilation utilities and:
- mongodb-3.4.10-r0 
- mongodb-tools-3.4.10-r0
- libressl-2.6.3-r0
- libressl-dev-2.6.3-r0

It seems to compile ok but it doesn't moves the library. Any advice?

Thanks in advance.
jeroen commented 6 years ago

Looks like you have conflicting copies of both openssl 1.0 and 1.1 installed on your machine

blmayer commented 6 years ago

Here's my output of some ls:

bash-4.4# ls /usr/lib/*ssl*
/usr/lib/libssl.a          /usr/lib/libssl.so.44      /usr/lib/libssl3.so
/usr/lib/libssl.so         /usr/lib/libssl.so.44.0.1  /usr/lib/libssl3.so.34
bash-4.4# ls /lib/*ssl*
/lib/libssl.so.44      /lib/libssl.so.44.0.1

How can I check the includes files for versions?

And many thanks for the fast response :-)

jeroen commented 6 years ago

Do you have more versions in /usr/local/lib ?

blmayer commented 6 years ago
bash-4.4# ls /usr/local/lib/*ssl*
ls: /usr/local/lib/*ssl*: No such file or directory

Nope.

jeroen commented 6 years ago

This was caused by the openssl/libressl versioning mess. It is fixed now in master, soon on cran.

RobertLowe commented 2 years ago

not fixed

 ** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘mongolite’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/lib/R/library/00LOCK-mongolite/00new/mongolite/libs/mongolite.so':
  Error relocating /usr/lib/R/library/00LOCK-mongolite/00new/mongolite/libs/mongolite.so: res_ninit: symbol not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/lib/R/library/mongolite’

tried incrementally with: apk add libressl apk add libressl-dev apk add libssl3 apk add libssl1.1

 $ ls  /usr/lib/*ssl*
/usr/lib/libssl.a          /usr/lib/libssl.so.1.1     /usr/lib/libssl.so.50
/usr/lib/libssl.so         /usr/lib/libssl.so.3       /usr/lib/libssl.so.50.0.0

 $ usr/local/lib/*ssl*
bash: usr/local/lib/*ssl*: No such file or directory

cran nor master build @jeroen

jeroen commented 2 years ago

Thanks, this is another issue, probably related to the newly added aws-auth module.

jeroen commented 2 years ago

https://stackoverflow.com/questions/69479642/error-res-ninit-was-not-declared-in-this-scope-did-you-mean-res-init

jeroen commented 2 years ago

Can you try again from the master branch?