Bug 869198 - geronimo-specs-1.0-3.5.M2.el6.src can't be rebuild in mock
geronimo-specs-1.0-3.5.M2.el6.src can't be rebuild in mock
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: geronimo-specs (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Java maintainers
BaseOS QE - Apps
: EasyFix, Patch
: 730224 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 05:09 EDT by Levente Farkas
Modified: 2016-07-22 02:15 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-22 02:15:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
root log (5.44 KB, application/x-gzip)
2012-10-23 06:03 EDT, Levente Farkas
no flags Details
Replace java-devel BuildRequires with java-1.5.0-gcj (1.59 KB, patch)
2012-10-24 09:48 EDT, Mikolaj Izdebski
no flags Details | Diff
Replace java-devel BuildRequires with java-1.5.0-gcj-devel (1.61 KB, patch)
2012-10-24 09:53 EDT, Mikolaj Izdebski
no flags Details | Diff

  None (edit)
Description Levente Farkas 2012-10-23 05:09:27 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
+ LANG=C
+ export LANG
+ unset DISPLAY
+ export JAVA_HOME=/usr/lib/jvm/java-1.5.0
+ 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
+ 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:-[^-]*$::'
+ name=ejb
+ srcdir=specs/ejb/src/java
+ classdir=build/classes/ejb
+ mkdir -p build/classes/ejb
+ jarfile=build/lib/spec-ejb-2.1.jar
+ 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
import javax.transaction.UserTransaction;
                        ^
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.
------------------------------
Comment 1 Mikolaj Izdebski 2012-10-23 05:17:44 EDT
What JVM did you use?
Can you attach root.log?
Comment 3 Levente Farkas 2012-10-23 06:02:39 EDT
a fully updated rhel-6.3
Comment 4 Levente Farkas 2012-10-23 06:03:25 EDT
Created attachment 632005 [details]
root log
Comment 5 Mikolaj Izdebski 2012-10-24 08:24:56 EDT
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?
Comment 6 Mikolaj Izdebski 2012-10-24 09:44:44 EDT
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.
Comment 7 Mikolaj Izdebski 2012-10-24 09:48:17 EDT
Created attachment 632808 [details]
Replace java-devel BuildRequires with java-1.5.0-gcj
Comment 8 Mikolaj Izdebski 2012-10-24 09:53:07 EDT
Created attachment 632809 [details]
Replace java-devel BuildRequires with java-1.5.0-gcj-devel
Comment 9 Mikolaj Izdebski 2012-10-24 10:48:32 EDT
*** Bug 730224 has been marked as a duplicate of this bug. ***
Comment 13 Mikolaj Izdebski 2016-07-22 01:41:28 EDT
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.
Comment 14 RHEL Product and Program Management 2016-07-22 02:15:36 EDT
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

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