Error Building XGBoost4J Jar in Windows


#1

I need to build a jar of xgboost4j. I am getting some errors. Can you help me? I tried following the following directions, but the build script throws errors:

  • Ensure Docker for Windows is installed.
  • Clone this repo: git clone --recursive h ttps://github.com/dmlc/xgboost.git
  • Run the following command:
    — With Tests: .\xgboost\jvm-packages\dev\build-linux.cmd
    — Skip Tests: .\xgboost\jvm-packages\dev\build-linux.cmd --skip-tests

Error:

Loaded plugins: fastestmirror, ovl
Setting up Update Process
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: centos-sclo-rh
Could not retrieve mirrorlist h ttp://mirrorlist.centos.org?arch=x86_64&release=6&repo=sclo-rh error was
14: PYCURL ERROR 22 - “The requested URL returned error: 503 Service Unavailable”
The command ‘/bin/sh -c yum -y update && yum install -y tar unzip wget xz git centos-release-scl yum-utils java-1.8.0-openjdk-devel && yum-config-manager --enable centos-sclo-rh-testing && yum -y update && yum install -y devtoolset-4-gcc devtoolset-4-binutils devtoolset-4-gcc-c++ && wget h ttps://repo.continuum.io/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh && bash Miniconda3-4.5.12-Linux-x86_64.sh -b -p /opt/python && wget -nv -nc h ttps://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh --no-check-certificate && bash cmake-3.12.0-Linux-x86_64.sh --skip-license --prefix=/usr && wget h ttp://apache.osuosl.org/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz && tar xvf apache-maven-3.6.1-bin.tar.gz -C /opt && ln -s /opt/apache-maven-3.6.1/ /opt/maven’ returned a non-zero code: 1
Unable to find image ‘dmlc/xgboost4j-build:latest’ locally

Also, if I try to run mvn package:

subprocess.CalledProcessError: Command ‘cmake … -DUSE_OPENMP:BOOL=ON -DUSE_HDFS:BOOL=OFF -DUSE_AZURE:BOOL=OFF -DUSE_S3:BOOL=OFF -DUSE_CUDA:BOOL=OFF -DJVM_BINDINGS:BOOL=ON -G"Visual Studio 14 Win64"’ returned non-zero exit status 1.
[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:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for XGBoost JVM Package 1.0.0-SNAPSHOT:
[INFO]
[INFO] XGBoost JVM Package … SUCCESS [ 4.507 s]
[INFO] xgboost4j_2.12 … FAILURE [ 3.292 s]
[INFO] xgboost4j-spark_2.12 … SKIPPED
[INFO] xgboost4j-flink_2.12 … SKIPPED
[INFO] xgboost4j-example_2.12 … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.172 s
[INFO] Finished at: 2019-10-18T10:39:01-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (native) on project xgboost4j_2.12: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]