环境信息
操作系统:Linux(CentOS6.5)
编译器:GCC /克++
使用的包(python / R / jvm / C ++):jvm
使用的xgboost版本:0.7
gcc-version:7.1.0 cmake的版本:3.10.0
重现的步骤
make -j4(成功) 2.mvn -DskipTests安装(xgboost4j编译失败) 你有什么尝试?
1.设置cmake 2.export CXX = clang-omp ++
这是日志:
- 找到OpenMP_C:-fopenmp - 找到OpenMP_CXX:-fopenmp - 找到OpenMP_C:-fopenmp - 找到OpenMP_CXX:-fopenmp - 配置完成 - 生成完成 - 构建文件已写入:/ usr / local / xgboost / build [1%]构建CXX对象CMakeFiles / rabit.dir / rabit / src / allreduce_base.cc.o 在包含的文件中 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h:15, 从 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/io.h:14, 从 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../serializable.h:12, 从 /usr/local/xgboost/rabit/src/./../include/rabit/internal/engine.h:10, 来自/usr/local/xgboost/rabit/src/./allreduce_base.h:19,来自 /usr/local/xgboost/rabit/src/allreduce_base.cc:14: /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/././base.h:105: 注意:#pragma message:需要g ++ - 4.6或更高版本来编译所有 dmlc-core中的功能,没有c ++ 0x编译,可能有些功能 禁用在包含的文件中 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/io.h:14, 从 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../serializable.h:12, 从 /usr/local/xgboost/rabit/src/./../include/rabit/internal/engine.h:10, 来自/usr/local/xgboost/rabit/src/./allreduce_base.h:19,来自 /usr/local/xgboost/rabit/src/allreduce_base.cc:14: /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h: 在构造函数中?.mlc :: LogCheckError :: LogCheckError()? /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h:66: 错误:?.ullptr?。未在此范围内声明 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h: 在析构函数中?.mlc :: LogCheckError :: ~LogCheckError()? /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h:68: 错误:?.ullptr?。未在此范围内声明 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h: 在成员函数中?.mlc :: LogCheckError :: operator bool()? /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h:69: 错误:?.ullptr?。未在此范围内声明在包含的文件中 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/io.h:14, 从 /usr/local/xgboost/rabit/src/./../include/rabit/internal/../serializable.h:12, 从 /usr/local/xgboost/rabit/src/./../include/rabit/internal/engine.h:10, 来自/usr/local/xgboost/rabit/src/./allreduce_base.h:19,来自 /usr/local/xgboost/rabit/src/allreduce_base.cc:14: /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h: 在析构函数中?.mlc :: LogMessageFatal :: ~LogMessageFatal()? /usr/local/xgboost/rabit/src/./../include/rabit/internal/../../dmlc/./logging.h:289: 错误:?.ullptr?。未在此范围内声明gmake [2]: * [CMakeFiles / rabit.dir / rabit / src / allreduce_base.cc.o]错误1楼 Java包装器cd .. mkdir -p build cd build cmake .. -DUSE_OPENMP:BOOL = ON -DUSE_HDFS:BOOL = OFF -DUSE_AZURE:BOOL = OFF -DUSE_S3:BOOL = OFF -DPLUGIN_UPDATER_GPU:BOOL = OFF -DJVM_BINDINGS:BOOL = ON cmake --build。 --config发布gmake 1:* [CMakeFiles / rabit.dir / all]错误2 gmake:*** [all]错误2回溯 (最近一次呼叫最后一次):文件" create_jni.py",第89行,在运行中(" cmake - 建造。 --config Release")文件" create_jni.py",第51行,运行subprocess.check_call(command,shell = True,** kwargs)文件 " /root/anaconda3/envs/tensorflow/lib/python3.6/subprocess.py" ;, line 291,在check_call中引发CalledProcessError(retcode,cmd) subprocess.CalledProcessError:命令' cmake --build。 --config 发行'返回非零退出状态2. [ERROR]命令执行 失败。 org.apache.commons.exec.ExecuteException:进程已退出 错误:1(退出值:1)at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404) 在 org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166) 在 org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804) 在 org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751) 在org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) 在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) 在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 在 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) 在 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 在 org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 在 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) 在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)at at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)at at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)at at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)at at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:606)at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 在 org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 在 org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 在 org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [信息] -------------------------------------------------- ---------------------- [INFO]反应堆摘要:[INFO] [INFO] xgboost-jvm ........................................成功[7.834 s] [INFO] xgboost4j .......................................... FAILURE [5.489 s] [INFO] xgboost4j-spark .................................... SKIPPED [INFO] xgboost4j-flink .................................... SKIPPED [INFO] xgboost4j-example .................................. SKIPPED [信息] -------------------------------------------------- ---------------------- [INFO] BUILD FAILURE [INFO] -------------------------------------------------- ---------------------- [INFO]总时间:13.619 s [INFO]完成于: 2017-12-14T03:13:07 + 08:00 [INFO]最终记忆:23M / 55M [INFO] -------------------------------------------------- ---------------------- [错误]无法执行目标 org.codehaus.mojo:exec-maven-plugin:1.6.0:exec(native)on project xgboost4j:命令执行失败。进程退出时出错:1 (退出值:1) - > [Help 1] [ERROR] [ERROR]查看完整堆栈 跟踪错误,用-e开关重新运行Maven。 [错误]重新运行 Maven使用-X开关启用完整的调试日志记录。 [错误] [错误]有关错误和可能解决方案的更多信息, 请阅读以下文章:[错误] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [错误] [错误]纠正问题后,您可以恢复 使用命令[ERROR] mvn -rf:xgboost4j构建 Failure log 我可以尝试哪一步来解决问题,主要是在cmake中启用c ++ 11功能,这一点非常重要。