compilation fails - Rf_pythag undeclared
leleory opened this issue · comments
Hi Thomas,
When I try to install the tweenr package it gives me the following error msg:
install.packages("tweenr")
- installing source package ‘tweenr’ ...
** package ‘tweenr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c RcppExports.cpp -o RcppExports.o
In file included from /usr/lib64/R/library/Rcpp/include/RcppCommon.h:67,
from /usr/lib64/R/library/Rcpp/include/Rcpp.h:27,
from RcppExports.cpp:4:
/usr/lib64/R/library/Rcpp/include/Rcpp/sprintf.h: In function ‘std::string Rcpp::sprintf(const char*, ...)’:
/usr/lib64/R/library/Rcpp/include/Rcpp/sprintf.h:30:12: warning: unnecessary parentheses in declaration of ‘ap’ [-Wparentheses]
30 | va_list(ap);
| ^~~~
/usr/lib64/R/library/Rcpp/include/Rcpp/sprintf.h:30:12: note: remove parentheses
30 | va_list(ap);
| ^~~~
| - -
In file included from /usr/lib64/R/library/Rcpp/include/Rcpp.h:77,
from RcppExports.cpp:4:
/usr/lib64/R/library/Rcpp/include/Rcpp/Rmath.h: In function ‘double R::pythag(double, double)’:
/usr/lib64/R/library/Rcpp/include/Rcpp/Rmath.h:222:60: error: ‘::Rf_pythag’ has not been declared; did you mean ‘pythag’?
222 | inline double pythag(double a, double b) { return ::Rf_pythag(a, b); }
| ^~~~~~~~~
| pythag
make: *** [/usr/lib64/R/etc/Makeconf:181: RcppExports.o] Error 1
ERROR: compilation failed for package ‘tweenr’ - removing ‘/usr/lib64/R/library/tweenr’
My session info is the following:
sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 34 (Workstation Edition)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libflexiblas.so.3.0
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.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_4.0.5 tools_4.0.5 tcltk_4.0.5
Thanks,
Lel
I have also tried installing the development version through devtools. That also leads to errors:
devtools::install_github('thomasp85/tweenr')
Downloading GitHub repo thomasp85/tweenr@HEAD
✔ checking for file ‘/tmp/Rtmp361Itu/remotes37ef049973727/thomasp85-tweenr-4b049e6/DESCRIPTION’ ...
─ preparing ‘tweenr’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘tweenr_1.0.2.9000.tar.gz’
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
- installing source package ‘tweenr’ ...
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I'/usr/lib64/R/library/cpp11/include' -I/usr/local/include -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c along.cpp -o along.o
along.cpp:57:77: error: missing template arguments before ‘data’
57 | cpp11::writable::data_frame colour_along_interpolator(cpp11::doubles_matrix data,
| ^~~~
along.cpp:58:71: error: expected primary-expression before ‘group’
58 | cpp11::integers group,
| ^~~~~
along.cpp:59:70: error: expected primary-expression before ‘time’
59 | cpp11::doubles time,
| ^~~~
along.cpp:60:55: error: expected primary-expression before ‘bool’
60 | bool history,
| ^~~~
along.cpp:61:55: error: expected primary-expression before ‘bool’
61 | bool keep_last,
| ^~~~
along.cpp:62:70: error: expected primary-expression before ‘frames’
62 | cpp11::doubles frames,
| ^~~~~~
along.cpp:63:70: error: expected primary-expression before ‘ease’
63 | cpp11::strings ease) {
| ^~~~
along.cpp:63:76: error: expected ‘,’ or ‘;’ before ‘{’ token
63 | cpp11::strings ease) {
| ^
make: *** [/usr/lib64/R/etc/Makeconf:181: along.o] Error 1
ERROR: compilation failed for package ‘tweenr’ - removing ‘/usr/lib64/R/library/tweenr’
Warning message:
In i.p(...) :
installation of package ‘/tmp/Rtmp361Itu/file37ef063bd17f4/tweenr_1.0.2.9000.tar.gz’ had non-zero exit status
Any help would be appreciated.
Lel
After re-installing Rcpp the error disappeared.
Thanks,
Lel