Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-18278

[Java] Maven generate-libs-jni-macos-linux on M1 fails due to cmake error

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 11.0.0
    • Java

    Description

      When building with maven on M1 as per docs:

      mvn clean install
      mvn generate-resources -Pgenerate-libs-jni-macos-linux -N
      

      I get the following error:

      [INFO] --- exec-maven-plugin:3.1.0:exec (jni-cmake) @ arrow-java-root ---
      -- Building using CMake version: 3.24.2
      -- The C compiler identification is AppleClang 14.0.0.14000029
      -- The CXX compiler identification is AppleClang 14.0.0.14000029
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Java: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java (found version "11.0.16") 
      -- Found JNI: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/include  found components: AWT JVM 
      CMake Error at dataset/CMakeLists.txt:18 (find_package):
        By not providing "FindArrowDataset.cmake" in CMAKE_MODULE_PATH this project
        has asked CMake to find a package configuration file provided by
        "ArrowDataset", but CMake did not find one.
      
        Could not find a package configuration file provided by "ArrowDataset" with
        any of the following names:
      
          ArrowDatasetConfig.cmake
          arrowdataset-config.cmake
      
        Add the installation prefix of "ArrowDataset" to CMAKE_PREFIX_PATH or set
        "ArrowDataset_DIR" to a directory containing one of the above files.  If
        "ArrowDataset" provides a separate development package or SDK, be sure it
        has been installed.
      
      
      -- Configuring incomplete, errors occurred!
      See also "/Users/rok/Documents/repos/arrow/java-jni/CMakeFiles/CMakeOutput.log".
      See also "/Users/rok/Documents/repos/arrow/java-jni/CMakeFiles/CMakeError.log".
      [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:1000)
          at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:947)
          at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:471)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
          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:294)
          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:960)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:566)
          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] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      

      I assume it's a bug, but could just be my laptop. kou

      Attachments

        Issue Links

          Activity

            People

              rokm Rok Mihevc
              rokm Rok Mihevc
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 20m
                  3h 20m