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

Documented Java build process for native code fails on Apple M1 hardware

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.0
    • None
    • Java
    • None
    • Apple MacBook Pro M1 hardware
      OSX Monterey 12.2.1

    Description

      A warning occurs while linking files in C Data Interface: 

      {{[100%] Linking CXX shared library libarrow_cdata_jni.dylib}}

      {}
      {{ld: warning: ignoring file /Library/Java/JavaVirtualMachines/jdk-11.0.13.jdk/Contents/Home/lib/server/libjvm.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64}}

       

      Followed by numerous test failures later in the process, for example:

       

      [ERROR] Tests run: 45, Failures: 0, Errors: 45, Skipped: 0, Time elapsed: 0.725 s <<< FAILURE! - in org.apache.arrow.c.RoundtripTest[ERROR] testUInt8Vector  Time elapsed: 0.054 s  <<< ERROR!java.lang.ExceptionInInitializerErrorat org.apache.arrow.c.RoundtripTest.vectorRoundtrip(RoundtripTest.java:129)at org.apache.arrow.c.RoundtripTest.roundtrip(RoundtripTest.java:155)at org.apache.arrow.c.RoundtripTest.testUInt8Vector(RoundtripTest.java:463)Caused by: java.lang.IllegalStateException: error loading native libraries: java.io.FileNotFoundException: libarrow_cdata_jni.dylib at org.apache.arrow.c.RoundtripTest.vectorRoundtrip(RoundtripTest.java:129)at org.apache.arrow.c.RoundtripTest.roundtrip(RoundtripTest.java:155)at org.apache.arrow.c.RoundtripTest.testUInt8Vector(RoundtripTest.java:463)

       

      Steps to reproduce: 

      On Apple M1 hardware, follow the build instructions at https://arrow.apache.org/docs/dev/developers/java/building.html 

      Follow instructions to build the C Data interface. (warning occurs){}

      Continue to follow instructions to build remaining JNI interfaces. (test failures occur). {{}}

       

      Note that the file that cannot be found is the same file being linked when the earlier warning occurs.

      Attachments

        1. errors.txt
          26 kB
          Larry White

        Issue Links

          Activity

            People

              ljw1001 Larry White
              ljw1001 Larry White
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: