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

Linkage error using jdk1.8 javapackager that uses pthread functions

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux

      Description

      A DESCRIPTION OF THE PROBLEM :
      Call to native code that uses pthread fails when executed from bundled environment created using java packager tool

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. create project that calls native code that uses pthread functions (e.g. call to pthread_mutexattr_init), I've tried this with library org.xerial:sqlite-jdbc:3.32.3.2 that uses complied sqlite3 database.
      2. create rpm installer using javapackager (I've used fat jar and following commnad: javapackager -deploy -srcfiles build/libs/sqlite-java-packager-1.0-SNAPSHOT.jar -name sqlite-java-packager -native rpm -outdir build/libs/ -outfile sqlite-java-packager -appclass example.UseSqliteJdbc)
      3. install rpm and try to run it (e.g. call /opt/sqlite-java-packager/sqlite-java-packager )

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      invocation to native code successfully executes
      ACTUAL -
      invocation fails on following error:
      symbol lookup error: /tmp/sqlite-3.32.3.2-f93dbab9-5756-42d6-b03e-11a631aad656-libsqlitejdbc.so: undefined symbol: pthread_mutexattr_init


      ---------- BEGIN SOURCE ----------
      https://github.com/nocach/javapackger-linkage-bug
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            Assignee:
            herrick Andy Herrick
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: