Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing test source causes broken configuration on macOS #145

Closed
PikalaxALT opened this issue Oct 8, 2021 · 2 comments
Closed

Missing test source causes broken configuration on macOS #145

PikalaxALT opened this issue Oct 8, 2021 · 2 comments

Comments

@PikalaxALT
Copy link

Installing s2 via BioConductor attempts to use /usr/local/opt/openssl as the search path for libssl and libcrypto but tries to load libssl.1.0.0.dylib which is not a valid library in that folder, therefore I tried github master which modifies configure#L36 to specify openssl@1.1, however this did not resolve the issue.

System: Intel MacBook Pro running Big Sur

Homebrew: installed openssl@1.0, openssl@1.1, openssl@3.0

R version 4.1.1 Kick Things

To reproduce:

devtools::install_github("https://github.com/r-spacial/s2")

Observation:

─  installing *source* package ‘s2’ ...
   ** using staged installation
   Homebrew 3.2.15-41-g5af25ee
   Homebrew/homebrew-core (git revision 922cafb4889; last commit 2021-10-08)
   Homebrew/homebrew-cask (git revision d5e8cc7caa; last commit 2021-10-08)
   Testing compiler using PKG_CFLAGS=-I/usr/local/opt/openssl@1.1/include
   Using PKG_LIBS=-L/usr/local/opt/openssl@1.1/lib -lssl -lcrypto
   Using PKG_CFLAGS=-I/usr/local/opt/openssl@1.1/include -DIS_LITTLE_ENDIAN

...

   ** testing if installed package can be loaded from temporary location
   Error: package or namespace load failed for ‘s2’ in dyn.load(file, DLLpath = DLLpath, ...):
    unable to load shared object '/private/var/folders/xg/1clp6x614c722qd1qvmwc72h0000gn/T/RtmpTmlls3/Rinst111bd41a6ed7b/00LOCK-s2/00new/s2/libs/s2.so':
     dlopen(/private/var/folders/xg/1clp6x614c722qd1qvmwc72h0000gn/T/RtmpTmlls3/Rinst111bd41a6ed7b/00LOCK-s2/00new/s2/libs/s2.so, 6): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
     Referenced from: /private/var/folders/xg/1clp6x614c722qd1qvmwc72h0000gn/T/RtmpTmlls3/Rinst111bd41a6ed7b/00LOCK-s2/00new/s2/libs/s2.so
     Reason: image not found
   Error: loading failed
   Execution halted
   ERROR: loading failed
@PikalaxALT
Copy link
Author

It appears that src/tests/main.c is missing in the git clone, which impacts configuration.

@PikalaxALT PikalaxALT changed the title Installation on macOS 11.5 with homebrew openssl tries to load wrong dylib Missing test source causes broken configuration on macOS Oct 8, 2021
@PikalaxALT
Copy link
Author

I created a dummy src/tests/main.c file which includes <openssl/ssl.h>, calls a library method from that header, and prints "Hello, world!". The resulting configuration generates a successful build.

paleolimbot added a commit that referenced this issue Oct 9, 2021
paleolimbot pushed a commit that referenced this issue Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants