cacao-native 1.6.1 failing because compiler not produced?
I am trying to compile openjdk with cacao for Armv5.
I followed the (older) instructions on http://icedtea.classpath.org/wiki/CrossCompileOECoreTutorial and replaced the java-meta repository with the new location.
I've set the machine to qemuarm and tried to select cacao as the preferred jvm everywhere:
PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"
PREFERRED_PROVIDER_virtual/java-native = "cacao-native" PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
PREFERRED_RPROVIDER_java2-runtime = "cacao"
PREFERRED_VERSION_cacao-initial = "0.98"
PREFERRED_VERSION_classpath-initial = "0.93"
PREFERRED_VERSION_icedtea6-native = "1.8.11"
PREFERRED_VERSION_classpath-native = "0.99"
PREFERRED_VERSION_classpath = "0.99"
PREFERRED_PROVIDER_classpath = "classpath-minimal"
I don't know if there are any version issue, for initial cacao I had this 0.98 but for other aspects it chose 1.6.1 as the only available choice.
I removed the reference to 0.98 and I am now just retrying everything.
But in any case the error I got was that
build/tmp-glibc/work/x86_64-linux/cacao-native/1.6.1-r0/recipe-sysroot-native/usr/bin/ecj-initial
could not find java-initial which, when present, would not be able to find cacao-initial.
Because both didn't exist.
If I symlinked the missing versions to 0.98 version it would core dump.
Should I symlink this to something else?
My bblayers.conf is:
BBLAYERS = " \
/prj/oe-core/meta \
/prj/oe-core/meta-openembedded/meta-oe \
/prj/oe-core/meta-java \
/prj/oe-core/meta-kirkwood \
"
apart from the usual, and kirkwood does give an error but not very important I think:
WARNING: No bb files matched BBFILE_PATTERN_meta-kirkwood '^/prj/oe-core/meta-kirkwood/'
I did not use Hob (it was not there ;-)).
Other things have not been changed in either local.conf or bblayers.conf.
What can I do here? Not use cacao for native and target?
I'm very new to this ;-).
Regards,
Xen.
Forgot to mention that:
Loading cache: 100% | --- | Time: 0:00:00
Loaded 1 entries from dependency cache.
Parsing recipes: 100% | --- | Time: 0:01:54
Parsing of 1551 .bb files complete (1 cached, 1550 parsed). 2178 targets, 196 skipped, 0 masked, 0 errors.
WARNING: No bb files matched BBFILE_PATTERN_meta-kirkwood '^/store/projects/embedded-java/meta-kirkwood/'
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.34.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "ubuntu-16.04" TARGET_SYS = "arm-oe-linux-gnueabi" MACHINE = "qemuarm" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "arm armv5 thumb dsp" TARGET_FPU = "soft" meta = "master:123962018251dfb1d6ca5aa5c0d02534007de3ab" meta-oe = "master:e7ad92decb7025d76e2e8b2bc15349d548c8ad14" meta-java = "master:6eed0bbfa831f736bbab4d285c57deeec8f5d562" meta-kirkwood = "master:e06973b85716a1cf920dc3d27beccecf3de12bf3"
Is the main start output.
And the command I use is just bitbake openjdk-7 or bitbake openjdk-8, same result.
Regards.
Xen schreef op 01-05-2017 17:49:
Quoted 8 lines
I am trying to compile openjdk with cacao for Armv5.
build/tmp-glibc/work/x86_64-linux/cacao-native/1.6.1-r0/recipe-sysroot-native/usr/bin/ecj-initial
could not find java-initial which, when present, would not be able to find cacao-initial.
I just symlinked the required files to /usr/bin/java and it proceeded.
Next up the C++ compiler refuses a negative left hand value in a left shift in
build/tmp-glibc/work/armv5e-oe-linux-gnueabi/openjdk-7-jre/99b00-2.6.5-r6.1/icedtea-2.6.5/build/openjdk/hotspot/src/share/vm/code/dependencies.hpp
all_types = ((1 << TYPE_LIMIT) - 1) & ((-1) <<
FIRST_TYPE),
But that was not the only one. So much pain.
Botched up the hotspot tree, trying to rerun -c unpack and -c patch and -c configure but not working...
Not a great way to spend your evening.
Eventually bitbake openjdk-7-jre -C configure caused it to configure again.
I hoped I could pass environment variable OE_CXXFLAGS but that didn work. Changing meta/conf/bitbake.conf caused the entire build to be invalidated, oops. Of course, bit to be expected.
Already spent at least an hour trying to get a CXXFLAG to be recognised...
And will take many more hours now...
Really useful that you can't shift -1 but ~0 also doesn't work. But I find it impossible to get any values passed through the bitbake command?
CXXFLAGS doesn'st work, EXTRA_CFLAGS doesn't work, OE_CXXFLAGS doesn't work, changing the entire bitbake.conf doesn't work.
Already not worth that much to me anymore...
Well, I'm sorry for this ranting. Trying gcc 5.4.0 to see if that works.
So my apologies for these messages I guess, but yeah.
After linking a java executable Cacao-1.6.1 would build.
After specifying GCCVERSION ?= "5.4.0" openjdk-7 would build.
My little NAS device for which it was meant is too old though for the versions used. I have a toolchain for it but I wouldn't know how to inject it into OE yet.
Without chroot it segfaults and with chroot it says kernel too old.
I used "classpath-minimal" but apparently it also built AWT components.
I tried to select cacao as RPROVIDER for java2-runtime but it still compiled the zero hotspot. Then it needed a newer stdc++ and then it needed a newer libc, and then it segfaulted.
Cacao was also compiled but obviously not as libjvm.so
Thus, eventual success for compilation, but I will have to use my own toolchain if I want this to work.
I guess it is not required to use OE if I do not use IcedTea as you can apparently cross compile openjdk without OE (http://mail.openjdk.java.net/pipermail/zero-dev/2014-December/000538.html).
I will check with openjdk.java.net for further inquiries.
Thank you.