Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 730224

Summary: Fails to build in mock (deprecated API)
Product: Red Hat Enterprise Linux 6 Reporter: Mathieu Bridon <bochecha>
Component: geronimo-specsAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: low    
Version: 6.0CC: herrold, mizdebsk, sochotni
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-10 13:16:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Mock build.log file when trying to build the package.
none
Mock build.log file when trying to build the package with GCJ. none

Description Mathieu Bridon 2011-08-12 08:32:55 UTC
Description of problem:
geronimo-specs-1.0-3.4.M2 fails to build in an EL6 mock chroot, with the following error:
----------
+ 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.
2 errors
+ exit 1
----------


Since the build logs talk about a deprecated API, I tried building it with GCJ 1.5 instead of OpenJDK6:
----------
diff --git a/geronimo-specs.spec b/geronimo-specs.spec
index b4f3a39..6632397 100644
--- a/geronimo-specs.spec
+++ b/geronimo-specs.spec
@@ -1,7 +1,7 @@
 %define bname  geronimo
 %define mstone M2
 
-%define _without_gcj_support 1
+%define _with_gcj_support 1
 
 %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
----------


The package now builds, but it fails during %install when trying to generate the debuginfos:
----------
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id /builddir/build/BUILD/geronimo-1.0-M2
extracting debug info from /builddir/build/BUILDROOT/geronimo-specs-1.0-3.4.M2.el6.x86_64/usr/lib64/gcj/geronimo-specs/spec-j2ee-deployment-1.1-rc2.jar.so
extracting debug info from /builddir/build/BUILDROOT/geronimo-specs-1.0-3.4.M2.el6.x86_64/usr/lib64/gcj/geronimo-specs/spec-j2ee-jacc-1.0-rc2.jar.so
extracting debug info from /builddir/build/BUILDROOT/geronimo-specs-1.0-3.4.M2.el6.x86_64/usr/lib64/gcj/geronimo-specs/spec-j2ee-management-1.0-rc2.jar.so
error: Bad exit status from /var/tmp/rpm-tmp.SKoJpE (%install)
----------


No idea why that fails though.

Comment 1 Mathieu Bridon 2011-08-12 08:45:31 UTC
Created attachment 517987 [details]
Mock build.log file when trying to build the package.

Comment 2 Mathieu Bridon 2011-08-12 08:46:20 UTC
Created attachment 517988 [details]
Mock build.log file when trying to build the package with GCJ.

Comment 4 RHEL Program Management 2011-08-12 09:08:07 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 5 Stanislav Ochotnicky 2012-07-10 13:16:12 UTC
Basically the solution is to compile with gcj but *not* set %define _with_gcj_support 1. This issue does not affect our builds and I assume it's caused by trying to rebuild this package in epel buildroot. 

If you need to rebuild this package yourself and have a support contract, please raise a ticket through your regular Red Hat support channels to make certain  it receives the proper attention and prioritization to assure a timely resolution. 

For information on how to contact the Red Hat production support team, please visit: https://www.redhat.com/support/process/production/#howto

Comment 6 Mikolaj Izdebski 2012-10-24 14:48:32 UTC

*** This bug has been marked as a duplicate of bug 869198 ***