Bug 506036

Summary: [fix available] rpmbuild fails when java-1.6.0-*-devel is installed
Product: Red Hat Enterprise Linux 5 Reporter: David Tardon <dtardon>
Component: openoffice.orgAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: desktop-bugs <desktop-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.4CC: caolanm, kxiong, llim, mshao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 04:45:34 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
relevant snippet of instsetoo_native/unxlngx6.pro/OpenOffice/rpm/logging/en-US/log_OOG680_en-US.log
none
fix
none
set relevant variables in spec
none
don't use gcj-specific options, as ecj doesn't recognize them none

Description David Tardon 2009-06-15 07:28:26 EDT
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 07:29:15 EDT
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 07:29:55 EDT
Created attachment 347917 [details]
fix
Comment 3 David Tardon 2009-09-22 03:42:10 EDT
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 03:48:07 EDT
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 03:49:55 EDT
Created attachment 362034 [details]
set relevant variables in spec
Comment 6 David Tardon 2009-09-22 03:51:58 EDT
Created attachment 362035 [details]
don't use gcj-specific options, as ecj doesn't recognize them
Comment 8 koka xiong 2010-01-06 01:01:51 EST
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 01:16:52 EST
dtardon->kxiong: I've already sent you a mail with explanation.
Comment 11 Yewei Shao 2010-01-11 01:55:41 EST
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 04:45:34 EDT
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