Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 932157

Summary: dev-java/openjdk-17.0.10_p7 build failed
Product: Gentoo Linux Reporter: Matthias Hanft <gentoo-bugzilla>
Component: Current packagesAssignee: Java team <java>
Status: UNCONFIRMED ---    
Severity: normal CC: gentoo-bugzilla
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 911581    
Attachments: build.log (gzip'ed)
emerge --info

Description Matthias Hanft 2024-05-18 13:51:19 UTC
Building dev-java/openjdk-17.0.10_p7 on a 32-bit system fails:

[...]
/usr/lib/gcc/i686-pc-linux-gnu/13/../../../../i686-pc-linux-gnu/bin/ld:
/var/tmp/portage/dev-java/openjdk-17.0.10_p7/work/jdk17u-jdk-17.0.10-ga/build/linux-x86-server-release/hotspot/variant-server/libjvm/objs/adaptiveSizePolicy.o: warning: relocation in read-only section
`.text'
/usr/lib/gcc/i686-pc-linux-gnu/13/../../../../i686-pc-linux-gnu/bin/ld: read-only segment has dynamic relocations
collect2: error: ld returned 1 exit status
gmake[3]: *** [lib/CompileJvm.gmk:144: /var/tmp/portage/dev-java/openjdk-17.0.10_p7/work/jdk17u-jdk-17.0.10-ga/build/linux-x86-server-release/support/modules_libs/java.base/server/libjvm.so] Error 1
gmake[3]: Leaving directory '/var/tmp/portage/dev-java/openjdk-17.0.10_p7/work/jdk17u-jdk-17.0.10-ga/make/hotspot'
gmake[2]: *** [make/Main.gmk:252: hotspot-server-libs] Error 2
gmake[2]: Leaving directory '/var/tmp/portage/dev-java/openjdk-17.0.10_p7/work/jdk17u-jdk-17.0.10-ga'
ERROR: Build failed for target 'bootcycle-images' in configuration 'linux-x86-server-release' (exit code 2)

Someone in the mailing list mentioned "'-Wl,-z,notext' flag may be needed to be added somewhere in the build system", but just adding this to CFLAGS in make.conf doesn't help, though.
Comment 1 Matthias Hanft 2024-05-18 13:53:54 UTC
Created attachment 893303 [details]
build.log (gzip'ed)
Comment 2 Matthias Hanft 2024-05-18 13:57:23 UTC
Created attachment 893304 [details]
emerge --info
Comment 3 Matthias Hanft 2024-05-18 21:09:19 UTC
Meanwhile I found out that

LDFLAGS="${LDFLAGS} -Wl,-z,notext"

in make.conf *does* help.