Skip to content

[Rcpp-devel] fatal error: RcppArmadillo.h: No such file or directory

4 messages · binbinlu at whu.edu.cn, Dirk Eddelbuettel

#
Dear all,

I got an incoming check error in Debian when submiting a new version of the package GWmodel to CRAN, of which the detials are as follows:

* installing *source* package ‘GWmodel’ ...
** using staged installation
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
Checking for C++ Compiler
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking "Checking environment variable CUDA_HOME"... "CUDA_HOME not set; using highest version found "
checking for /bin/nvcc... no
"NVCC not found"
./configure: line 2830: 'R' should not be used without a path -- see par. 1.6 of the manual/bin/R: No such file or directory
./configure: line 2831: 'R' should not be used without a path -- see par. 1.6 of the manual/bin/R: No such file or directory
./configure: line 2832: 'R' should not be used without a path -- see par. 1.6 of the manual/bin/R: No such file or directory
checking for Rscript... yes
./configure: line 2875: 'R': command not found
./configure: line 2876: 'R': command not found
building the nvcc command line
building the cuda include path
You use staged install
Your real libray is /srv/hornik/tmp/CRAN/GWmodel.Rcheck/GWmodel
configure: Building Makevars
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++-10  -std=gnu++11 -fopenmp -DNDEBUG -g -O2 -Wall -pedantic -mtune=native    -I./GWmodelCUDA     RcppExports.cpp -c
RcppExports.cpp:4:10: fatal error: RcppArmadillo.h: No such file or directory
4 | #include 
|          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makevars:76: RcppExports.o] Error 1
ERROR: compilation failed for package ‘GWmodel’
* removing ‘/srv/hornik/tmp/CRAN/GWmodel.Rcheck/GWmodel’


Tried to fix it by following the answers to the similar problem, but didn't work it out. Note there is no problem when being checked in Windows. See more details in the directory:


Many thanks in advances.

Best regards,
Binbin
#
On 27 October 2020 at 10:36, binbinlu at whu.edu.cn wrote:
| Dear all,
| 
| I got an incoming check error in Debian when submiting a new version of the package GWmodel to CRAN, of which the detials are as follows:
| 
| * installing *source* package ‘GWmodel’ ...
| ** using staged installation
| checking for g++... g++
| checking whether the C++ compiler works... yes
| checking for C++ compiler default output file name... a.out
| checking for suffix of executables... 
| checking whether we are cross compiling... no
| checking for suffix of object files... o
| checking whether we are using the GNU C++ compiler... yes
| checking whether g++ accepts -g... yes
| checking how to run the C++ preprocessor... g++ -E
| Checking for C++ Compiler
| checking whether we are using the GNU C++ compiler... (cached) yes
| checking whether g++ accepts -g... (cached) yes
| checking "Checking environment variable CUDA_HOME"... "CUDA_HOME not set; using highest version found "
| checking for /bin/nvcc... no
| "NVCC not found"
| ./configure: line 2830: 'R' should not be used without a path -- see par. 1.6 of the manual/bin/R: No such file or directory

That is likely your issue. The build needs the (NVidia) compiler nvcc. None
is found.

Could it be that your package does something to the path or settings?

| ./configure: line 2831: 'R' should not be used without a path -- see par. 1.6 of the manual/bin/R: No such file or directory
| ./configure: line 2832: 'R' should not be used without a path -- see par. 1.6 of the manual/bin/R: No such file or directory
| checking for Rscript... yes
| ./configure: line 2875: 'R': command not found
| ./configure: line 2876: 'R': command not found
| building the nvcc command line
| building the cuda include path
| You use staged install
| Your real libray is /srv/hornik/tmp/CRAN/GWmodel.Rcheck/GWmodel
| configure: Building Makevars
| configure: creating ./config.status
| config.status: creating src/Makevars
| ** libs
| g++-10  -std=gnu++11 -fopenmp -DNDEBUG -g -O2 -Wall -pedantic -mtune=native    -I./GWmodelCUDA     RcppExports.cpp -c
| RcppExports.cpp:4:10: fatal error: RcppArmadillo.h: No such file or directory
| 4 | #include 
| |          ^~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makevars:76: RcppExports.o] Error 1
| ERROR: compilation failed for package ‘GWmodel’
| * removing ‘/srv/hornik/tmp/CRAN/GWmodel.Rcheck/GWmodel’

That is a likely side effect of the earlier issue.

This is most likely _not_ an issue in Rcpp---we do nothing with NVidia or
CUDA or your path.

Let me know if you need more help.

Dirk

 
 
| Tried to fix it by following the answers to the similar problem, but didn't work it out. Note there is no problem when being checked in Windows. See more details in the directory:
| 
| 
| Many thanks in advances.
| 
| Best regards,
| Binbin
| 
| 
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
#
Dear Dirk,

Many thanks for your response. We incorporated the CUDA technique for parallel computations, where NVCC (Nvidia) compiler is required.

We set not to compile this part as default, unless all the conditions are met (like NVCC compiler) when installing the package. It seems that this strategy works for Windows, but not for Debian. Any suggestion on it? Now we cannot submit it to CRAN if the issue cannot be fixed. Many thanks.

Best regards,
Binbin
#
Binbin,
On 27 October 2020 at 11:35, binbinlu at whu.edu.cn wrote:
| Many thanks for your response. We incorporated the CUDA technique for parallel computations, where NVCC (Nvidia) compiler is required.
| 
| We set not to compile this part as default, unless all the conditions are met (like NVCC compiler) when installing the package. It seems that this strategy works for Windows, but not for Debian. Any suggestion on it? Now we cannot submit it to CRAN if the issue cannot be fixed. Many thanks.

Yes, this is commonly done via a tool (and language) called 'autoconf' by
writing a test file called 'configure.ac' that is then turned into by
'autoconf' in a file called 'configure' which is run.

Writing those is not easy at first.

As an alternative you _can_ write a shell script 'configure' (or even a
script in another language, including R).  All this does require some effort
of thought so you should think this through.

As none of this has any direct relationship with whether Rcpp is used or not,
follow-up posts may be better off on r-package-devel (a great list if you're
not subscribed yet) or other venues.

Regards, Dirk