Bug 506036 - [fix available] rpmbuild fails when java-1.6.0-*-devel is installed
Summary: [fix available] rpmbuild fails when java-1.6.0-*-devel is installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openoffice.org
Version: 5.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-15 11:28 UTC by David Tardon
Modified: 2010-03-30 08:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:45:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
relevant snippet of instsetoo_native/unxlngx6.pro/OpenOffice/rpm/logging/en-US/log_OOG680_en-US.log (2.31 KB, text/plain)
2009-06-15 11:29 UTC, David Tardon
no flags Details
fix (30.34 KB, patch)
2009-06-15 11:29 UTC, David Tardon
no flags Details | Diff
set relevant variables in spec (640 bytes, patch)
2009-09-22 07:49 UTC, David Tardon
no flags Details | Diff
don't use gcj-specific options, as ecj doesn't recognize them (493 bytes, patch)
2009-09-22 07:51 UTC, David Tardon
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0274 0 normal SHIPPED_LIVE openoffice.org bug fix and enhancement update 2010-03-29 13:52:09 UTC

Description David Tardon 2009-06-15 11:28:26 UTC
Description of problem:


Version-Release number of selected component (if applicable):
openoffice.org-2.3.0-6.11.el5

How reproducible:
always

Steps to Reproduce:
1. install RHEL 5.3 or 5.4
2. enable Server-Supplementary channel
3. install java-1.4.2-gcj-compat-devel
4. install java-1.6.0-sun-devel
5. install other build dependencies of openoffice.org
6. rpmbuild --rebuild openoffice.org-2.3.0-6.11.el5.src.rpm
  
Actual results:
Fails during registering java UNO components.

Expected results:
RPMs are created.

Additional info:
openoffice.org 2.x requires java 1.4 for building components, but the ant scripts that are used to build some of the components doesn't limit java version to 1.4. If some incompatible (i.e. 1.5 or 1.6) version of java is installed and set as default, it will be used to build the components. This  causes regcomp to fail, because it haven't recognized version of classes in a jar archive.

Comment 1 David Tardon 2009-06-15 11:29:15 UTC
Created attachment 347916 [details]
relevant snippet of instsetoo_native/unxlngx6.pro/OpenOffice/rpm/logging/en-US/log_OOG680_en-US.log

Comment 2 David Tardon 2009-06-15 11:29:55 UTC
Created attachment 347917 [details]
fix

Comment 3 David Tardon 2009-09-22 07:42:10 UTC
The situation is just the same with java-1.6.0-openjdk-devel. Steps to reproduce remain as described in comment 0, except that step 2 is not relevant here.

Comment 4 David Tardon 2009-09-22 07:48:07 UTC
I considered the problem more and I think now it would be better to always enforce building with gcj (ecj) than to instruct javac (through ant) to generate 1.4 compatible bytecode. The following patches do that.

Hopefully it would make an end to java-related build problems.

Comment 5 David Tardon 2009-09-22 07:49:55 UTC
Created attachment 362034 [details]
set relevant variables in spec

Comment 6 David Tardon 2009-09-22 07:51:58 UTC
Created attachment 362035 [details]
don't use gcj-specific options, as ecj doesn't recognize them

Comment 8 koka xiong 2010-01-06 06:01:51 UTC
hi, I have tried many times on all arches on our stable systems,every time it fails.I am not sure whether I miss something,the log as follows:

**************************************************
ERROR: ERROR: Could not register all components for file services.rdb (gid_Starregistry_Services_Rdb)!
in function: create_services_rdb
**************************************************

**************************************************
ERROR: Saved logfile: /usr/src/redhat/BUILD/OOO310_m19/instsetoo_native/unxlngi6.pro/OpenOffice/rpm/logging/en-US/log_OOO310_en-US.log
**************************************************
dmake:  Error code 255, while making 'openoffice_en-US'
+ echo - ---dump log start---
+ cat ../unxlngi6.pro/OpenOffice/rpm/logging/en-US/log_OOO310_en-US.log
+ echo - ---dump log end---
+ dmake openoffice_en-US
Subroutine installer::epmfile::getcwd redefined at /usr/lib/perl5/5.8.8/Exporter.pm line 65.
 at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/POSIX.pm line 19
rmdir: /usr/src/redhat/BUILD/OOO310_m19/instsetoo_native/unxlngi6.pro/OpenOffice/rpm/logging/: Directory not empty
javavm.uno.so
javaloader.uno.so
stocservices.uno.so

**************************************************
ERROR: ERROR: Could not register all components for file services.rdb (gid_Starregistry_Services_Rdb)!
in function: create_services_rdb
**************************************************

**************************************************
ERROR: Saved logfile: /usr/src/redhat/BUILD/OOO310_m19/instsetoo_native/unxlngi6.pro/OpenOffice/rpm/logging/en-US/log_OOO310_en-US.log
**************************************************
dmake:  Error code 255, while making 'openoffice_en-US'
error: Bad exit status from /var/tmp/rpm-tmp.2148 (%install)
 Bad exit status from /var/tmp/rpm-tmp.2148 (%install)

Please help me look at the log,thank you very much!

Comment 9 David Tardon 2010-01-06 06:16:52 UTC
dtardon->kxiong: I've already sent you a mail with explanation.

Comment 11 Yewei Shao 2010-01-11 06:55:41 UTC
Following the steps that described in the comment 0, now after using "rpmbuild --rebuild openoffice.org-3.1.1-19.5.el5.src.rpm", it can generate RPMs and no error. So this bug is verified in openoffice.org-3.1.1-19.5.el5.

Comment 13 errata-xmlrpc 2010-03-30 08:45:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0274.html


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