Bug 1008988

Summary: build on s390 (32-bit) uses -m64 option
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: java-1.7.0-openjdkAssignee: Andrew John Hughes <ahughes>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: ahughes, dbhole, jerboaa, jvanek, omajid
Target Milestone: ---   
Target Release: ---   
Hardware: s390   
OS: Unspecified   
Whiteboard:
Fixed In Version: java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-22 04:26:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 467765    

Description Dan Horák 2013-09-17 12:57:04 UTC
openjdk7 build fails on s390 (32-bit) with

...
make[6]: Entering directory `/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/build/linux-s390/hotspot/outputdir/linux_s390_zero/product'
echo Generating precompiled header precompiled.hpp.gch
Generating precompiled header precompiled.hpp.gch
mkdir -p .
g++ -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DTARGET_ARCH_NYI_6939861=1 -DS390 -DZERO_LIBARCH=\"s390\" -DPRODUCT -I. -I/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/prims -I/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm -I/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/precompiled -I/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/cpu/zero/vm -I/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/os_cpu/linux_zero/vm -I/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/os/linux/vm -I/builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.0-b56\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"mockbuild\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_zero -DTARGET_ARCH_MODEL_zero -DTARGET_OS_ARCH_linux_zero -DTARGET_OS_ARCH_MODEL_linux_zero -DTARGET_COMPILER_gcc  -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -g -O3 -fno-strict-aliasing  -DINCLUDE_TRACE=1 -Werror -Wpointer-arith -Wsign-compare    -DDTRACE_ENABLED -c -fpch-deps -MMD -MP -MF ../generated/dependencies/precompiled.hpp.gch.d -x c++-header /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp -o precompiled.hpp.gch 
In file included from /usr/include/features.h:388:0,
                 from /usr/include/stdio.h:27,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/prims/jni.h:39,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/prims/jvm.h:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/utilities/debug.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/runtime/globals.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/memory/allocation.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/memory/iterator.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/oops/klass.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/runtime/handles.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/asm/assembler.hpp:28,
                 from /builddir/build/BUILD/java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20.s390/openjdk/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
/usr/include/gnu/stubs.h:11:27: fatal error: gnu/stubs-64.h: No such file or directory
 # include <gnu/stubs-64.h>
                           ^
compilation terminated.
make[6]: *** [precompiled.hpp.gch] Error 1
...

apparently it tries to do 64-bit compile, see the -m64 option, full log is http://fedora.danny.cz/s390/build.log


Version-Release number of selected component (if applicable):
java-1.7.0-openjdk-1.7.0.60-2.4.2.1.fc20

Comment 1 Andrew John Hughes 2013-09-18 21:04:51 UTC
Same Zero issues already fixed:

http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/hotspot/rev/09f439dfd7b9
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/hotspot/rev/56f4e181b8d4

Also made the following spec changes:

diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index a21b627..c8e001b 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -617,6 +617,9 @@ export ALT_BOOTDIR="$JDK_TO_BUILD_WITH"
 oldumask=`umask`
 
 # Set generic profile
+%ifnarch %{jit_arches}
+export ZERO_BUILD=true
+%endif
 source jdk/make/jdk_generic_profile.sh
 
 # Restore old umask
@@ -648,6 +651,7 @@ make \
   DEBUG_CLASSFILES="true" \
   DEBUG_BINARIES="true" \
   STRIP_POLICY="no_strip" \
+  ZERO_ARCHFLAG="${ZERO_ARCHFLAG}" \
 %ifnarch %{jit_arches}
   LIBFFI_CFLAGS="`pkg-config --cflags libffi` " \
   LIBFFI_LIBS="-lffi " \

I mentioned these to Jiri when similar problems occurred with the ARM32 build but it appears the changes were never made.

Comment 2 Andrew John Hughes 2013-09-18 21:06:44 UTC
The second bit shouldn't be necessary, but the first is.

Comment 3 Andrew John Hughes 2013-09-19 00:45:37 UTC
Confirmed; the second part isn't necessary.  I managed a clean build with the latest HotSpot patches and just the first part of the above diff.

You need to sync up with http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/hotspot/rev/b732355257e3

Comment 4 Fedora Update System 2013-09-20 06:22:58 UTC
java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc18

Comment 5 Fedora Update System 2013-09-20 06:23:25 UTC
java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc19

Comment 6 Fedora Update System 2013-09-20 06:23:52 UTC
java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc20

Comment 7 Fedora Update System 2013-09-20 18:55:17 UTC
Package java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17234/java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-09-22 04:26:46 UTC
java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-09-22 23:58:16 UTC
java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-09-29 01:32:07 UTC
java-1.7.0-openjdk-1.7.0.60-2.4.2.4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.