Skip to content

Installation issue of R packages depending on C++/Rcpp #1396

@marcozanotti

Description

@marcozanotti

Hi,

I am having some installation issues in R, I suppose related to Rcpp.
I am trying to install the r package interpolation which depends on C++.
I am on Ubuntu 22.04.

install.packages('interpolation')
...
make: *** [/usr/lib/R/etc/Makeconf:211: RcppExports.o] Error 1
ERROR: compilation failed for package ‘interpolation’

I suppose it is an error related to C++/Rcpp because I see things like

Installing package into ‘/home/marco/R/x86_64-pc-linux-gnu-library/4.5’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/interpolation_0.1.1.tar.gz'
Content type 'application/x-gzip' length 6568 bytes
==================================================
downloaded 6568 bytes

* installing *source* package ‘interpolation’ ...
** this is package ‘interpolation’ version ‘0.1.1’
** package ‘interpolation’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
using C++17
g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG  -I'/home/marco/R/x86_64-pc-linux-gnu-library/4.5/Rcpp/include' -I'/home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include' -I'/home/marco/R/x86_64-pc-linux-gnu-library/4.5/BH/include'    -DCGAL_HEADER_ONLY=1  -fpic  -g -O2 -ffile-prefix-map=/build/r-base-0RQCNp/r-base-4.5.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2   -c RcppExports.cpp -o RcppExports.o

...

/home/marco/R/x86_64-pc-linux-gnu-library/4.5/BH/include/boost/multiprecision/detail/generic_interconvert.hpp:36:6: note:   template argument deduction/substitution failed:
In file included from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/BH/include/boost/multiprecision/cpp_int.hpp:19,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Quotient.h:37,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Kernel_d/Cartesian_const_iterator_d.h:20,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Homogeneous/VectorH2.h:23,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Homogeneous/predicates_on_directionsH2.h:22,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Homogeneous/DirectionH2.h:100,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Homogeneous/Homogeneous_base.h:29,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Simple_homogeneous.h:20,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Exact_kernel_selector.h:24,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Filtered_kernel.h:22,
                 from /home/marco/R/x86_64-pc-linux-gnu-library/4.5/RcppCGAL/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:21,
                 from interpolation_types.h:7,
                 from RcppExports.cpp:4:
/home/marco/R/x86_64-pc-linux-gnu-library/4.5/BH/include/boost/multiprecision/number.hpp:164:54: note:   cannot convert ‘boost::multiprecision::number_category<boost::multiprecision::backends::gmp_rational>()’ (type ‘boost::multiprecision::number_category<boost::multiprecision::backends::gmp_rational>’) to type ‘const std::integral_constant<int, 1>&’
  164 |       generic_interconvert(backend(), val.backend(), number_category<Backend>(), number_category<Other>());
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

Do you have any idea how to solve this?

Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions