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

Installation of ggplot2 fails because of mgcv on macOS #184

Open
fniephaus opened this issue Apr 21, 2021 · 1 comment
Open

Installation of ggplot2 fails because of mgcv on macOS #184

fniephaus opened this issue Apr 21, 2021 · 1 comment
Labels

Comments

@fniephaus
Copy link
Member

Repro: R -e 'install.packages("ggplot2")'

Here's the error:

installing to /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/00LOCK-mgcv/00new/mgcv/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in polyglot evaluation : dlopen(/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/nlme/libs/nlme.so, 6): Library not loaded: /cm/shared/apps/gcc/8.3.0/lib/libgfortran.5.dylib
  Referenced from: /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/nlme/libs/nlme.so
  Reason: image not found
Error in polyglot evaluation : dlopen(/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/nlme/libs/nlme.so, 6): Library not loaded: /cm/shared/apps/gcc/8.3.0/lib/libgfortran.5.dylib
  Referenced from: /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/nlme/libs/nlme.so
  Reason: image not found
ERROR: lazy loading failed for package ‘mgcv’

I was able to fix this by running the following commands as a workaround:

$ install_name_tool -change "/cm/shared/apps/gcc/8.3.0/lib/libgfortran.5.dylib" "/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/lib/libgfortran.5.dylib" /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/nlme/libs/nlme.so
$ install_name_tool -change "/cm/shared/apps/gcc/8.3.0/lib/libquadmath.0.dylib" "/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/lib/libquadmath.0.dylib" /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/nlme/libs/nlme.so
$ install_name_tool -change "/cm/shared/apps/gcc/8.3.0/lib/libgcc_s.1.dylib" "/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/lib/libgcc_s.1.dylib" /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/nlme/libs/nlme.so
$ install_name_tool -change "/cm/shared/apps/gcc/8.3.0/lib/libgfortran.5.dylib" "/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/lib/libgfortran.5.dylib" /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/Matrix/libs/Matrix.so
$ install_name_tool -change "/cm/shared/apps/gcc/8.3.0/lib/libquadmath.0.dylib" "/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/lib/libquadmath.0.dylib" /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/Matrix/libs/Matrix.so
$ install_name_tool -change "/cm/shared/apps/gcc/8.3.0/lib/libgcc_s.1.dylib" "/Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/lib/libgcc_s.1.dylib" /Users/fniephaus/bin/graalvm-ce-java11-21.1.0/Contents/Home/languages/R/library/Matrix/libs/Matrix.so
@fniephaus fniephaus added the bug label Apr 21, 2021
@mik3hall
Copy link

mik3hall commented Jun 4, 2021

The same is necessary for install.packages("xgboost") for libgfortran and libquadmath in
graalvm-ce-java11-21.2.0-dev/Contents/Home/languages/R/library/Matrix/libs/Matrix.so
I used the dev because of an internal error in 21.1.0 which dev appears to fix except for the name changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants