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

Unable to install on Amazon Linux 2 #217

Closed
abarrafo opened this issue Aug 8, 2019 · 4 comments
Closed

Unable to install on Amazon Linux 2 #217

abarrafo opened this issue Aug 8, 2019 · 4 comments

Comments

@abarrafo
Copy link

abarrafo commented Aug 8, 2019

sudo yum install ImageMagick-c++-devel installs ImageMagick-c++-devel-6.7.8.9-15.amzn2.0.2.x86_64

install.packages('magick')

fails with

Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/mnt/user/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-magick/00new/magick/libs/magick.so':
  /mnt/username/R/x86_64-redhat-linux-gnu-library/3.6/00LOCK-magick/00new/magick/libs/magick.so: undefined symbol: _ZN6Magick11magickImageC1ERKSs
sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Amazon Linux 2

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0 
identify --version
Version: ImageMagick 6.7.8-9 2018-07-31 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
@ShotaOchi
Copy link

Did you see #166?

@abarrafo
Copy link
Author

abarrafo commented Aug 9, 2019

@ShotaOchi, I did see that but was unable to take away any clear way working through the issue. I don't have multiple installations of ImageMagick. My guess is that there the ImageMagick being pulled down from AWS is compiled with a version of gcc (gcc48 It appears even though gcc7 is the default on the machine) than what magick was compiled with (CXX in R is also set to gcc48).

I'm unsure about what steps would be the correct steps to resolve? Do I pull down ImageMagick from source and build with gcc7? And pull down magick and build from source also using gcc7?

@jeroen
Copy link
Member

jeroen commented Aug 9, 2019

Why don't you compile the R package with the default gcc 4.8? I tested on CentOS 6 with R-devel from EPEL and it seems to work fine.

@abarrafo
Copy link
Author

abarrafo commented Aug 9, 2019

Ok, I think I have it worked out. ImageMagic was being compiled with gcc not gcc48, setting my ~/.R/Makevars file with CC=gcc CXX=g++ CXX98=g++ CXX11=g++ did the trick.

@jeroen jeroen closed this as completed Aug 10, 2019
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

3 participants