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

Incompatible with Apple Silicon Mac #154

Open
ibgui00 opened this issue Feb 28, 2024 · 7 comments
Open

Incompatible with Apple Silicon Mac #154

ibgui00 opened this issue Feb 28, 2024 · 7 comments

Comments

@ibgui00
Copy link

ibgui00 commented Feb 28, 2024

The installation is incompatible with Apple Silicon Mac. Is anyone aware of how to go around this issue?

@spribitzer
Copy link

We have been running into this issue as well and would appreciate a fix. Installation from source (bioconductor, github) yields the following error message:

clang++ -arch arm64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o CytoML.so cpp11.o parseFlowJoWorkspace.o /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/cytolib/lib/libcytolib.a /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rhdf5lib/lib/libhdf5_cpp.a /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rhdf5lib/lib/libhdf5.a -L/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rhdf5lib/lib -lcrypto -lcurl -lsz -laec -lz -ldl -lm -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: ignoring duplicate libraries: '-lm', '-lz'
ld: library 'crypto' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [CytoML.so] Error 1
ERROR: compilation failed for package ‘CytoML’

I have tried sourcing CytoML.so and building CytoML on other machines, but was not successful:

  • If the package was built on Macs with x86 architecture the package won't load with a complaint that the wrong architecture was used.
  • If I use an R docker image (ubuntu), and build CytoML, I get an arm64 built, but library(CytoML) then errors with CytoML.so' (not a mach-o file)

@Tetsuichi
Copy link

I am using the M3 chip and I too am having trouble installing it with the same error.

@davnovak
Copy link

davnovak commented Apr 22, 2024

Using an Apple M1 chip with macOS Sonoma 14.1.1, R version 4.3.3., I also have this problem, also with ld: library 'crypto' not found. Using the x86_64 version of R does not fix this problem (same error message). Any work-arounds for this?

@emjbishop
Copy link

I have two mac users who also experience the ld: library 'crypto' not found error (no solution yet). As far as I can tell the 'crypto' package is related to cryptocurrency so this seems really odd (perhaps sketchy?).

@davnovak
Copy link

davnovak commented Apr 28, 2024

Installing OpenSSL and updating PATH resolves this issue on at least some machines.

In terminal:

brew install openssl

In R session:

Sys.setenv(LIBRARY_PATH = '/opt/homebrew/lib')
Sys.setenv(LDFLAGS = '-L/opt/homebrew/lib')
Sys.setenv(CPPFLAGS = '-I/opt/homebrew/include')

If this works consistently, it should enable the package authors to include Apple Silicon install instructions and to provide a macOS arm64 binary on Bioconductor if they choose to.

@Tetsuichi
Copy link

Installing OpenSSL and updating PATH resolves this issue on at least some machines.

In terminal:

brew install openssl

In R session:

Sys.setenv(LIBRARY_PATH = '/opt/homebrew/lib')
Sys.setenv(LDFLAGS = '-L/opt/homebrew/lib')
Sys.setenv(CPPFLAGS = '-I/opt/homebrew/include')

If this works consistently, it should enable the package authors to include Apple Silicon install instructions and to provide a macOS arm64 binary on Bioconductor if they choose to.

This worked! Thank you!

@spribitzer
Copy link

@davnovak thanks. That worked for me. Adding the PATHs worked. Interestingly, most of the times that I have brew dependencies, I can launch R from the command line and compile from source then. But that did not work for CytoML.
But manually setting the paths did! So thank you, learned something new.

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

5 participants