Bug 1622186 - -Wl,--as-needed: java-1.8.0-openjdk FTBFS in rawhide (F30)
Summary: -Wl,--as-needed: java-1.8.0-openjdk FTBFS in rawhide (F30)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Severin Gehwolf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-24 16:06 UTC by Severin Gehwolf
Modified: 2018-09-27 16:17 UTC (History)
7 users (show)

Fixed In Version: java-1.8.0-openjdk-1.8.0.181.b13-9.fc30 java-1.8.0-openjdk-1.8.0.181.b15-0.fc28 java-1.8.0-openjdk-1.8.0.181.b15-0.fc29 java-1.8.0-openjdk-1.8.0.181.b15-0.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-28 07:57:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Severin Gehwolf 2018-08-24 16:06:54 UTC
Description of problem:
java-1.8.0-openjdk fails to build from source in Fedora rawhide (F30) since August 16 (as detected by koshei). The same sources build fine on F29 and F28.

Failed tasks:
https://koji.fedoraproject.org/koji/taskinfo?taskID=29100715
https://koji.fedoraproject.org/koji/taskinfo?taskID=29240033

Version-Release number of selected component (if applicable):
java-1.8.0-openjdk-1.8.0.181.b13-7

How reproducible:
100%

Steps to Reproduce:
$ fedpkg clone -a java-1.8.0-openjdk && cd java-1.8.0-openjdk
$ fedpkg mockbuild --without slowdebug

Actual results:

Build fails with something like this:

/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `loader_LoadLibInReferenceDir':
(.text.loader_LoadLibInReferenceDir+0x11): undefined reference to `PR_GetDirectorySeparator'
/usr/+ /usr/bin/gcc -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Xlinker --hash-style=both -Xlinker -z -Xlinker defs -Xlinker -O1 -shared -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64 -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/server -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker '$ORIGIN' -Xlinker -version-script=/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/jdk/make/mapfiles/libzip/mapfile-vers -Xlinker -soname=libzip.so -o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/libzip.so /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libzip/Adler32.o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libzip/CRC32.o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libzip/Deflater.o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libzip/Inflater.o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libzip/ZipFile.o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libzip/zip_util.o -ljvm -ljava -lz
bin/ld: (.text.loader_LoadLibInReferenceDir+0x88): undefined reference to `PR_LoadLibraryWithFlags'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `loader_LoadLibrary':
(.text.loader_LoadLibrary+0x20): undefined reference to `PR_GetLibraryFilePathname'

Expected results:
Build succeeds.

Additional info:
java-openjdk[1] and java-11-openjdk[2] face the same problem.

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=29251552
[2] https://koji.fedoraproject.org/koji/taskinfo?taskID=29251024

Comment 1 Severin Gehwolf 2018-08-24 16:08:39 UTC
Minimal reproducer is:

$ /usr/bin/g++ -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Xlinker --hash-style=both -Xlinker -z -Xlinker defs -Xlinker -O1 -shared -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64 -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/server   -Xlinker -version-script=/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/jdk/make/mapfiles/libsunec/mapfile-vers -Xlinker -soname=libsunec.so -o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/libsunec.so /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libsunec/ECC_JNI.o  -lstdc++  -lc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lfreebl -lfreebl
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `loader_LoadLibInReferenceDir':
(.text.loader_LoadLibInReferenceDir+0x11): undefined reference to `PR_GetDirectorySeparator'
/usr/bin/ld: (.text.loader_LoadLibInReferenceDir+0x88): undefined reference to `PR_LoadLibraryWithFlags'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `loader_LoadLibrary':
(.text.loader_LoadLibrary+0x20): undefined reference to `PR_GetLibraryFilePathname'
/usr/bin/ld: (.text.loader_LoadLibrary+0x47): undefined reference to `PR_Free'
/usr/bin/ld: (.text.loader_LoadLibrary+0x82): undefined reference to `PR_Malloc'
/usr/bin/ld: (.text.loader_LoadLibrary+0xa0): undefined reference to `PR_Free'
/usr/bin/ld: (.text.loader_LoadLibrary+0xb6): undefined reference to `PR_Free'
/usr/bin/ld: (.text.loader_LoadLibrary+0xe2): undefined reference to `PR_LoadLibraryWithFlags'
/usr/bin/ld: (.text.loader_LoadLibrary+0x104): undefined reference to `PR_Free'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `freebl_LoadDSO':
(.text.freebl_LoadDSO+0x24): undefined reference to `PR_FindFunctionSymbol'
/usr/bin/ld: (.text.freebl_LoadDSO+0x51): undefined reference to `PR_UnloadLibrary'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `BL_Init':
(.text.BL_Init+0x33): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `RSA_NewKey':
(.text.RSA_NewKey+0x3f): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `RSA_PublicKeyOp':
(.text.RSA_PublicKeyOp+0x44): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `RSA_PrivateKeyOp':
(.text.RSA_PrivateKeyOp+0x44): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `RSA_PrivateKeyOpDoubleChecked':
(.text.RSA_PrivateKeyOpDoubleChecked+0x4c): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o):(.text.RSA_PrivateKeyCheck+0x37): more undefined references to `PR_CallOnce' follow
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `BL_Unload':
(.text.BL_Unload+0x1b): undefined reference to `PR_GetEnvSecure'
/usr/bin/ld: (.text.BL_Unload+0x61): undefined reference to `PR_UnloadLibrary'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `SHA256_Hash':
(.text.SHA256_Hash+0x47): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `SHA256_HashBuf':
(.text.SHA256_HashBuf+0x4b): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `SHA256_NewContext':
(.text.SHA256_NewContext+0x33): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `SHA256_DestroyContext':
(.text.SHA256_DestroyContext+0x3f): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o): in function `SHA256_Begin':
(.text.SHA256_Begin+0x37): undefined reference to `PR_CallOnce'
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/libfreebl.a(loader.o):(.text.SHA256_Update+0x4b): more undefined references to `PR_CallOnce' follow
collect2: error: ld returned 1 exit status

