-
Bug
-
Resolution: Fixed
-
P4
-
22
-
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)
```
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)
```
- relates to
-
JDK-8303796 Optionally build fully statically linked JDK image
- Open