1

Trying to use the lidR package on RStudio Server and I have been unable to install the dependency 'rlas'. I added some variable to define the Makevars shown here:

CXX14 = g++ -std=c++1y

But still get errors. My console actually fills up beyond the character limit so I can't see where the error begins but there is a lot of repeating text of:

  required from here
/home/mblasdel/R/x86_64-pc-linux-gnu-library/4.0/BH/include/boost/geometry/core/tag.hpp:68:17: 
error: no type named ‘type’ in ‘struct 
boost::geometry::util::remove_cptrref<boost::geometry::model::multi_polygon<boost::geometry::model::
polygon<boost::geometry::model::point<double, 2ul, boost::geometry::cs::cartesian> > > >’

Not sure how to parse all of these errors but I assume there is some C++ issue going on.

System info:

platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          4                           
minor          0.2                         
year           2020                        
month          06                          
day            22                          
svn rev        78730                       
language       R                           
version.string R version 4.0.2 (2020-06-22)
nickname       Taking Off Again  

I have this package installed on my Ubuntu laptop so I'm not sure what the issue is with the operating system. I believe the RStudio Server is redhat distribution. Any help would be greatly appreciated.

JRR
  • 3,024
  • 2
  • 13
  • 37
Mxblsdl
  • 484
  • 6
  • 16

1 Answers1

0

lidR uses boost geometry which requires in its latest version to compile in C++14. gcc 4.8 is pretty old and does not support full C++14 standard. Only pre-standard C++14 with c++1y. See Compile c++14-code with g++

The CRAN no longer compiles with gcc 4.8. They used 4.9 for old versions of R and gcc > 8 on all other flavours. See https://cran.r-project.org/web/checks/check_flavors.html

So the way is to get a fairly recent compiler I guess. gcc >= 5 should be ok

JRR
  • 3,024
  • 2
  • 13
  • 37