【问题标题】:Failure to install phylosmith - unable to load shared object, undefined symbol安装 phylosmith 失败 - 无法加载共享对象,未定义符号
【发布时间】:2021-04-16 17:01:10
【问题描述】:

设置: R 版本 4.0.5 (2021-03-31) -- “摇一摇” 平台:x86_64-pc-linux-gnu(64位) Ubuntu 16.04

问题: 无法安装 phylosmith 软件包。 命令:devtools::install_github('schuyler-smith/phylosmith', lib = "/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/")

输出:

Downloading GitHub repo schuyler-smith/phylosmith@HEAD
✓  checking for file ‘/tmp/RtmpOU4qAW/remotes570e65639b36/schuyler-smith-phylosmith-2bd9c9b/DESCRIPTION’ ...
─  preparing ‘phylosmith’:
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘phylosmith_1.0.5.tar.gz’
   
* installing *source* package ‘phylosmith’ ...
** using staged installation
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ -std=gnu++11 accepts -g... (cached) yes
checking whether g++ version is sufficient... (5.4.0) yes
checking for macOS... not found as on Linux
checking for OpenMP... found
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppParallel/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppArmadillo/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppProgress/include'   -I../inst/include -fopenmp -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" -DNDEBUG  -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppParallel/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppArmadillo/include' -I'/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/RcppProgress/include'   -I../inst/include -fopenmp -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c correlations_Rcpp.cpp -o correlations_Rcpp.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o phylosmith.so RcppExports.o correlations_Rcpp.o -fopenmp -DARMA_64BIT_WORD -L/usr/lib/R/lib -lR
installing to /home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-phylosmith/00new/phylosmith/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘phylosmith’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-phylosmith/00new/phylosmith/libs/phylosmith.so':
  /home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-phylosmith/00new/phylosmith/libs/phylosmith.so: undefined symbol: _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/phylosmith’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpOU4qAW/file570e27910aa/phylosmith_1.0.5.tar.gz’ had non-zero exit status'

附加信息:我看到其他帖子有类似的问题,但不同的未定义符号。我相信这个错误是特定于我给定的未定义符号 (_ZN3tbb10interface58internal9task_base7destroyERNS_4taskE) 但我不确定这与它有什么关系或如何解决它。

我尝试过更改库并直接从 .tar.gz 文件安装它。我有 GDAL 2.2.2 版,我认为它也是我唯一的安装。

我什至尝试在完成安装之前复制 finsihed 文件夹,然后将其粘贴到库中。包文件夹看起来很完整。然后,当我运行命令library(phylosmith) 时,我得到了输出:

Error: package or namespace load failed for ‘phylosmith’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/phylosmith/libs/phylosmith.so':
  /home/dunfield/R/x86_64-pc-linux-gnu-library/4.0/phylosmith/libs/phylosmith.so: undefined symbol: _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE

我也按照指示事先运行了linux命令:

sudo apt install libmysqlclient-dev libgdal-dev libudunits2-dev

我使用终端命令 apt install libtbb-dev 和 R devtools::install_package("jjallaire/TBB") 中的 TBB 包安装了 TBB。即使在重新启动 Linux 和 RStudio 后,也没有尝试更改错误输出。

此时,我知道它与 .so 文件中包含 tbb 的符号有关。任何故障排除帮助将不胜感激!

【问题讨论】:

  • 我可以在我的机器上重现该问题。相同的未定义符号。考虑在作者的 github 上写一个 issue。
  • 非常感谢您的测试!我很高兴至少不仅仅是我的 Linux。我已经在phylosmith论坛上发布了同样的问题,所以希望作者能回复我。

标签: r linux tbb phyloseq


【解决方案1】:

作者修复了! Phylosmith 现在应该可以在 Linux 上安装没问题了。有关详细信息,请参阅 github.com/schuyler-smith/phylosmith/issues/15。

【讨论】:

    猜你喜欢
    • 2016-03-25
    • 2018-03-10
    • 1970-01-01
    • 2023-03-08
    • 2016-08-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多