zhangkuantian
zhangkuantian

Reputation: 21

Build The Xgboost4j raise ErrorException, Can anyone help ?The exception as flowing:

When i try to build the xgboost4j use the command mvn clean install -DskipTests=true ,The Error Exception occurs ! Can anyone has seen this Error Exception before?
My OS is OS X
JDK version is jdk 1.8
python version is 2.7
xgboost code is git clone --recursive https://github.com/dmlc/xgboost
The Error Message as following:

[INFO] argLine set to -javaagent:/Users/zhangkuantian/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/Users/zhangkuantian/code/xgboost/jvm-packages/xgboost4j/target/jacoco.exec
[INFO] 
[INFO] --- exec-maven-plugin:1.6.0:exec (native) @ xgboost4j ---
/bin/sh: cmake: command not found
building Java wrapper
cd ..
mkdir -p build
cd build
cmake .. -DUSE_S3:BOOL=OFF -DUSE_OPENMP:BOOL=OFF -DPLUGIN_UPDATER_GPU:BOOL=OFF -DUSE_AZURE:BOOL=OFF -DUSE_HDFS:BOOL=OFF -DJVM_BINDINGS:BOOL=ON
Traceback (most recent call last):
  File "create_jni.py", line 88, in <module>
    run("cmake .. " + " ".join(args) + maybe_generator)
  File "create_jni.py", line 51, in run
    subprocess.check_call(command, shell=True, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cmake .. -DUSE_S3:BOOL=OFF -DUSE_OPENMP:BOOL=OFF -DPLUGIN_UPDATER_GPU:BOOL=OFF -DUSE_AZURE:BOOL=OFF -DUSE_HDFS:BOOL=OFF -DJVM_BINDINGS:BOOL=ON' returned non-zero exit status 127
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] xgboost-jvm ........................................ SUCCESS [  3.219 s]
[INFO] xgboost4j .......................................... FAILURE [  1.359 s]
[INFO] xgboost4j-spark .................................... SKIPPED
[INFO] xgboost4j-flink .................................... SKIPPED
[INFO] xgboost4j-example .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.683 s
[INFO] Finished at: 2017-09-14T17:28:17+08:00
[INFO] Final Memory: 27M/469M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (native) on project xgboost4j: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

Upvotes: 0

Views: 759

Answers (2)

陈进玉
陈进玉

Reputation: 1

[INFO] --- exec-maven-plugin:1.6.0:exec (native) @ xgboost4j --- /bin/sh: cmake: command not found

!!!!! install cmake, mvn package, and solved!

Upvotes: -1

zhangkuantian
zhangkuantian

Reputation: 21

I solved it,Though i don't know what the block code in project 'xgboost4j','xgboost4j-example','xgboost-spark','xgboost-flink' 's pom.xml file

     <plugin>
          <artifactId>exec-maven-plugin</artifactId>
          <groupId>org.codehaus.mojo</groupId>
          <!-- executions>
              <execution>
                  <id>native</id>
                  <phase>generate-sources</phase>
                  <goals>
                      <goal>exec</goal>
                  </goals>
                  <configuration>
                      <executable>python</executable>
                      <arguments>
                        <argument>create_jni.py</argument>
                      </arguments>
                      <workingDirectory>${user.dir}</workingDirectory>
                  </configuration>
              </execution>
          </executions-->
      </plugin>

used for, I annotated it, then the issue solved!

Upvotes: 0

Related Questions