在R上安装TDA包时出错:目标'diag.o'的配方失败

时间:2017-08-12 05:44:36

标签: r package

使用Ubuntu 16.04和R 3.4.1。安装R包TDA时收到错误消息。它似乎是制作CGAL,diag.cpp和/或diag.o(完整的错误打印输出)。

我仔细研究了这个: Error when installing TDA package on R

但我安装了libgmp3-dev和libmpfr-dev(我尝试删除它们然后我确实收到了错误消息)。我也尝试删除并手动安装TDA(https://cran.r-project.org/web/packages/TDA/index.html)的Imports和LinkingTo包,但没有运气。也尝试了

  1. 使用sudo和install.packages运行R
  2. 下载二进制文件并使用sudo R CMD INSTALL TDA安装
  3. 安装CGAL
  4. 任何帮助表示感谢。

    install.packages("TDA")
    Installing package into ‘/usr/local/lib/R/site-library’
    (as ‘lib’ is unspecified)
    trying URL 'https://cran.revolutionanalytics.com/src/contrib/TDA_1.5.1.tar.gz'
    Content type 'application/octet-stream' length 2008762 bytes (1.9 MB)
    ==================================================
    downloaded 1.9 MB
    
    * installing *source* package ‘TDA’ ...
    ** package ‘TDA’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -std=gnu++11 -I/usr/share/R/include    -I. -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/usr/local/lib/R/site-library/BH/include"   -DBOOST_DISABLE_THREADS -DCGAL_EIGEN3_ENABLED -DCGAL_HEADER_ONLY -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
    g++ -std=gnu++11 -I/usr/share/R/include    -I. -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/usr/local/lib/R/site-library/BH/include"   -DBOOST_DISABLE_THREADS -DCGAL_EIGEN3_ENABLED -DCGAL_HEADER_ONLY -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c diag.cpp -o diag.o
    In file included from ./CGAL/Triangulation_ds_cell_base_3.h:27:0,
                     from ./CGAL/Triangulation_data_structure_3.h:47,
                     from ./CGAL/Triangulation_3.h:43,
                     from ./CGAL/Delaunay_triangulation_3.h:37,
                     from ./tdautils/cgalUtils.h:5,
                     from diag.cpp:25:
    ./CGAL/Triangulation_ds_cell_base_3.h: In instantiation of ‘void CGAL::Triangulation_ds_cell_base_3<TDS>::set_neighbor(int, CGAL::Triangulation_ds_cell_base_3<TDS>::Cell_handle) [with TDS = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; CGAL::Triangulation_ds_cell_base_3<TDS>::Cell_handle = CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Alpha_shape_cell_base_3<CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > > >, CGAL::Boolean_tag<false>, CGAL::Boolean_tag<false> >, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’:
    ./CGAL/Triangulation_data_structure_3.h:2782:7:   required from ‘CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::Vertex_handle CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::insert_increase_dimension(CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::Vertex_handle) [with Vb = CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>; Cb = CGAL::Alpha_shape_cell_base_3<CGAL::Epick>; Concurrency_tag_ = CGAL::Sequential_tag; CGAL::Triangulation_data_structure_3<Vb, Cb, Concurrency_tag_>::Vertex_handle = CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick, CGAL::Triangulation_vertex_base_3<CGAL::Epick, CGAL::Triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > > >, CGAL::Boolean_tag<false>, CGAL::Boolean_tag<false> >, CGAL::Default, CGAL::Default, CGAL::Default>, false>]’
    ./CGAL/Triangulation_3.h:623:16:   required from ‘void CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::init_tds() [with GT = CGAL::Epick; Tds_ = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; Lock_data_structure_ = CGAL::Default]’
    ./CGAL/Triangulation_3.h:655:15:   required from ‘CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::Triangulation_3(const GT&, CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::Lock_data_structure*) [with GT = CGAL::Epick; Tds_ = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; Lock_data_structure_ = CGAL::Default; CGAL::Triangulation_3<GT, Tds, Lock_data_structure>::Lock_data_structure = void]’
    ./CGAL/Delaunay_triangulation_3.h:229:26:   required from ‘CGAL::Delaunay_triangulation_3<Gt, Tds_, CGAL::Default, Lock_data_structure_>::Delaunay_triangulation_3(const Gt&, CGAL::Delaunay_triangulation_3<Gt, Tds_, CGAL::Default, Lock_data_structure_>::Lock_data_structure*) [with Gt = CGAL::Epick; Tds_ = CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> >; Lock_data_structure_ = CGAL::Default; CGAL::Delaunay_triangulation_3<Gt, Tds_, CGAL::Default, Lock_data_structure_>::Lock_data_structure = void]’
    ./CGAL/Alpha_shape_3.h:263:51:   required from ‘CGAL::Alpha_shape_3<Dt, ExactAlphaComparisonTag>::Alpha_shape_3(const InputIterator&, const InputIterator&, const NT&, CGAL::Alpha_shape_3<Dt, ExactAlphaComparisonTag>::Mode) [with InputIterator = std::_List_iterator<CGAL::Point_3<CGAL::Epick> >; Dt = CGAL::Delaunay_triangulation_3<CGAL::Epick, CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > >; ExactAlphaComparisonTag = CGAL::Boolean_tag<false>; CGAL::Alpha_shape_3<Dt, ExactAlphaComparisonTag>::NT = double]’
    diag.cpp:680:65:   required from here
    ./CGAL/Triangulation_ds_cell_base_3.h:166:39: error: ‘class CGAL::Alpha_shape_cell_base_3<CGAL::Epick, CGAL::Triangulation_cell_base_3<CGAL::Epick, CGAL::Triangulation_ds_cell_base_3<CGAL::Triangulation_data_structure_3<CGAL::Alpha_shape_vertex_base_3<CGAL::Epick>, CGAL::Alpha_shape_cell_base_3<CGAL::Epick> > > >, CGAL::Boolean_tag<false>, CGAL::Boolean_tag<false> >’ has no member named ‘operator()’
      CGAL_triangulation_precondition(this != n->operator());
                                           ^
    ./CGAL/triangulation_assertions.h:130:20: note: in definition of macro ‘CGAL_triangulation_precondition’
        (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX 
                        ^
    /usr/lib/R/etc/Makeconf:168: recipe for target 'diag.o' failed
    make: *** [diag.o] Error 1
    ERROR: compilation failed for package ‘TDA’
    * removing ‘/usr/local/lib/R/site-library/TDA’
    
    The downloaded source packages are in
        ‘/tmp/RtmpFqA1Fu/downloaded_packages’
    Warning message:
    In install.packages("TDA") :
      installation of package ‘TDA’ had non-zero exit status
    > 
    

1 个答案:

答案 0 :(得分:0)

TDA v1.5.1在我的Linux服务器上存在同样的问题。尝试安装以前的版本:

install.packages("devtools")
require(devtools);
install_version('TDA', version='1.4.1')