Comment 2 Severin Gehwolf 2018-08-24 16:12:08 UTC
As it turns out redhat-rpm-config package enabled --as-needed linker flag by default on August 15:
https://koji.fedoraproject.org/koji/buildinfo?buildID=1136284

And indeed, removing "-Wl,--as-needed" from the minimal reproducer makes it pass in rawhide:

$ /usr/bin/g++ -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Xlinker --hash-style=both -Xlinker -z -Xlinker defs -Xlinker -O1 -shared -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64 -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/server   -Xlinker -version-script=/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/jdk/make/mapfiles/libsunec/mapfile-vers -Xlinker -soname=libsunec.so -o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/libsunec.so /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-7.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libsunec/ECC_JNI.o  -lstdc++  -lc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lfreebl -lfreebl
$ echo $?
0

Comment 3 Severin Gehwolf 2018-08-24 16:15:04 UTC
Question remains whether there are other places, other than libsunec.so, which break linking due to -Wl,--as-needed.

Comment 4 Severin Gehwolf 2018-08-27 13:31:57 UTC
(In reply to Severin Gehwolf from comment #3)
> Question remains whether there are other places, other than libsunec.so,
> which break linking due to -Wl,--as-needed.

There is another issue when linking libjavajpeg.so with the above issue fixed. Reproducer:

$ /usr/bin/gcc -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Xlinker --hash-style=both -Xlinker -z -Xlinker defs -Xlinker -O1 -shared -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64 -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/server -ljpeg -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$ORIGIN   -Xlinker -version-script=/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/make/mapfiles/libjpeg/mapfile-vers -Xlinker -soname=libjavajpeg.so -o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/lib/amd64/libjavajpeg.so /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/jpegdecoder.o  -ljava -ljvm
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `setQTables':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:728: undefined reference to `jpeg_alloc_quant_table'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:721: undefined reference to `jpeg_alloc_quant_table'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `setHTables':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:830: undefined reference to `jpeg_alloc_huff_table'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:823: undefined reference to `jpeg_alloc_huff_table'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:857: undefined reference to `jpeg_alloc_huff_table'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:850: undefined reference to `jpeg_alloc_huff_table'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `imageio_set_stream':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:637: undefined reference to `jpeg_abort'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `imageio_reset':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:662: undefined reference to `jpeg_abort'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1528: undefined reference to `jpeg_std_error'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1545: undefined reference to `jpeg_CreateDecompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1549: undefined reference to `jpeg_save_markers'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1565: undefined reference to `jpeg_resync_to_restart'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `imageio_dispose':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:680: undefined reference to `jpeg_destroy'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1689: undefined reference to `jpeg_read_header'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1825: undefined reference to `jpeg_abort_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2024: undefined reference to `jpeg_has_multiple_scans'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2036: undefined reference to `jpeg_start_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2095: undefined reference to `jpeg_read_scanlines'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2108: undefined reference to `jpeg_read_scanlines'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2163: undefined reference to `jpeg_read_scanlines'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2195: undefined reference to `jpeg_input_complete'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2201: undefined reference to `jpeg_abort'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2167: undefined reference to `jpeg_finish_output'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2169: undefined reference to `jpeg_input_complete'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2207: undefined reference to `jpeg_finish_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2194: undefined reference to `jpeg_abort_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2070: undefined reference to `jpeg_start_output'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `imageio_dispose':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:680: undefined reference to `jpeg_destroy'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2545: undefined reference to `jpeg_std_error'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2562: undefined reference to `jpeg_CreateCompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `imageio_dispose':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:680: undefined reference to `jpeg_destroy'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2670: undefined reference to `jpeg_suppress_tables'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2685: undefined reference to `jpeg_write_tables'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2893: undefined reference to `jpeg_set_defaults'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2895: undefined reference to `jpeg_set_colorspace'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2936: undefined reference to `jpeg_suppress_tables'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2964: undefined reference to `jpeg_simple_progression'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3012: undefined reference to `jpeg_start_compress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3075: undefined reference to `jpeg_write_scanlines'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3086: undefined reference to `jpeg_abort'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3084: undefined reference to `jpeg_finish_compress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3122: undefined reference to `jpeg_destroy'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2253: undefined reference to `jpeg_abort_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/build/jdk8.build/jdk/objs/libjavajpeg/jpegdecoder.o: in function `Java_sun_awt_image_JPEGImageDecoder_readImage':
/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:533: undefined reference to `jpeg_std_error'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:544: undefined reference to `jpeg_destroy_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:555: undefined reference to `jpeg_CreateDecompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:566: undefined reference to `jpeg_resync_to_restart'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:577: undefined reference to `jpeg_read_header'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:579: undefined reference to `jpeg_has_multiple_scans'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:709: undefined reference to `jpeg_destroy_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:572: undefined reference to `jpeg_destroy_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:627: undefined reference to `jpeg_start_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:673: undefined reference to `jpeg_read_scanlines'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:666: undefined reference to `jpeg_consume_input'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:652: undefined reference to `jpeg_consume_input'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:659: undefined reference to `jpeg_start_output'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:720: undefined reference to `jpeg_finish_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:729: undefined reference to `jpeg_destroy_decompress'
/usr/bin/ld: /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:714: undefined reference to `jpeg_finish_output'
collect2: error: ld returned 1 exit status

Comment 5 Severin Gehwolf 2018-08-27 13:47:06 UTC
(In reply to Severin Gehwolf from comment #4)
> (In reply to Severin Gehwolf from comment #3)
> > Question remains whether there are other places, other than libsunec.so,
> > which break linking due to -Wl,--as-needed.
> 
> There is another issue when linking libjavajpeg.so with the above issue
> fixed.

Reference to the fix of the first issue:
https://src.fedoraproject.org/fork/jerboaa/rpms/java-1.8.0-openjdk/c/5ea1728a3d919902f8c89b046b01a221d90bc541?branch=rawhide-ftbfs

Comment 6 Severin Gehwolf 2018-08-27 15:27:01 UTC
(In reply to Severin Gehwolf from comment #4)
> There is another issue when linking libjavajpeg.so with the above issue
> fixed. Reproducer:
> 
> $ /usr/bin/gcc -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Xlinker --hash-style=both
> -Xlinker -z -Xlinker defs -Xlinker -O1 -shared
> -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/
> openjdk/build/jdk8.build/jdk/lib/amd64
> -L/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/
> openjdk/build/jdk8.build/jdk/lib/amd64/server -ljpeg -Xlinker -z -Xlinker
> origin -Xlinker -rpath -Xlinker \$ORIGIN   -Xlinker
> -version-script=/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.
> fc30.x86_64/openjdk/jdk/make/mapfiles/libjpeg/mapfile-vers -Xlinker
> -soname=libjavajpeg.so -o
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/lib/amd64/libjavajpeg.so
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/jpegdecoder.o  -ljava -ljvm
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `setQTables':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:728: undefined
> reference to `jpeg_alloc_quant_table'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:721: undefined
> reference to `jpeg_alloc_quant_table'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `setHTables':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:830: undefined
> reference to `jpeg_alloc_huff_table'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:823: undefined
> reference to `jpeg_alloc_huff_table'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:857: undefined
> reference to `jpeg_alloc_huff_table'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:850: undefined
> reference to `jpeg_alloc_huff_table'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `imageio_set_stream':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:637: undefined
> reference to `jpeg_abort'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `imageio_reset':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:662: undefined
> reference to `jpeg_abort'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1528: undefined
> reference to `jpeg_std_error'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1545: undefined
> reference to `jpeg_CreateDecompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1549: undefined
> reference to `jpeg_save_markers'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1565: undefined
> reference to `jpeg_resync_to_restart'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `imageio_dispose':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:680: undefined
> reference to `jpeg_destroy'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1689: undefined
> reference to `jpeg_read_header'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:1825: undefined
> reference to `jpeg_abort_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2024: undefined
> reference to `jpeg_has_multiple_scans'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2036: undefined
> reference to `jpeg_start_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2095: undefined
> reference to `jpeg_read_scanlines'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2108: undefined
> reference to `jpeg_read_scanlines'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2163: undefined
> reference to `jpeg_read_scanlines'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2195: undefined
> reference to `jpeg_input_complete'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2201: undefined
> reference to `jpeg_abort'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2167: undefined
> reference to `jpeg_finish_output'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2169: undefined
> reference to `jpeg_input_complete'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2207: undefined
> reference to `jpeg_finish_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2194: undefined
> reference to `jpeg_abort_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2070: undefined
> reference to `jpeg_start_output'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `imageio_dispose':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:680: undefined
> reference to `jpeg_destroy'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2545: undefined
> reference to `jpeg_std_error'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2562: undefined
> reference to `jpeg_CreateCompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `imageio_dispose':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:680: undefined
> reference to `jpeg_destroy'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2670: undefined
> reference to `jpeg_suppress_tables'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2685: undefined
> reference to `jpeg_write_tables'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2893: undefined
> reference to `jpeg_set_defaults'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2895: undefined
> reference to `jpeg_set_colorspace'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2936: undefined
> reference to `jpeg_suppress_tables'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2964: undefined
> reference to `jpeg_simple_progression'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3012: undefined
> reference to `jpeg_start_compress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3075: undefined
> reference to `jpeg_write_scanlines'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3086: undefined
> reference to `jpeg_abort'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3084: undefined
> reference to `jpeg_finish_compress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:3122: undefined
> reference to `jpeg_destroy'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/imageioJPEG.o: in function
> `Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2253: undefined
> reference to `jpeg_abort_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> build/jdk8.build/jdk/objs/libjavajpeg/jpegdecoder.o: in function
> `Java_sun_awt_image_JPEGImageDecoder_readImage':
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:533: undefined
> reference to `jpeg_std_error'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:544: undefined
> reference to `jpeg_destroy_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:555: undefined
> reference to `jpeg_CreateDecompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:566: undefined
> reference to `jpeg_resync_to_restart'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:577: undefined
> reference to `jpeg_read_header'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:579: undefined
> reference to `jpeg_has_multiple_scans'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:709: undefined
> reference to `jpeg_destroy_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:572: undefined
> reference to `jpeg_destroy_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:627: undefined
> reference to `jpeg_start_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:673: undefined
> reference to `jpeg_read_scanlines'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:666: undefined
> reference to `jpeg_consume_input'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:652: undefined
> reference to `jpeg_consume_input'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:659: undefined
> reference to `jpeg_start_output'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:720: undefined
> reference to `jpeg_finish_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:729: undefined
> reference to `jpeg_destroy_decompress'
> /usr/bin/ld:
> /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.181.b13-8.fc30.x86_64/openjdk/
> jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c:714: undefined
> reference to `jpeg_finish_output'
> collect2: error: ld returned 1 exit status

Fix for this is:
https://src.fedoraproject.org/fork/jerboaa/rpms/java-1.8.0-openjdk/c/0d062022bb121772419b758c205b5a37ad8d8496?branch=rawhide-ftbfs

Comment 7 Severin Gehwolf 2018-08-27 15:34:09 UTC
Proposed fix:
https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/pull-request/16

Comment 8 Severin Gehwolf 2018-08-27 16:54:51 UTC
Should be fixed once this task completes:
https://koji.fedoraproject.org/koji/taskinfo?taskID=29336420

Comment 9 Andrew John Hughes 2018-09-03 19:58:21 UTC
Can you please not alter patch files for other issues? If you need to fix a bug, create a patch for that issue. These patches now differ from the versions held elsewhere.

Comment 10 Severin Gehwolf 2018-09-04 07:50:00 UTC
(In reply to Andrew John Hughes from comment #9)
> Can you please not alter patch files for other issues? If you need to fix a
> bug, create a patch for that issue. These patches now differ from the
> versions held elsewhere.

It can be done, sure. Do you mind sharing what issues this creates?

I'm wondering if that's the best approach, though. We already maintain 7 patches for the system NSS via SunEC provider. This would make it an 8th which depends on the first patch in the series with the right context. It's not nice either :-/

So it's a trade-off of syncing patches vs. adding another patch in the right place (ordering matters).

Comment 11 Fedora Update System 2018-09-05 12:11:39 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-03a32cc42a

Comment 12 Andrew John Hughes 2018-09-05 16:13:37 UTC
(In reply to Severin Gehwolf from comment #10)
> (In reply to Andrew John Hughes from comment #9)
> > Can you please not alter patch files for other issues? If you need to fix a
> > bug, create a patch for that issue. These patches now differ from the
> > versions held elsewhere.
> 
> It can be done, sure. Do you mind sharing what issues this creates?
> 
> I'm wondering if that's the best approach, though. We already maintain 7
> patches for the system NSS via SunEC provider. This would make it an 8th
> which depends on the first patch in the series with the right context. It's
> not nice either :-/
> 
> So it's a trade-off of syncing patches vs. adding another patch in the right
> place (ordering matters).

I'm surprised you don't see the issues already, as I'm failing to see any advantages to hacking an existing patch file to add your fix. It's not something I'd ever dream of doing.

One of my primary aims with the RPMs is to have as little material as possible be unique to the RPMs. If there is a patch to OpenJDK in the RPM, it should be a copy of an upstream patch, ideally an OpenJDK changeset but if not an IcedTea changeset.

The naming of the files reflects this and uses an nomenclature established in the IcedTea NEWS file many years ago [0]. In the case of pr1983-jdk.patch, this should correspond to [1].  The only reason I see to alter such a patch at a later date is to sync with the upstream version, if changes were made in the review process.

The appropriate place for these -Wl,--as-needed workarounds for me would be a single patch for that issue, making it clear that such a build fails without a fix or a workaround such as this. The same build machinery is present in IcedTea & (for jpeg) in OpenJDK 9+, so this is not unique to Fedora. That patch should be linked to OpenJDK & IcedTea bugs via its naming.

Altering an existing patch file instead makes the fix practically invisible. If I hadn't seen your changesets when looking at the Fedora rawhide repository for another reason, I wouldn't have expected the two files to be different between RHEL & Fedora.  Given the recent amount of work you've done in getting fixes upstream, I'm surprised you'd take such an approach here.

[0] https://icedtea.classpath.org/hg/icedtea8/raw-file/tip/NEWS
[1] https://icedtea.classpath.org/hg/icedtea8-forest/jdk/rev/48c15869ecd5

Comment 13 Fedora Update System 2018-09-05 21:28:11 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-03a32cc42a

Comment 14 Fedora Update System 2018-09-06 07:49:01 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a49513f8d6

Comment 15 Fedora Update System 2018-09-06 07:49:09 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1b3eca2de6

Comment 16 Fedora Update System 2018-09-07 15:18:23 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a49513f8d6

Comment 17 Fedora Update System 2018-09-07 17:11:02 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1b3eca2de6

Comment 18 Fedora Update System 2018-09-11 16:54:18 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2018-09-21 05:28:13 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2018-09-27 16:17:17 UTC
java-1.8.0-openjdk-1.8.0.181.b15-0.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.