运行devtools时的未定义符号:: check()

时间:2016-06-06 22:29:05

标签: r rcpp devtools

我正在研究markovchain package。开始开发此程序包时,未使用roxygen2记录功能。最近,我更新了使用roxygen2的函数文档。注意:NAMESPACE不会生成roxygen2。它目前正在使用旧的NAMESPACE文件。

当我跑devtools::check()时发生错误!

  

dyn.load(dllfile)出错:无法加载共享对象   '/home/deepak/Desktop/gsoc/markovchain/src/markovchain.so':
  /home/deepak/Desktop/gsoc/markovchain/src/markovchain.so:undefined   符号:   _Z14markovchainFitP7SEXPRECN4Rcpp6StringEbidS2_bdNS1_6MatrixILi14ENS1_15PreserveStorageEEE

我看过其他 SO 帖子,其中一些.so文件丢失,但在我的情况下则不然。

    R CMD ldd -r src/markovchain.so

    linux-vdso.so.1 =>  (0x00007fffed77d000)
    libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f100a3a7000)
    libR.so => /usr/lib/R/lib/libR.so (0x00007f1009d8a000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1009a85000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f100977f000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1009569000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f10091a3000)
    libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f1008e89000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1008c6b000)
    libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007f1008a24000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f10087e6000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f10085c4000)
    libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f10083b3000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f100819a000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1007f92000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1007d8d000)
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f1007b7e000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f100abf6000)
    libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f1007941000)
    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f1007718000)
  undefined symbol:   _Z14markovchainFitP7SEXPRECN4Rcpp6StringEbidS2_bdNS1_6MatrixILi14ENS1_15PreserveStorageEEE    (src/markovchain.so)

devtools::build_win()

的结果
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/tmp/Rtmp5Aq9Pf/Rinst7f791b0e862f/markovchain/libs/markovchain.so':
  /tmp/Rtmp5Aq9Pf/Rinst7f791b0e862f/markovchain/libs/markovchain.so: undefined symbol: _Z14markovchainFitP7SEXPRECN4Rcpp6StringEbidS2_bdNS1_6MatrixILi14ENS1_15PreserveStorageEEE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/tmp/Rtmp5Aq9Pf/Rinst7f791b0e862f/markovchain’
      -----------------------------------
ERROR: package installation failed
Error: Command failed (1)

0 个答案:

没有答案