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

Installing R package from source fails #63

Open
GabrielHoffman opened this issue Aug 20, 2022 · 0 comments
Open

Installing R package from source fails #63

GabrielHoffman opened this issue Aug 20, 2022 · 0 comments

Comments

@GabrielHoffman
Copy link

I am having an installation issue.

On R 4.1.0 and 4.2.0 on CentOS 7.6.1810 installing PRIMME 3.2-3 fails with the following error:

* installing *source* package ‘PRIMME’ ...
** package ‘PRIMME’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++14 -I"/hpc/packages/minerva-centos7/R/4.2.0/lib64/R/include" -DNDEBUG  -I'/hpc/packages/minerva-centos7/rpackages/4.2.0/site-library/Rcpp/include' -I'/hpc/packages/minerva-centos7/R/4.2.0/lib64/R/library/Matrix/include' -I/usr/local/include  -I../inst/include  -DPRIMME_INT_SIZE=0 -DF77UNDERSCORE -DUSE_XHEEV -DUSE_ZGESV -DUSE_XHEGV -DPRIMME_INT_SIZE=0 -DPRIMME_WITHOUT_FLOAT -DPRIMME_BLAS_RCOMPLEX -fpic  -O3 -fopenmp  -c RcppExports.cpp -o RcppExports.o
gcc -I"/hpc/packages/minerva-centos7/R/4.2.0/lib64/R/include" -DNDEBUG  -I'/hpc/packages/minerva-centos7/rpackages/4.2.0/site-library/Rcpp/include' -I'/hpc/packages/minerva-centos7/R/4.2.0/lib64/R/library/Matrix/include' -I/usr/local/include   -fpic  -I/hpc/packages/minerva-centos7/pcre2/10.35/include -O3 -fopenmp  -c init.c -o init.o
g++ -std=gnu++14 -I"/hpc/packages/minerva-centos7/R/4.2.0/lib64/R/include" -DNDEBUG  -I'/hpc/packages/minerva-centos7/rpackages/4.2.0/site-library/Rcpp/include' -I'/hpc/packages/minerva-centos7/R/4.2.0/lib64/R/library/Matrix/include' -I/usr/local/include  -I../inst/include  -DPRIMME_INT_SIZE=0 -DF77UNDERSCORE -DUSE_XHEEV -DUSE_ZGESV -DUSE_XHEGV -DPRIMME_INT_SIZE=0 -DPRIMME_WITHOUT_FLOAT -DPRIMME_BLAS_RCOMPLEX -fpic  -O3 -fopenmp  -c primmeR.cpp -o primmeR.o
make[1]: Entering directory `/tmp/RtmpMyo4pV/R.INSTALL3165311191421/PRIMME/src/primme'
g++ -std=gnu++14 -I/hpc/packages/minerva-centos7/R/4.2.0/lib64/R/include -DNDEBUG -O3 -fopenmp  -fpic -I../inst/include  -DPRIMME_INT_SIZE=0 -DF77UNDERSCORE -DUSE_XHEEV -DUSE_ZGESV -DUSE_XHEGV -DPRIMME_INT_SIZE=0 -DPRIMME_WITHOUT_FLOAT -DPRIMME_BLAS_RCOMPLEX  /hpc/packages/minerva-centos7/proj/8.1.0/include:/hpc/packages/minerva-centos7/gdal/3.3.1/include -I../../inst/include -Iinclude -c eigs/auxiliary_eigs.cpp -o eigs/auxiliary_eigs.o
g++: error: /hpc/packages/minerva-centos7/proj/8.1.0/include:/hpc/packages/minerva-centos7/gdal/3.3.1/include: No such file or directory
make[1]: *** [eigs/auxiliary_eigs.o] Error 1
make[1]: Leaving directory `/tmp/RtmpMyo4pV/R.INSTALL3165311191421/PRIMME/src/primme'
make: *** [primme/libprimme.a] Error 2
ERROR: compilation failed for package ‘PRIMME’
* removing ‘/hpc/users/hoffmg01/.Rlib/R_420/PRIMME’
* restoring previous ‘/hpc/users/hoffmg01/.Rlib/R_420/PRIMME’

The downloaded source packages are in
	‘/tmp/Rtmp9xHZoS/downloaded_packages’
Warning message:
In install.packages("PRIMME") :
  installation of package ‘PRIMME’ had non-zero exit status

I can fix this manually in bash by running g++ replacing

/hpc/packages/minerva-centos7/proj/8.1.0/include:/hpc/packages/minerva-centos7/gdal/3.3.1/include 

with

-I/hpc/packages/minerva-centos7/proj/8.1.0/include:/hpc/packages/minerva-centos7/gdal/3.3.1/include 

Just adding -I fixed it. But then I had to write a bash script to run g++ outside R.

Can you fix this directly in a makefile? I couldn't figure out how

Thanks,
Gabriel

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

1 participant