Adding openjdk-8 to L5.4.24_2.1.0 (Ubuntu 18.04 LTS)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding openjdk-8 to L5.4.24_2.1.0 (Ubuntu 18.04 LTS)

4,644 Views
prashant_chopad
Contributor II

Hello All,

I have iMX8M Mini EVK.

I did setup a Yocto toolchain for version L5.4.24_2.1.0 on my Ubuntu 18.04 LTS system.

I did successfully "bitbake imx-image-multimedia"

Then I am trying to add support for openjdk-8.

Referred "How to add openjdk to Yocto Layers "

I did "git checkout -b zeus origin/zeus"

I did modify bblayers.conf and local.conf as per the guide.

I did successfully "bitbake openjdk-8 -c fetch"

But when I tried to do "bitbake openjdk-8 -c compile", got following error:

WARNING: cacao-native-2d6f6c14daf9-r0 do_fetch: Failed to fetch URL https://bitbucket.org/cacaovm/cacao-staging/get/2d6f6c14daf9.zip, attempting MIRRORS if available
ERROR: cacao-native-2d6f6c14daf9-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export PATH="/home/ubuntu/imx8mm/imx-yocto-bsp/sources/poky/scripts/native-intercept:/home/ubuntu/imx8mm/imx-yocto-bsp/sources/poky/scripts:/home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/x86_64-linux/cacao-native/2d6f6c14daf9-r0/recipe-sysroot-native/usr/bin/x86_64-linux:/home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/x86_64-linux/cacao-native/2d6f6c14daf9-r0/recipe-sysroot-native/usr/bin:/home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/x86_64-linux/cacao-native/2d6f6c14daf9-r0/recipe-sysroot-native/usr/sbin:/home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/x86_64-linux/cacao-native/2d6f6c14daf9-r0/recipe-sysroot-native/usr/bin:/home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/x86_64-linux/cacao-native/2d6f6c14daf9-r0/recipe-sysroot-native/sbin:/home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/x86_64-linux/cacao-native/2d6f6c14daf9-r0/recipe-sysroot-native/bin:/home/ubuntu/imx8mm/imx-yocto-bsp/sources/poky/bitbake/bin:/home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/hosttools"; export HOME="/home/ubuntu"; /usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate -P /home/ubuntu/imx8mm/imx-yocto-bsp/downloads/ 'https://bitbucket.org/cacaovm/cacao-staging/get/2d6f6c14daf9.zip' --progress=dot -v failed with exit code 8, output:
--2020-08-22 15:45:47-- https://bitbucket.org/cacaovm/cacao-staging/get/2d6f6c14daf9.zip
Resolving bitbucket.org (bitbucket.org)... 18.205.93.0, 18.205.93.1, 18.205.93.2, ...
Connecting to bitbucket.org (bitbucket.org)|18.205.93.0|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2020-08-22 15:45:47 ERROR 403: Forbidden.


ERROR: cacao-native-2d6f6c14daf9-r0 do_fetch: Fetcher failure for URL: 'https://bitbucket.org/cacaovm/cacao-staging/get/2d6f6c14daf9.zip'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/ubuntu/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/x86_64-linux/cacao-native/2d6f6c14daf9-r0/temp/log.do_fetch.17100
ERROR: Task (virtual:native:/home/ubuntu/imx8mm/imx-yocto-bsp/sources/meta-java/recipes-core/cacao/cacao_2d6f6c14daf9.bb:do_fetch) failed with exit code '1'

Some extra info:

Build Configuration:
BB_VERSION = "1.44.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-18.04"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "imx8mmevk"
DISTRO = "fsl-imx-xwayland"
DISTRO_VERSION = "5.4-zeus"
TUNE_FEATURES = "aarch64 cortexa53 crc crypto"
TARGET_FPU = ""
meta
meta-poky = "HEAD:cba967414370e195d109353e51510bd829aa86c3"
meta-oe
meta-multimedia
meta-python = "HEAD:9e60d30669a2ad0598e9abf0cd15ee06b523986b"
meta-freescale = "HEAD:c2a0d924f6200eea1fb1d1b61e7420ea5da2f8fb"
meta-freescale-3rdparty = "HEAD:dbcc686f52c3c84db8cb86aa8973a4e373651b98"
meta-freescale-distro = "HEAD:ca27d12e4964d1336e662bcc60184bbff526c857"
meta-java = "zeus:95d56a63cdbf1ed9db99a1f02075568fd45a668b"
meta-bsp
meta-sdk
meta-ml = "HEAD:a083ffbbc3f4d1c02b1542746784d7f641a75b60"
meta-browser = "HEAD:5f365ef0f842ba4651efe88787cf9c63bc8b6cb3"
meta-rust = "HEAD:a012a1027defe28495f06ed522a7a82bdd59a610"
meta-gnome
meta-networking
meta-filesystems = "HEAD:9e60d30669a2ad0598e9abf0cd15ee06b523986b"
meta-qt5 = "HEAD:b8bcf8cb576d072f435a0177375e54424f67d1c9"
meta-python2 = "HEAD:231c3d74cfcf734c3415e86ea8dd97f73ddced9d"

From browser, when I tried to access URL: https://bitbucket.org/cacaovm/cacao-staging/ , it asked for name and password.

Is there any ca-certificate required to download?

Would you please provide some pointers to resolve this issue?

Thanks and regards,

Prashant

0 Kudos
11 Replies

4,244 Views
prashant_chopad
Contributor II

@weidong_sun 

Is that error resolved in meta-java repo?

Would you please help me here?

Regards,

