Red Hat Bugzilla – Bug 869198
geronimo-specs-1.0-3.5.M2.el6.src can't be rebuild in mock
Last modified: 2016-07-22 02:15:36 EDT
since it give this error:
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.j67e8w
+ umask 022
+ cd /builddir/build/BUILD
+ cd geronimo-1.0-M2
+ export LANG
+ unset DISPLAY
+ export JAVA_HOME=/usr/lib/jvm/java-1.5.0
+ export PATH=/usr/lib/jvm/java-1.5.0/bin:/usr/lib/ccache:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/builddir/bin
+ mkdir -p build/lib
+ for spec in ejb-2.1 j2ee-connector-1.5 j2ee-deployment-1.1 j2ee-jacc-1.0 j2ee-management-1.0 jms-1.1 jta-1.0.1B
++ echo ejb-2.1
++ sed 's:-[^-]*$::'
+ mkdir -p build/classes/ejb
+ case $name in
+ unset CLASSPATH
+ find specs/ejb/src/java -name '*.java'
+ xargs javac -source 1.4 -target 1.4 -d build/classes/ejb
specs/ejb/src/java/javax/ejb/EJBContext.java:29: cannot find symbol
symbol : class UserTransaction
location: package javax.transaction
specs/ejb/src/java/javax/ejb/EJBContext.java:61: cannot find symbol
symbol : class UserTransaction
location: interface javax.ejb.EJBContext
UserTransaction getUserTransaction() throws IllegalStateException;
Note: specs/ejb/src/java/javax/ejb/EJBContext.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
What JVM did you use?
Can you attach root.log?
a fully updated rhel-6.3
Created attachment 632005 [details]
I tried reproducing the FTBFS, but I was unable -- the package builds just fine in RHEL 6.3 mock.
From the root.log I can see you use mock version 1.1.22, but from what I can see there is no such version in RHEL 6.3. Also it seems that you are using a custom mock configuration. Could you try reproducing the issue with RHEL 6.3 mock and default configuration?
I found the cause of the bug. Patch will be attached.
Comment in spec file says: "Force Java 5 (GCJ) as this code will not build on Java due to API differences". The FTBFS was caused by using Java 6 compiler instead of Java 5.
mock 0.9.14 uses "yum install" to install build dependencies
mock 1.1.21 uses "yum-builddep" to install build dependencies
"yum install java-devel" results in installing java-1.5.0-gcj-devel
"yum-builddep" with BuildRequires: java-devel results in java-1.6.0-openjdk-devel being installed
As a result, with newer version of mock OpenJDK compiler was used, which is implementation of Java 6. Builds with older mock used ECJ, which supports Java 5 (despite its name, java-1.5.0-gcj-devel is ECJ compiler, not GCJ!)
The fix is to change BuildRequires: java-devel to java-1.5.0-gcj and correct JAVA_HOME. After this change ECJ is used during build.
Created attachment 632808 [details]
Replace java-devel BuildRequires with java-1.5.0-gcj
Created attachment 632809 [details]
Replace java-devel BuildRequires with java-1.5.0-gcj-devel
*** Bug 730224 has been marked as a duplicate of this bug. ***
Red Hat Enterprise Linux version 6 is entering the Production 2 phase of its lifetime and this bug doesn't meet the criteria for it, i.e. only high severity issues will be fixed. Please see https://access.redhat.com/support/policy/updates/errata/ for further information.
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.