* Java handling in OpenEmbedded
@ 2009-12-07 18:59 Marcin Juszkiewicz
2009-12-07 20:20 ` Koen Kooi
2009-12-24 10:31 ` Robert Schuster
0 siblings, 2 replies; 3+ messages in thread
From: Marcin Juszkiewicz @ 2009-12-07 18:59 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]
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@jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
[-- Attachment #2: fix-java-staging.diff --]
[-- Type: text/x-patch, Size: 1127 bytes --]
diff --git a/classes/java.bbclass b/classes/java.bbclass
index b68035c..fecd7f5 100644
--- a/classes/java.bbclass
+++ b/classes/java.bbclass
@@ -13,9 +13,9 @@ libdir_jni ?= ${libdir}/jni
# JVM bundle location on target
libdir_jvm ?= ${libdir}/jvm
-STAGING_DATADIR_JAVA ?= ${STAGING_DATADIR}/java
-STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni
-STAGING_LIBDIR_JVM ?= ${STAGING_LIBDIR}/jvm
+STAGING_DATADIR_JAVA ?= ${STAGING_DIR_JAVA}
+STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni
+STAGING_LIBDIR_JVM ?= ${STAGING_LIBDIR}/jvm
STAGING_DATADIR_JAVA_NATIVE ?= ${STAGING_DATADIR_NATIVE}/java
STAGING_LIBDIR_JNI_NATIVE ?= ${STAGING_LIBDIR_NATIVE}/jni
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index d1ed040..bfc28d5 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -264,6 +264,7 @@ B = "${S}"
STAGING_DIR = "${TMPDIR}/staging"
+STAGING_DIR_JAVA = "${STAGING_DIR}/java"
STAGING_DIR_NATIVE = "${STAGING_DIR}/${BUILD_SYS}"
STAGING_BINDIR_NATIVE = "${STAGING_DIR_NATIVE}${layout_bindir}"
STAGING_BINDIR_CROSS = "${STAGING_DIR_NATIVE}${layout_bindir}/${MULTIMACH_HOST_SYS}"
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: Java handling in OpenEmbedded
2009-12-07 18:59 Java handling in OpenEmbedded Marcin Juszkiewicz
@ 2009-12-07 20:20 ` Koen Kooi
2009-12-24 10:31 ` Robert Schuster
1 sibling, 0 replies; 3+ messages in thread
From: Koen Kooi @ 2009-12-07 20:20 UTC (permalink / raw)
To: openembedded-devel
On 07-12-09 19:59, Marcin Juszkiewicz wrote:
>
> 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.
Your proposal sounds good to me. I'm willing to sacrifice some buildtime
and storage om my buildhosts to retain my sanity when building java stuff :)
regards,
Koen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Java handling in OpenEmbedded
2009-12-07 18:59 Java handling in OpenEmbedded Marcin Juszkiewicz
2009-12-07 20:20 ` Koen Kooi
@ 2009-12-24 10:31 ` Robert Schuster
1 sibling, 0 replies; 3+ messages in thread
From: Robert Schuster @ 2009-12-24 10:31 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 2588 bytes --]
Hi Marcin,
I am all fine with this change. However shouldn't the Jars end up in
something
like all-angstrom-foobar/usr/share/java then?
The second problem is native staging. In case 'inherit native' is active
STAGING_DIR_JAVA
needs to be changed to point into something like x86_64/usr/share/java.
Its a one
line change I am committing to org.oe.dev. It should be applied to the
stable branch as well:
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=a0bed236db2e2bc4beace697809eab8db9e51e01
Regards,
Robert
Marcin Juszkiewicz schrieb:
> 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,
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 268 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-24 10:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-07 18:59 Java handling in OpenEmbedded Marcin Juszkiewicz
2009-12-07 20:20 ` Koen Kooi
2009-12-24 10:31 ` Robert Schuster
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.