Prashant

0 Kudos

4,236 Views
weidong_sun
NXP TechSupport
NXP TechSupport

No, no sulutions.

I have add openjdk-8 to L4.1.15 and L4.19.35 successfully.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-add-openjdk-to-Yocto-Layers/ta-p/...

But failed in L5.4.24_2.1.0, the root cause seems to be caused by the compiler.

 

Have a nice day!

B.R,

Weidong

 

0 Kudos

4,175 Views
prashant_chopad
Contributor II

Hi @weidong_sun ,

I tried to build openjdk-7, but it failed with same error.

But according to this link http://git.yoctoproject.org/cgit/cgit.cgi/meta-java/tree/README?h=zeus it should work for arm-64.

Would you please confirm at your end?

Regards,

Prashant

0 Kudos

4,170 Views
weidong_sun
NXP TechSupport
NXP TechSupport

OK, thanks a lot.

I will take time to test it.

 

Have a nice day!

B.R,

Weidong

 

0 Kudos

4,151 Views
prashant_chopad
Contributor II

Hi @weidong_sun ,

It looks like that version 5.4.24 is not supporting openjdk-8.

Is it possible that, does version 4.19.35 support openjdk-8?

If yes, then what is the difference between them? What will I loose by going with 4.19.35 with reference to iMX8MMini chipset?

Would you please guide here?

Regards,

Prashant

0 Kudos

4,586 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Prashant,

    Yes, I haven't got a solution yet. I compiled openjdk-8 for Yocto zeus in different environments, but they were all unsuccessful.

B.R,

weidong

 

0 Kudos

4,587 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Prashant,

Below is from README in source/meta-java, you can add them to local.conf.

...

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"

# Possible provider: cacao-initial-native and jamvm-initial-native

PREFERRED_PROVIDER_virtual/java-initial-native = "cacao-initial-native"

# Possible provider: cacao-native and jamvm-native

PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"

# Optional since there is only one provider for now

PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"

IMAGE_INSTALL_append = " openjdk-8"

...

I tested the compilation of openjdk-8 in Yocto zeus, but failed.

pastedImage_5.png

I have already compiled openjdk-8  in 2 versions of yocto.

see detail, please!

How to add openjdk to Yocto Layers 

Have a nice day!

B.R,

weidong

0 Kudos

4,587 Views
prashant_chopad
Contributor II

Hello Weidong,

Thanks for the reply. I didn't get icedtea7 error. 

But I got something different error:

| g++: error: unrecognized command line option ‘-fmacro-prefix-map=/home/ubuntu/code/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/openjdk-8/242-r0=/usr/src/debug/openjdk-8/242-r0’
| /home/ubuntu/code/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/openjdk-8/242-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u242-b07/hotspot/make/linux/makefiles/adlc.make:228: recipe for target '../generated/adfiles/dfa.o' failed
| make[6]: *** [../generated/adfiles/dfa.o] Error 1
| /home/ubuntu/code/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/openjdk-8/242-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u242-b07/hotspot/make/linux/makefiles/top.make:91: recipe for target 'ad_stuff' failed
| make[5]: *** [ad_stuff] Error 2
| /home/ubuntu/code/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/openjdk-8/242-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u242-b07/hotspot/make/linux/Makefile:284: recipe for target 'product' failed
| make[4]: *** [product] Error 2
| Makefile:230: recipe for target 'generic_build2' failed
| make[3]: *** [generic_build2] Error 2
| Makefile:177: recipe for target 'product' failed
| make[2]: *** [product] Error 2
| HotspotWrapper.gmk:44: recipe for target '/home/ubuntu/code/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/openjdk-8/242-r0/build/hotspot/_hotspot.timestamp' failed
| make[1]: *** [/home/ubuntu/code/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/openjdk-8/242-r0/build/hotspot/_hotspot.timestamp] Error 2
| /home/ubuntu/code/imx8mm/imx-yocto-bsp/imx8mmevk/tmp/work/aarch64-mx8mm-poky-linux/openjdk-8/242-r0/jdk8u-shenandoah-aarch64-shenandoah-jdk8u242-b07//make/Main.gmk:109: recipe for target 'hotspot-only' failed
| make: *** [hotspot-only] Error 2
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/ubuntu/code/imx8mm/imx-yocto-bsp/sources/meta-java/recipes-core/openjdk/openjdk-8_242.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1709 tasks of which 1708 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/ubuntu/code/imx8mm/imx-yocto-bsp/sources/meta-java/recipes-core/openjdk/openjdk-8_242.bb:do_compile
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

On the last task I got the error.

Is there a way to overcome it?

Thanks,

Prashant

0 Kudos

3,762 Views
gramark
Contributor I

Hi there,

I was also trying to build openjdk-8 within the meta-java layer for the zeus branch (on Ubuntu 16.04) and found this thread because I encountered the same issues. I was finally able to successfully build after the following steps:

This resolved it for me.

0 Kudos

4,586 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Prashant,

In order to compile openjdk-8 in Yocto zeus, I tested 18.04 LTS, 19.04 LTS, 20.04 LTS, but all failed. I have encountered the problem you encountered. The reason is that your 18.04 LTS gcc/g++ compiler version is too low to recognize the -fmacro-prefix-map parameter.

weidong

0 Kudos

4,586 Views
prashant_chopad
Contributor II

Hello Weidong,

I followed these commands to upgrade gcc.

sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install gcc-9 g++-9

But still it failed.

Is there a way to add a support for it?

Or there is no alternative?

When would it be supported, any idea?

Regards,

Prashant

0 Kudos