【问题标题】:Error when installing TDA package on R: recipe for target 'diag.o' failed在 R 上安装 TDA 包时出错:目标“diag.o”的配方失败
【发布时间】:2018-01-20 15:57:12
【问题描述】:

使用 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

任何帮助表示赞赏。

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
> 

【问题讨论】:

    标签: r package


    【解决方案1】:

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

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

    【讨论】:

    猜你喜欢
    • 2016-12-02
    • 2017-02-27
    • 2020-11-24
    • 1970-01-01
    • 2017-05-17
    • 1970-01-01
    • 2020-05-25
    • 1970-01-01
    • 2022-07-14
    相关资源
    最近更新 更多