Change read_icc_profile() to static function in java.desktop/share/native/libjavajpeg/imageioJPEG.c

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: 22
    • Component/s: client-libs
    • None
    • b06

      Changing read_icc_profile() in java.desktop/share/native/libjavajpeg/imageioJPEG.c to static function can avoid potential duplicate symbol issue when statically linking with JDK. The specific symbol could be defined in certain jpeg library.

      Following is an example of the linking failure:

      ```
      ld: error: duplicate symbol: read_icc_profile
      >>> defined at imageioJPEG.c:1295 (/.../java.desktop/share/native/libjavajpeg/imageioJPEG.c:1295)
      >>> libjavajpeg_relocatable.o:(read_icc_profile) in archive .../lib_static/libjavajpeg.a
      >>> defined at iccjpeg.c
      >>> .../iccjpeg.o:(.text+0x0)
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      ```

            Assignee:
            Jiangli Zhou
            Reporter:
            Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: