0

我想units在仁进编译这个包,目前在网上仓库里是不行的,见http://packages.renjin.org/package/org.renjin.cran/units/0.6-3/build/5

[...]

Downloaded: https://nexus.bedatadriven.com/content/groups/public/org/sonatype/aether/aether-impl/1.13.1/aether-impl-1.13.1.jar (128 KB at 7.4 KB/sec)
EXECUTING: -print-file-name=plugin
EXECUTING: -shared -xc++ -I/usr/lib/gcc/x86_64-linux-gnu/4.7/plugin/include -fPIC -fno-rtti -O2 plugin.c -lstdc++ -shared-libgcc -o /packages/units/units/target/bridge.so
configure: units: 0.6-4
Warning: unsupported configuration variable CFLAGS
Warning: unsupported configuration variable CPPFLAGS
Warning: unsupported configuration variable LDFLAGS
Warning: unsupported configuration variable CXXFLAGS
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++-4.7 accepts -g... yes
checking how to run the C++ preprocessor... g++-4.7 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking for error_at_line... yes
checking for gcc... gcc-4.7
checking whether we are using the GNU C compiler... yes
checking whether gcc-4.7 accepts -g... yes
checking for gcc-4.7 option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... no
checking udunits2.h usability... yes
checking udunits2.h presence... yes
checking for udunits2.h... yes
checking for ut_read_xml in -ludunits2... yes
configure: creating ./config.status
config.status: creating src/Makevars
Checking wether in Makevars CXX_STD is set to CXX11... no
g++-4.7 -I/packages/units/units/target/gnur/include -DNDEBUG -DUDUNITS2_DIR=0    -I"/packages/units/units/target/include"    -fpic  -m32 -fplugin=/packages/units/units/target/bridge.so -DRENJIN  -fno-inline-functions  -fdisable-tree-einline -g  -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c udunits.cpp -o udunits.o
cc1plus: note: disable pass tree-einline for functions in the range of [0, 4294967295]
udunits.cpp:11:18: fatal error: Rcpp.h: No such file or directory
compilation terminated.
/packages/units/units/target/gnur/etc/Makeconf:202: recipe for target 'udunits.o' failed
make: *** [udunits.o] Error 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:20 min
[INFO] Finished at: 2019-11-15T15:27:52+00:00
[INFO] Final Memory: 17M/445M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.renjin:renjin-maven-plugin:0.9.2726:gnur-compile (gnur-compile) on project units: Compilation of GNU R sources failed: Failed to execute Makefile -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
root@987c61d45fbf:/packages/units/units# exit

有人知道如何告诉仁进在哪里可以找到Rcpp.h吗?

有关我查阅的资源的更多详细信息,请参见此 GitHub 问题:https ://github.com/nuest/renjin-docker/issues/4

4

1 回答 1

2

如果您使用 Maven 构建包,您还需要添加 Rcpp 标头作为依赖项:

<dependency>
  <groupId>org.renjin.cran</groupId>
  <artifactId>Rcpp</artifactId>
  <version>0.12.13-renjin-15</version>
  <classifier>headers</classifier>
  <scope>provided</scope>
</dependency>

您可以使用plyr的 pom 文件作为示例。

请注意,如果您只想构建一个与 Renjin 一起使用的包,那么命令行工具要简单得多:

renjin build units

这将负责下载所需的依赖项并生成 jar 文件。

请注意,Renjin 不支持依赖于外部本地库的包。您可以从自动构建日志中看到,由于对 udunits2 的依赖,units 包将失败。

这就是我们的包装网站中将单位包装标记为不兼容的原因。

于 2019-11-24T12:11:32.010 回答