Skip to contentSkip to conversation

Errors Building openjdk-8 on dunfell

DISCUSSION Robert Joslyn 2 participants 2 messages Jun 30, 2020

lore
Share & tools
lore
#0 lore raw

I'm trying to build openjdk-8 on dunfull and am getting some build errors. Using an Ubuntu 18.04 host, I get an error building the openjdk-8 recipe:

| g++: error: unrecognized command line option ‘-fmacro-prefix- map=/mnt/yocto/bionic/poky/build/tmp/work/core2-64-poky-linux/openjdk- 8/252-r0=/usr/src/debug/openjdk-8/252-r0’

This seems to imply I need a newer gcc which supports the -fmacro-prefix- map option. The README says I need gcc 6 or later on the host, but 18.04 has gcc 7.5.0. Maybe the README is outdated?

I then tried building in an Ubuntu 20.04 container to see if that makes any difference. It fails in a different way while building icedtea7- native:

| /usr/include/x86_64-linux-gnu/bits/stdio2.h:100:24: error: ‘%s’ directive argument is null [-Werror=format-overflow=]

I'm doing clean builds with both my 18.04 and 20.04 setups starting with separate, empty sstate-cache directories. Both builds are using poky defaults:

Build Configuration:

BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "dunfell:93ef4736915090ac9a2402916df8924ac4439490"
meta-oe              = "dunfell:8a72d29e0876830ffd96b85d7d0308302eb07a5d"
meta-java            = "dunfell:cf9604a4789801d9dfb0cb8ca134ff04b42ae161"

Is there some trick I'm missing to get clean builds out of the box? I can fix the 20.04 build by adding -Wno-error for that specific warning (and can send a patch if desired), but has anyone else had these issues? Any thoughts would be appreciated.

Thanks,
Robert

#1 lore raw
Quoted 11 lines · Robert Joslyn

I'm trying to build openjdk-8 on dunfull and am getting some build errors. Using an Ubuntu 18.04 host, I get an error building the openjdk-8 recipe:

| g++: error: unrecognized command line option ‘-fmacro-prefix- map=/mnt/yocto/bionic/poky/build/tmp/work/core2-64-poky-linux/openjdk- 8/252-r0=/usr/src/debug/openjdk-8/252-r0’

This seems to imply I need a newer gcc which supports the -fmacro-prefix- map option. The README says I need gcc 6 or later on the host, but 18.04 has gcc 7.5.0. Maybe the README is outdated?

Quoted 6 lines

I then tried building in an Ubuntu 20.04 container to see if that makes any difference. It fails in a different way while building icedtea7- native:

| /usr/include/x86_64-linux-gnu/bits/stdio2.h:100:24: error: ‘%s’ directive argument is null [-Werror=format-overflow=]

I guess compiler on your host is too new for openjdk-8, perhaps you might get through by disabling Werror option to host cflags. You might have to dig the appropriate place to stick the option in.

Quoted 32 lines

I'm doing clean builds with both my 18.04 and 20.04 setups starting with separate, empty sstate-cache directories. Both builds are using poky defaults:

Build Configuration:

BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "3.1.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp       = "dunfell:93ef4736915090ac9a2402916df8924ac4439490"
meta-oe              = "dunfell:8a72d29e0876830ffd96b85d7d0308302eb07a5d"
meta-java            = "dunfell:cf9604a4789801d9dfb0cb8ca134ff04b42ae161"

Is there some trick I'm missing to get clean builds out of the box? I can fix the 20.04 build by adding -Wno-error for that specific warning (and can send a patch if desired), but has anyone else had these issues? Any thoughts would be appreciated.

Thanks,
Robert