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

Remove unneeded libjava shared library dependency from jtreg test libNewDirectByteBuffer, libDirectIO and libInheritedChannel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • core-libs
    • None
    • b11

      java.base:libjava is specified as a shared library dependency for some of the JDK jtreg tests. That adds `-ljava` to the linker flag on Linux (for example), when linking the jtreg test native libraries.

      Explicitly linking libjava.so adds it as a recorded dependency. That can cause failure when loading the jtreg native library due to missing libjava.so at runtime.

      $ ldd ./linux-x86_64-server-release/images/test/jdk/jtreg/native/libNewDirectByteBuffer.so
      linux-vdso.so.1 (0x00007fcba8357000)
      libjava.so => <snip>
      libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcba8000000)
      libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcba7f1e000)
      libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcba8307000)
      libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcba7d35000)
      /lib64/ld-linux-x86-64.so.2 (0x00007fcba8359000)

      For the following jtreg test native libraries, java.base:libjava is not needed and can be removed:

      libNewDirectByteBuffer
      libDirectIO
      libInheritedChannel

            jiangli Jiangli Zhou
            jiangli Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: