Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 456459

Summary: SDK: @OFFICE_BASE_HOME@ in setsdkenv_unix.sh, cppumaker fails
Product: [Fedora] Fedora Reporter: Ville-Pekka Vainio <vpvainio>
Component: openoffice.orgAssignee: Caolan McNamara <caolanm>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: jnavrati
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-24 10:26:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
rpmbuild -bi log from the first SRPM, problem 1
none
rpmbuild -bi log from the second SRPM, problem 2
none
replacement .src.rpm none

Description Ville-Pekka Vainio 2008-07-23 20:18:58 UTC
Description of problem:
I'm trying to build a new version of openoffice.org-voikko, but it fails due to
some SDK problems.

Problem 1:

/usr/lib/openoffice.org/basis3.0/sdk/setsdkenv_unix.sh has the following line:
OFFICE_BASE_HOME=@OFFICE_BASE_HOME@
I believe this means that for some reason the variable was not "expanded" from
setsdkenv_unix.sh.in. Because of this, setsdkenv_unix.sh fails when trying to
run "/usr/lib/openoffice.org/basis3.0/sdk/bin/cppumaker" -Gc -BUCR -O./build/hpp
""@OFFICE_BASE_HOME@/program/offapi.rdb""

The SRPM for this build should be at
http://vpv.fedorapeople.org/packages/openoffice.org-voikko-3.0-0.1.pre3.fc10.src.rpm


Problem 2:

I have managed to go around problem one by making an editable copy of the bash
script and doing a sed replace. But then cppumaker fails like this:
"/usr/lib/openoffice.org/basis3.0/sdk/bin/cppumaker" -Gc -BUCR -O./build/hpp
""/usr/lib/openoffice.org/basis3.0/program/offapi.rdb""
/usr/lib/openoffice.org/basis3.0/sdk/bin/cppumaker ERROR: cannot dump Type
'com/sun/star/lang/NullPointerException'

The SRPM for this build should be at
http://vpv.fedorapeople.org/packages/openoffice.org-voikko-cppumaker-3.0-0.1.pre3.fc10.src.rpm

Version-Release number of selected component (if applicable):
openoffice.org-sdk-3.0.0-0.0.25.1.fc10.i386

How reproducible:
Always

Steps to Reproduce:
1. Do rpmbuild -bi to any of the two spec files found from the SRPMs
  
Actual results:
Both fail.

Expected results:
Doing an rpmbuild -bi to the spec file in the first SRPM should at least start
building the code of the extension.

If you need any more information, just ask me. I'll try to attach logs from both
rpmbuild -bi runs to this report.

Comment 1 Ville-Pekka Vainio 2008-07-23 20:18:58 UTC
Created attachment 312517 [details]
rpmbuild -bi log from the first SRPM, problem 1

Comment 2 Ville-Pekka Vainio 2008-07-23 20:20:57 UTC
Created attachment 312519 [details]
rpmbuild -bi log from the second SRPM, problem 2

Comment 3 Caolan McNamara 2008-07-23 22:59:56 UTC
Clearly the 3-layer OOo stuff has had changes in the sdk, I'd guess that the
default options should be 

@OFFICE_HOME@, as %{baseinstdir}
and
@OFFICE_BASE_HOME@,%{basisinstdir}

where
baseinstdir and baseisinstdir are
%{_libdir}/openoffice.org and %{_libdir}/openoffice.org/basis3.0

I'll see if that works tomorrow

Comment 4 Caolan McNamara 2008-07-24 10:12:45 UTC
Created attachment 312540 [details]
replacement .src.rpm

Here's a .src.rpm which builds (against 3.0.0) for me, at least to the correct
stage

Comment 5 Caolan McNamara 2008-07-24 10:26:26 UTC
Fixed BASE_HOME in 3.0.0-0.26-2.

So, as far as I can tell, in the "brave new 3 layer world" one has to dump with
cppumaker *both* the offapi.rdb and types.rdb, i.e. as in the patch in the above
.rpm, if one wants to use offapi.rdb. But I've sent a mail to verify this, and
cc'ed you on it to make sure.

At that stage this will now build until some errors about unimplemented grammar
checking functions in voikko::GrammarChecker (which I believe is simply because
the base classes have been extended in 3.0.0 to add new functions)

So I believe the Fedora-OOo side of this is back in place.

Comment 6 Caolan McNamara 2008-07-24 11:08:32 UTC
ok, so from the horses mouth it is...

"
I changed the SDK examples to use explicitly two variables $(URE_TYPES) 
and $(OFFICE_TYPES). The old $(OFFICE_TYPE_LIBRARY) points now on 
$(OFFICE_TYPES). Yes i agree that it make sense to extend it to
OFFICE_TYPE_LIBRARY=$(URE_TYPES) $(OFFICE_TYPES) for compatibility reasons.

I haven't found the time to write some docu for the new SDK where i 
document this changes
"

So the best thing (fow now) looks like for openoffice.org-voikko to use
CPPUMAKER on "$(URE_TYPES)  $(OFFICE_TYPES)" instead of $(OFFICE_TYPE_LIBRARY)

Comment 7 Ville-Pekka Vainio 2008-07-25 20:17:12 UTC
(In reply to comment #5)
> So I believe the Fedora-OOo side of this is back in place.

Yes, thanks again. Upstream released a new prerelease with the new API and using
"$(URE_TYPES)  $(OFFICE_TYPES)". It should soon be in Rawhide as
openoffice.org-voikko-3.0-0.1.pre4.fc10.