Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8264931

Result of jextract is only working under OSX

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      On all system Adoptopenjdk 16 + 36

      A DESCRIPTION OF THE PROBLEM :
      I have used the jextract tool to create an interface to the native lib libraw (libraw.org). Extraction worked on OSX and the resulting small app is working under OSX.
      On linux the native libs where not found (link error) and on windows I am always getting (Caused by: java.lang.IllegalArgumentException: Carrier size mismatch: long != b32(timestamp)[abi/kind=LONG,layout/name=timestamp]) from the same source.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Checkout the project https://github.com/lanthale/librawfx and specify in the main method the raw file to load.

      - OpenJDKA/Adoptopenjdk 16 or newer
      - JavaFX 16
      - SET JAVA_HOME variable
      - Change inside of TestApp.java the argument to the raw file example to load
      - Execute "mvn clean compile package -f LibRawFX/pom.xml to compile
      - To run the example execute "mvn javafx:run@cli-default"

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The code created on OSX should also work on Windows and Linux. Especialy on Linux I would expect that the library lookup is working.
      ACTUAL -
      On Linux I am getting UnsatisfiedLinkage error which seems that the lib is not found. I am using the standard mechanism which is working on Windows and OSX.

      On Windows: The linker is loading the lib but cannot pass any data to the lib because of the carrier mismatch java.lang.IllegalArgumentException: Carrier size mismatch: long != b32(timestamp)[abi/kind=LONG,layout/name=timestamp]

      ---------- BEGIN SOURCE ----------
      https://github.com/lanthale/LibRawFX
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Linux: None
      Windows: None

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: