[oe] Java handling in OpenEmbedded

Marcin Juszkiewicz marcin at juszkiewicz.com.pl
Mon Dec 7 18:59:18 UTC 2009


Hi

For most of time I do builds of BugLabs software for just one device: BUG 
which uses i.mx31 cpu (armv6). As I need to test it also on BeagleBoard I got 
hit by one problem when it comes to building Java software...

As Java is target independent we package it as "all". But the problem is when 
build want to get JAR files built from other recipes (think dependencies). By 
default all those jars are staged into target staging (armv6-angstrom-linux-
gnueabi in this case). It works fine as long as you do not want to build for 
other architecture in same tmpdir.

After MACHINE change OE thinks (correctly) that it does not need to build Java 
things again (as it was PACKAGE_ARCH="all") and tries to use it from staging. 
But staging/usr/share/java/ dir is empty...

OK, someone can say "but what is a deal? it got built before so you can just 
install packages - they are 'all' anyway". Sure, but some of our Java recipes 
are bind to BUG kernel services so can not be built for other devices and we 
do not want to be forced to keep MACHINE values in specific order to 'maybe 
this will work' way of building.

What is a solution? I had few ideas during weekend and tested two of them.

1. Drop PACKAGE_ARCH="all" for ALL Java recipes. It works but adds extra
   building time.

2. Change staging of JAR files. This worked fine for my build. Patch to
   stable/2009 branch attached.

Please test and reply what do you think about it. I did tests with BugLabs 
meta-bug/ overlay [1] (concierge and some of bug-osgi are good test targets).

1. svn://svn.buglabs.net/bug/trunk/com.buglabs.build.oe/meta-bug/

Regards, 
-- 
JID:      hrw at jabber.org
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-java-staging.diff
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20091207/1d7e1953/attachment-0002.bin>


More information about the Openembedded-devel mailing list