[
https://issues.apache.org/jira/browse/ARROW-18278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631409#comment-17631409
]
Rok Mihevc commented on ARROW-18278:
------------------------------------
@kou this diff on top of master builds dynlibs on M1. This
{code:bash}
mvn generate-resources -Pgenerate-libs-jni-macos-linux -N
{code}
completes fine.
However:
{code:bash}
mvn -Darrow.cpp.build.dir=/Users/rok/Documents/repos/arrow/java-dist/lib/
-Parrow-jni clean install
{code}
Fails for gandiva and c data interface with:
{code:bash}
[ERROR] Failed to execute goal
org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default) on
project arrow-gandiva: Unable to resolve artifact: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:3.20.3
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=com.google.protobuf
-DartifactId=protoc -Dversion=3.20.3 -Dclassifier=osx-aarch_64 -Dpackaging=exe
-Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the
file there:
[ERROR] mvn deploy:deploy-file -DgroupId=com.google.protobuf
-DartifactId=protoc -Dversion=3.20.3 -Dclassifier=osx-aarch_64 -Dpackaging=exe
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) org.apache.arrow.gandiva:arrow-gandiva:jar:11.0.0-SNAPSHOT
[ERROR] 2) com.google.protobuf:protoc:exe:osx-aarch_64:3.20.3
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR] org.apache.arrow.gandiva:arrow-gandiva:jar:11.0.0-SNAPSHOT
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] apache.snapshots (https://repository.apache.org/snapshots,
releases=false, snapshots=true),
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true,
snapshots=false)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :arrow-gandiva
{code}
and
{code:bash}
[ERROR] StreamTest.testRoundtripInts:94->roundtrip:257->roundtrip:228 ยป
IllegalState error loading native libraries: java.io.FileNotFoundException:
aarch_64/libarrow_cdata_jni.dylib
{code}
respectively.
> [Java] Maven generate-libs-jni-macos-linux on M1 fails due to cmake error
> -------------------------------------------------------------------------
>
> Key: ARROW-18278
> URL: https://issues.apache.org/jira/browse/ARROW-18278
> Project: Apache Arrow
> Issue Type: New Feature
> Components: Java
> Reporter: Rok Mihevc
> Priority: Major
>
> When building with maven on M1 [as per
> docs|https://arrow.apache.org/docs/dev/developers/java/building.html#id3]:
> {code:bash}
> mvn clean install
> mvn generate-resources -Pgenerate-libs-jni-macos-linux -N
> {code}
> I get the following error:
> {code:bash}
> [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]
> ------------------------------------------------------------------------
> {code}
> I assume it's a bug, but could just be my laptop. [~kou]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)