{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/xgboost/issues/3111","repository_url":"https://api.github.com/repos/dmlc/xgboost","labels_url":"https://api.github.com/repos/dmlc/xgboost/issues/3111/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/xgboost/issues/3111/comments","events_url":"https://api.github.com/repos/dmlc/xgboost/issues/3111/events","html_url":"https://github.com/dmlc/xgboost/issues/3111","id":296406176,"number":3111,"title":"[jvm-packages] issue jni.h file cmake: subprocess.CalledProcessError: Command 'cmake --build . --config Release' returned non-zero exit status 2","user":{"login":"blomqvistkj","id":28294847,"avatar_url":"https://avatars3.githubusercontent.com/u/28294847?v=4","gravatar_id":"","url":"https://api.github.com/users/blomqvistkj","html_url":"https://github.com/blomqvistkj","followers_url":"https://api.github.com/users/blomqvistkj/followers","following_url":"https://api.github.com/users/blomqvistkj/following{/other_user}","gists_url":"https://api.github.com/users/blomqvistkj/gists{/gist_id}","starred_url":"https://api.github.com/users/blomqvistkj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blomqvistkj/subscriptions","organizations_url":"https://api.github.com/users/blomqvistkj/orgs","repos_url":"https://api.github.com/users/blomqvistkj/repos","events_url":"https://api.github.com/users/blomqvistkj/events{/privacy}","received_events_url":"https://api.github.com/users/blomqvistkj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-12T15:03:51Z","updated_at":"2018-02-16T08:57:01Z","closed_at":null,"author_association":"NONE","body":"Hi, I'm trying to download XGBoost and the Java package. I think I've successfully installed XGBoost, but run into problems when trying to install the jvm. I've googled like crazy and read so many issues here, but none seem to help me. Would be super thankful to get some help! \r\n\r\n## Environment info\r\nOperating System: OS Sierra 10.12.6\r\nCompiler: gcc7\r\nother: maven 3.5.2, CMake 3.10.2, java: JDK 1.8.0_161\r\nPackage used (python/R/jvm/C++): jvm\r\n`xgboost` version used: the latest? \r\n\r\n## Steps to reproduce\r\n1. Downloading XGBoost and all other required software\r\n2. Set JAVA_HOME environment variable \r\n3. run 'mvn package'\r\n\r\n## What have you tried?\r\n1. this issue: https://github.com/dmlc/xgboost/issues/2596 (these problems seems to be fixed) \r\n2. this issue: https://github.com/dmlc/xgboost/issues/2603 (did not work)\r\n\r\nI get the following error when running \"mvn package\": What could be the problem? \r\n\r\n[INFO] --- exec-maven-plugin:1.6.0:exec (native) @ xgboost4j ---\r\n-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) \r\n-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) \r\n-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) \r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /Users/johannablomqvist/xgboost/build\r\n[ 96%] Built target dmlccore\r\n[ 96%] Built target objxgboost\r\n[ 96%] Built target rabit\r\n[ 96%] Built target runxgboost\r\n[ 96%] Building CXX object CMakeFiles/xgboost4j.dir/jvm-packages/xgboost4j/src/native/xgboost4j.cpp.o\r\nIn file included from /Users/johannablomqvist/xgboost/jvm-packages/xgboost4j/src/native/xgboost4j.cpp:17:\r\nIn file included from /Users/johannablomqvist/xgboost/include/xgboost/base.h:10:\r\n/Users/johannablomqvist/xgboost/dmlc-core/include/dmlc/omp.h:13:9: warning: Warning: OpenMP is not available, project will be compiled into single-thread code. Use OpenMP-enabled compiler to get benefit of multi-threading. [-W#pragma-messages]\r\n#pragma message(\"Warning: OpenMP is not available, \"                    \\\r\n        ^\r\nIn file included from /Users/johannablomqvist/xgboost/jvm-packages/xgboost4j/src/native/xgboost4j.cpp:19:\r\n/Users/johannablomqvist/xgboost/jvm-packages/xgboost4j/src/native/./xgboost4j.h:2:10: fatal error: 'jni.h' file not found\r\n#include <jni.h>\r\n         ^~~~~~~\r\n\r\n1 warning and 1 error generated.\r\nmake[2]: *** [CMakeFiles/xgboost4j.dir/jvm-packages/xgboost4j/src/native/xgboost4j.cpp.o] Error 1\r\nmake[1]: *** [CMakeFiles/xgboost4j.dir/all] Error 2\r\nmake: *** [all] Error 2\r\nbuilding Java wrapper\r\nTraceback (most recent call last):\r\ncd ..\r\nmkdir -p build\r\n  File \"create_jni.py\", line 89, in <module>\r\ncd build\r\ncmake .. -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\r\ncmake --build . --config Release\r\n    run(\"cmake --build . --config Release\")\r\n  File \"create_jni.py\", line 51, in run\r\n    subprocess.check_call(command, shell=True, **kwargs)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py\", line 540, in check_call\r\n    raise CalledProcessError(retcode, cmd)\r\nsubprocess.CalledProcessError: Command 'cmake --build . --config Release' returned non-zero exit status 2\r\n[ERROR] Command execution failed.\r\norg.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)\r\n    at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)\r\n    at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)\r\n    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:804)\r\n    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:751)\r\n    at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:313)\r\n    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)\r\n    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)\r\n    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)\r\n    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)\r\n    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)\r\n    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)\r\n    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)\r\n    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)\r\n    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)\r\n    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)\r\n    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)\r\n    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)\r\n    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)\r\n    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)\r\n    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)\r\n    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)\r\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)\r\n    at java.lang.reflect.Method.invoke (Method.java:498)\r\n    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)\r\n    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)\r\n    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)\r\n    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Reactor Summary:\r\n[INFO] \r\n[INFO] xgboost-jvm ........................................ SUCCESS [  9.660 s]\r\n[INFO] xgboost4j .......................................... FAILURE [  3.887 s]\r\n[INFO] xgboost4j-spark .................................... SKIPPED\r\n[INFO] xgboost4j-flink .................................... SKIPPED\r\n[INFO] xgboost4j-example .................................. SKIPPED\r\n[INFO] keystroke-dynamics ................................. SKIPPED\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD FAILURE\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 13.715 s\r\n[INFO] Finished at: 2018-02-12T15:27:02+01:00\r\n[INFO] Final Memory: 28M/438M\r\n[INFO] ------------------------------------------------------------------------\r\n[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]\r\n[ERROR] \r\n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\r\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\r\n[ERROR] \r\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\r\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException\r\n[ERROR] \r\n[ERROR] After correcting the problems, you can resume the build with the command\r\n[ERROR]   mvn <goals> -rf :xgboost4j\r\n"},"comment":{"url":"https://api.github.com/repos/dmlc/xgboost/issues/comments/366178004","html_url":"https://github.com/dmlc/xgboost/issues/3111#issuecomment-366178004","issue_url":"https://api.github.com/repos/dmlc/xgboost/issues/3111","id":366178004,"user":{"login":"blomqvistkj","id":28294847,"avatar_url":"https://avatars3.githubusercontent.com/u/28294847?v=4","gravatar_id":"","url":"https://api.github.com/users/blomqvistkj","html_url":"https://github.com/blomqvistkj","followers_url":"https://api.github.com/users/blomqvistkj/followers","following_url":"https://api.github.com/users/blomqvistkj/following{/other_user}","gists_url":"https://api.github.com/users/blomqvistkj/gists{/gist_id}","starred_url":"https://api.github.com/users/blomqvistkj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blomqvistkj/subscriptions","organizations_url":"https://api.github.com/users/blomqvistkj/orgs","repos_url":"https://api.github.com/users/blomqvistkj/repos","events_url":"https://api.github.com/users/blomqvistkj/events{/privacy}","received_events_url":"https://api.github.com/users/blomqvistkj/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T08:57:01Z","updated_at":"2018-02-16T08:57:01Z","author_association":"NONE","body":"I tried you approach, and it seems like the installation is getting a bit further, but it gets stuck. I ran it for approx 6h yesterday, with no luck. \r\n\r\nThis is the output/where it gets stuck:\r\n\r\n[INFO] --- scalatest-maven-plugin:1.0:test (test) @ xgboost-jvm ---\r\njava.io.FileNotFoundException: /Users/johannablomqvist/xgboost/jvm-packages/target/jacoco.exec (Permission denied)\r\n\tat java.io.FileOutputStream.open0(Native Method)\r\n\tat java.io.FileOutputStream.open(FileOutputStream.java:270)\r\n\tat java.io.FileOutputStream.<init>(FileOutputStream.java:213)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.output.FileOutput.openFile(FileOutput.java:67)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.output.FileOutput.startup(FileOutput.java:49)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.Agent.startup(Agent.java:122)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.Agent.getInstance(Agent.java:50)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.PreMain.premain(PreMain.java:45)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)\r\n\tat sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)\r\nDiscovery starting.\r\nDiscovery completed in 82 milliseconds.\r\nRun starting. Expected test count is: 0\r\nDiscoverySuite:\r\nRun completed in 172 milliseconds.\r\nTotal number of tests run: 0\r\nSuites: completed 1, aborted 0\r\nTests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0\r\nNo tests were executed.\r\njava.io.FileNotFoundException: /Users/johannablomqvist/xgboost/jvm-packages/target/jacoco.exec (Permission denied)\r\n\tat java.io.FileOutputStream.open0(Native Method)\r\n\tat java.io.FileOutputStream.open(FileOutputStream.java:270)\r\n\tat java.io.FileOutputStream.<init>(FileOutputStream.java:213)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.output.FileOutput.openFile(FileOutput.java:67)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.output.FileOutput.writeExecutionData(FileOutput.java:53)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.Agent.shutdown(Agent.java:137)\r\n\tat org.jacoco.agent.rt.internal_8ff85ea.Agent$1.run(Agent.java:54)\r\n[INFO] \r\n[INFO] --- jacoco-maven-plugin:0.7.9:report (report) @ xgboost-jvm ---\r\n[INFO] Skipping JaCoCo execution due to missing classes directory.\r\n[INFO] \r\n[INFO] --- maven-assembly-plugin:2.6:single (make-assembly) @ xgboost-jvm ---\r\n[INFO] Assemblies have been skipped per configuration of the skipAssembly parameter.\r\n[INFO] \r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Building xgboost4j 0.8-SNAPSHOT\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] \r\n[INFO] --- scalastyle-maven-plugin:0.8.0:check (checkstyle) @ xgboost4j ---\r\nProcessed 14 file(s)\r\nFound 0 errors\r\nFound 0 warnings\r\nFound 0 infos\r\nFinished in 1756 ms\r\n[INFO] \r\n[INFO] --- maven-checkstyle-plugin:2.17:check (checkstyle) @ xgboost4j ---\r\n[INFO] \r\n[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (default) @ xgboost4j ---\r\n[INFO] argLine set to -javaagent:/Users/johannablomqvist/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/Users/johannablomqvist/xgboost/jvm-packages/xgboost4j/target/jacoco.exec\r\n[INFO] \r\n[INFO] --- exec-maven-plugin:1.6.0:exec (native) @ xgboost4j ---\r\n\r\n"}}
{"actor":{"display_login":"blomqvistkj"}}