R 3.5.1-在Travis CI上从源构建data.table失败

时间:2018-10-13 08:40:46

标签: r data.table travis-ci packrat

我目前正在尝试为bookdown-project

设置持续集成

该项目将依赖项与packrat捆绑在一起,因此Travis CI需要从源代码构建所需的软件包。对于许多软件包来说,这似乎还可以,但是对于data.table,构建失败。

我正在使用data.table(1.11.8)和R(3.5.1)的当前版本

也许我在Makevars中指定了错误的C编译器版本

我还能检查什么才能使它正常工作?

...
Installing curl (3.2) ... 
    OK (built source)
Installing data.table (1.11.8) ... 

[1] "Command failed (1)\n\nFailed to run system command:\n\n\t'/home/travis/R-bin/lib/R/bin/R' --vanilla CMD INSTALL '/tmp/RtmpiHzV25/data.table' --library='/home/travis/build/henningsway/Advanced-R-Solutions/packrat/lib/x86_64-pc-linux-gnu/3.5.1' --install-tests --no-docs --no-multiarch --no-demo \n\nThe command failed with output:\n* installing *source* package 'data.table' ...\n** package 'data.table' successfully unpacked and MD5 sums checked\n** libs\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c assign.c -o assign.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c between.c -o between.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c bmerge.c -o bmerge.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c chmatch.c -o chmatch.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c dogroups.c -o dogroups.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c fastmean.c -o fastmean.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c fcast.c -o fcast.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c fmelt.c -o fmelt.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c forder.c -o forder.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c frank.c -o frank.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c fread.c -o fread.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c freadR.c -o freadR.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c fsort.c -o fsort.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c fwrite.c -o fwrite.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c fwriteR.c -o fwriteR.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c gsumm.c -o gsumm.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c ijoin.c -o ijoin.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c init.c -o init.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c inrange.c -o inrange.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c nqrecreateindices.c -o nqrecreateindices.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c openmp-utils.c -o openmp-utils.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c quickselect.c -o quickselect.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c rbindlist.c -o rbindlist.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c reorder.c -o reorder.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c shift.c -o shift.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c subset.c -o subset.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c transpose.c -o transpose.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c uniqlist.c -o uniqlist.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c vecseq.c -o vecseq.o\nclang -I\"/home/travis/R-bin/lib/R/include\" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c wrappers.c -o wrappers.o\nclang -shared -L/home/travis/R-bin/lib/R/lib -L/home/travis/R-bin/lib -o data.table.so assign.o between.o bmerge.o chmatch.o dogroups.o fastmean.o fcast.o fmelt.o forder.o frank.o fread.o freadR.o fsort.o fwrite.o fwriteR.o gsumm.o ijoin.o init.o inrange.o nqrecreateindices.o openmp-utils.o quickselect.o rbindlist.o reorder.o shift.o subset.o transpose.o uniqlist.o vecseq.o wrappers.o -fopenmp -L/home/travis/R-bin/lib/R/lib -lR\nmv data.table.so datatable.so\nif [ \"\" != \"Windows_NT\" ] && [ `uname -s` = 'Darwin' ]; then install_name_tool -id datatable.so datatable.so; fi\ninstalling to /home/travis/build/henningsway/Advanced-R-Solutions/packrat/lib/x86_64-pc-linux-gnu/3.5.1/data.table/libs\n** R\n** inst\n** tests\n** byte-compile and prepare package for lazy loading\n** help\n*** installing help indices\n** building package indices\n** installing vignettes\n** testing if installed package can be loaded\nError: package or namespace load failed for 'data.table' in dyn.load(file, DLLpath = DLLpath, ...):\n unable to load shared object '/home/travis/build/henningsway/Advanced-R-Solutions/packrat/lib/x86_64-pc-linux-gnu/3.5.1/data.table/libs/datatable.so':\n  libomp.so: cannot open shared object file: No such file or directory\nError: loading failed\nExecution halted\nERROR: loading failed\n* removing '/home/travis/build/henningsway/Advanced-R-Solutions/packrat/lib/x86_64-pc-linux-gnu/3.5.1/data.table'"
Error: Command failed (1)
Failed to run system command:
    '/home/travis/R-bin/lib/R/bin/R' --vanilla CMD INSTALL '/tmp/RtmpiHzV25/data.table' --library='/home/travis/build/henningsway/Advanced-R-Solutions/packrat/lib/x86_64-pc-linux-gnu/3.5.1' --install-tests --no-docs --no-multiarch --no-demo 
The command failed with output:
* installing *source* package 'data.table' ...
** package 'data.table' successfully unpacked and MD5 sums checked
** libs
clang -I"/home/travis/R-bin/lib/R/include" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c assign.c -o assign.o
clang -I"/home/travis/R-bin/lib/R/include" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c between.c -o between.o
clang -I"/home/travis/R-bin/lib/R/include" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c bmerge.c -o bmerge.o
clang -I"/home/travis/R-bin/lib/R/include" -DNDEBUG   -I/home/travis/R-bin/include  -fopenmp -fpic  -g -O2  -c chmatch.c -o chmatch.o
clang -I"/home/
Execution halted
The command "R -e "0" --args --bootstrap-packrat" failed and exited with 1 during .
Your build has been stopped.

1 个答案:

答案 0 :(得分:0)

设置CC=gcc实际上为我解决了data.table-compilation问题。

(我认为为clang设置其他一些参数也是一种选择,如上面@jaaps注释所示)