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

Resolve multiple definition of 'normalize' when statically linking JDK native libraries with user code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • None
    • core-svc
    • None

      We encountered following linker error when statically linking JDK/hotspot native libraries with user natives:

      ld: error: duplicate symbol: normalize
      >>> defined at FileSystemSupport_md.c:112 (/.../src/java.instrument/unix/native/libinstrument/FileSystemSupport_md.c:112)
      >>> libinstrument_relocatable.o:(normalize) in archive .../lib_static/libinstrument.a
      >>> defined at adjust.c
      >>> .../adjust.o:(.text+0x0)

      https://gitlab.com/graphviz/graphviz/-/blob/main/lib/neatogen/adjust.c#L830 is an example of the code defines 'normalize'.

      This is the last set of duplicating symbol issue related to JDK-8303796 that we've noticed with our prototyping for static JDK support on JDK 11. All other issues found with JDK native and hotspot code (not including third party code such as zlib) have been reported with bugs linked in JDK-8303796.

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

              Created:
              Updated:
              Resolved: