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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • 22
    • client-libs
    • None
    • b06

    Description

      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)
      ```

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: