Skip to contentSkip to conversation

fix build errors for Fedora 29

PATCH In review Richard Leitner 2 participants 7 messages Jun 25, 2019 – Oct 1, 2019

lore
Share & tools
lore
#0 lore raw

cover fix build errors for Fedora 29

This series fixes openjdk-7 and openjdk-8 builds for Fedora 29. Setting Wno-error for compiler warnings is only a workaround and will be removed when we update openjdk/icedtea native to the latest versions again.

Richard Leitner (4):
cacao: update to latest staging tip 2d6f6c14daf9
README: rewrite build host dependencies
icedtea7-native: disable new compiler warnings
openjdk-8: disable stringop-overflow compiler errors

 README                                                    | 8 ++++----
 .../cacao-1.6.1-do-not-rely-on-absolute-paths.patch       | 0
 .../system-boehm-gc.patch                                 | 0
 .../cacao/{cacao_1.6.1.bb => cacao_2d6f6c14daf9.bb}       | 7 ++++---
 recipes-core/icedtea/icedtea7-native.inc                  | 3 +++
 recipes-core/openjdk/openjdk-8-release-172b11-common.inc  | 5 +++++
 6 files changed, 16 insertions(+), 7 deletions(-)
 rename recipes-core/cacao/{cacao-1.6.1 => cacao-2d6f6c14daf9}/cacao-1.6.1-do-not-rely-on-absolute-paths.patch (100%)
 rename recipes-core/cacao/{cacao-1.6.1 => cacao-2d6f6c14daf9}/system-boehm-gc.patch (100%)
 rename recipes-core/cacao/{cacao_1.6.1.bb => cacao_2d6f6c14daf9.bb} (89%)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/4 cacao: update to latest staging tip 2d6f6c14daf9

---
 .../cacao-1.6.1-do-not-rely-on-absolute-paths.patch        | 0
 .../system-boehm-gc.patch                                  | 0
 .../cacao/{cacao_1.6.1.bb => cacao_2d6f6c14daf9.bb}        | 7 ++++---
 3 files changed, 4 insertions(+), 3 deletions(-)
 rename recipes-core/cacao/{cacao-1.6.1 => cacao-2d6f6c14daf9}/cacao-1.6.1-do-not-rely-on-absolute-paths.patch (100%)
 rename recipes-core/cacao/{cacao-1.6.1 => cacao-2d6f6c14daf9}/system-boehm-gc.patch (100%)
 rename recipes-core/cacao/{cacao_1.6.1.bb => cacao_2d6f6c14daf9.bb} (89%)
recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch renamed from recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch +0 -0
similarity index 100%
rename from recipes-core/cacao/cacao-1.6.1/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
rename to recipes-core/cacao/cacao-2d6f6c14daf9/cacao-1.6.1-do-not-rely-on-absolute-paths.patch
recipes-core/cacao/cacao-2d6f6c14daf9/system-boehm-gc.patch renamed from recipes-core/cacao/cacao-1.6.1/system-boehm-gc.patch +0 -0
similarity index 100%
rename from recipes-core/cacao/cacao-1.6.1/system-boehm-gc.patch
rename to recipes-core/cacao/cacao-2d6f6c14daf9/system-boehm-gc.patch
recipes-core/cacao/cacao_2d6f6c14daf9.bb renamed from recipes-core/cacao/cacao_1.6.1.bb +4 -3
similarity index 89%
rename from recipes-core/cacao/cacao_1.6.1.bb
rename to recipes-core/cacao/cacao_2d6f6c14daf9.bb
index 1074ff5..91a03fc 100644
@@ -10,13 +10,14 @@ PROVIDES_class-native = "virtual/java-native"
 DEPENDS = "zlib libtool classpath virtual/javac-native bdwgc"
 RPROVIDES_${PN} = "java2-runtime"
 
-SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.xz \
+SRC_URI = "https://bitbucket.org/cacaovm/cacao-staging/get/${PV}.zip \
            file://system-boehm-gc.patch \
            file://cacao-1.6.1-do-not-rely-on-absolute-paths.patch \
 "
+S = "${WORKDIR}/cacaovm-cacao-staging-${PV}"
 
-SRC_URI[md5sum] = "2c18478404afd1cffdd15ad1e9d85a57"
-SRC_URI[sha256sum] = "eecc8bd1b528a028f43d9d1d0c06b97855bbf1d40e03826d911ebbc0b6971e12"
+SRC_URI[md5sum] = "5157d0bb9eb1332f7a6b6186eaac01aa"
+SRC_URI[sha256sum] = "34b51d660d69c2a83225fd75eab5e1fac002fb5974cb4a74b7478baf923a76cd"
 
 inherit java autotools-brokensep update-alternatives pkgconfig distro_features_check
 
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/4 README: rewrite build host dependencies

In reply to Richard Leitner

Create a list of dependencies for building meta-java and mention the c++14 std needed by the latest cacao revision.

---
 README | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
README +4 -4
index 7906324..743418c 100644
@@ -122,7 +122,7 @@ BBLAYERS ?= " \
   path_to_source/sources/meta-java \
   "
 
-Please note that libstdc++ static is needed on your host to compile icedtea7-native
-(install libstdc++-static on a Fedora).
-
-For debian-based distributions you need the libstdc++6-$compilerversion-dev package.
+Build host dependencies
+-----------------------
+ - gcc with c++14 support
+ - libstdc++ static
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/4 icedtea7-native: disable new compiler warnings

In reply to Richard Leitner

As new compilers throw new errors/warnings disable them for icedtea7-native as a quick workaround until we updated it to the latest version.

---
 recipes-core/icedtea/icedtea7-native.inc | 3 +++
 1 file changed, 3 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +3 -0
index 69f5d25..70b935a 100644
@@ -24,6 +24,9 @@ CFLAGS_append = " -fno-tree-dse"
 CXXFLAGS_append = " -fno-tree-dse"
 CXX_append = " -std=gnu++98"
 
+# WORKAROUND: ignore errors from new compilers
+CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
+
 inherit native java autotools pkgconfig
 inherit openjdk-build-helper
 
Signature · 1 line
2.20.1
#4 lore raw

Re: [meta-java][PATCH 3/4] icedtea7-native: disable new compiler warnings

Hi Richard,

I have following error while compiling icedtea7-native with gcc 8.3.0:

| g++ -std=gnu++98 -DLINUX -D_GNU_SOURCE -DAMD64 -I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/prims -I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm -I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/cpu/x86/vm -I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/os_cpu/linux_x86/vm -I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/os/linux/vm -I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/os/posix/vm -I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc -I../generated -DASSERT -isystem/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/recipe-sysroot-native/usr/include
-O2 -pipe -DHEADLESS=true -fno-tree-dse -Wno-error=stringop-overflow
-Wno-error=return-type -Wno-error=deprecated-declarations
-DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64
-DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64
-DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno-rtti -fno-exceptions
-D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -g
-DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64
-DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64
-DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno-rtti -fno-exceptions
-D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -g -Werror -g -c -o
../generated/adfiles/output_h.o /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_h.cpp | /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:
In member function ‘void ArchDesc::definePeephole(FILE*, InstructForm*)’:
| /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34:
error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and
12 [-Werror=format-overflow=]
| sprintf(left_reg_index,",inst%d_idx%d", left_index,
left_op_index);
| ^~~~~~~~~~~~~~~
| /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34:
note: directive argument in the range [-2147483648, 9999]
| In file included from /usr/include/stdio.h:862,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/adlc.hpp:33,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:27:
| /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:34: note:
‘__builtin___sprintf_chk’ output between 12 and 32 bytes into a destination
of size 18

|    return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|        __bos (__s), __fmt, __va_arg_pack ());
|        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|

/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1252:37:
error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and
12 [-Werror=format-overflow=]
| sprintf(right_reg_index,",inst%d_idx%d", right_index,
right_op_index);
| ^~~~~~~~~~~~~~~
| /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1252:37:
note: directive argument in the range [-2147483648, 9999]
| In file included from /usr/include/stdio.h:862,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/adlc.hpp:33,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:27:
| /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:34: note:
‘__builtin___sprintf_chk’ output between 12 and 32 bytes into a destination
of size 18

|    return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|        __bos (__s), __fmt, __va_arg_pack ());
|        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Shall we add -Wno-error= format-overflow to CFLAGS as well?

Best regards,
Vincent

Quoted 33 lines · Richard Leitner

As new compilers throw new errors/warnings disable them for icedtea7-native as a quick workaround until we updated it to the latest version.

---
 recipes-core/icedtea/icedtea7-native.inc | 3 +++
 1 file changed, 3 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +3 -1
index 69f5d25..70b935a 100644
@@ -24,6 +24,9 @@ CFLAGS_append = " -fno-tree-dse"
 CXXFLAGS_append = " -fno-tree-dse"
 CXX_append = " -std=gnu++98"
 
+# WORKAROUND: ignore errors from new compilers
+CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
+
 inherit native java autotools pkgconfig
 inherit openjdk-build-helper
 
--

2.20.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#5 lore raw

Re: [meta-java][PATCH 3/4] icedtea7-native: disable new compiler warnings

As openjdk8-fix-adlc-flags.patch adds:
+CXXFLAGS += $(BUILD_CXXFLAGS)
+CFLAGS += $(BUILD_CFLAGS)

I fixed my compilation problem with BUILD_CFLAGS_append = " -Wno-error=format-overflow"

Le mar. 1 oct. 2019 à 14:35, Vincent Prince <[email protected]> a écrit :

Quoted 116 lines

Hi Richard,

I have following error while compiling icedtea7-native with gcc 8.3.0:

| g++ -std=gnu++98 -DLINUX -D_GNU_SOURCE -DAMD64

(quoted diff) +0 -19
-I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/prims
-I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm
-I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/cpu/x86/vm
-I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/os_cpu/linux_x86/vm
-I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/os/linux/vm
-I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/os/posix/vm
-I/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc
-I../generated -DASSERT
-isystem/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/recipe-sysroot-native/usr/include
-O2 -pipe -DHEADLESS=true -fno-tree-dse -Wno-error=stringop-overflow
-Wno-error=return-type -Wno-error=deprecated-declarations
-DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64
-DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64
-DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions
-D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -g
-DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64
-DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64
-DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti -fno-exceptions
-D_REENTRANT -fcheck-new -fvisibility=hidden -m64 -pipe -g -Werror -g -c -o

../generated/adfiles/output_h.o /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_h.cpp | /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:
In member function ‘void ArchDesc::definePeephole(FILE*, InstructForm*)’:
| /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34:
error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and
12 [-Werror=format-overflow=]
| sprintf(left_reg_index,",inst%d_idx%d", left_index,
left_op_index);
| ^~~~~~~~~~~~~~~
| /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1239:34:
note: directive argument in the range [-2147483648, 9999]
| In file included from /usr/include/stdio.h:862,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/adlc.hpp:33,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:27:
| /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:34: note:
‘__builtin___sprintf_chk’ output between 12 and 32 bytes into a destination
of size 18

|    return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|        __bos (__s), __fmt, __va_arg_pack ());
|        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|

/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1252:37:
error: ‘_idx’ directive writing 4 bytes into a region of size between 2 and
12 [-Werror=format-overflow=]
| sprintf(right_reg_index,",inst%d_idx%d", right_index,
right_op_index);
| ^~~~~~~~~~~~~~~
| /build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:1252:37:
note: directive argument in the range [-2147483648, 9999]
| In file included from /usr/include/stdio.h:862,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/adlc.hpp:33,
| from
/build/tmp/work/x86_64-linux/icedtea7-native/2.1.3-r1.0/icedtea-2.1.3/build/openjdk-boot/hotspot/src/share/vm/adlc/output_c.cpp:27:
| /usr/include/x86_64-linux-gnu/bits/stdio2.h:33:34: note:
‘__builtin___sprintf_chk’ output between 12 and 32 bytes into a destination
of size 18

|    return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
|           ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|        __bos (__s), __fmt, __va_arg_pack ());
|        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Shall we add -Wno-error= format-overflow to CFLAGS as well?

Best regards,
Vincent

Quoted 33 lines · Richard Leitner

As new compilers throw new errors/warnings disable them for icedtea7-native as a quick workaround until we updated it to the latest version.

---
 recipes-core/icedtea/icedtea7-native.inc | 3 +++
 1 file changed, 3 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +3 -1
index 69f5d25..70b935a 100644
@@ -24,6 +24,9 @@ CFLAGS_append = " -fno-tree-dse"
 CXXFLAGS_append = " -fno-tree-dse"
 CXX_append = " -std=gnu++98"
 
+# WORKAROUND: ignore errors from new compilers
+CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
+
 inherit native java autotools pkgconfig
 inherit openjdk-build-helper
 
--

2.20.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#6 lore raw

PATCH 4/4 openjdk-8: disable stringop-overflow compiler errors

In reply to Richard Leitner

As new compilers generate this error we disable it for now as a WORKAROUND. This will be removed when openjdk-8 is updated to the latest version

---
 recipes-core/openjdk/openjdk-8-release-172b11-common.inc | 5 +++++
 1 file changed, 5 insertions(+)
recipes-core/openjdk/openjdk-8-release-172b11-common.inc +5 -0
index a8d3ccb..d4e80f6 100644
@@ -95,6 +95,11 @@ ARM_INSTRUCTION_SET_armv4t = "ARM"
 BUILD_CFLAGS_append = " -Wno-error=deprecated-declarations"
 TARGET_CFLAGS_append = " -Wno-error=deprecated-declarations"
 
+# WORKAROUND: disable the "specified bound depends on the length of the source argument"
+# compiler error until we update openjdk8 to a fixed version
+BUILD_CFLAGS_append = " -Wno-error=stringop-overflow"
+TARGET_CFLAGS_append = " -Wno-error=stringop-overflow"
+
 # Enable zero mode for arm based builds, as normal hotspot fails to build
 PACKAGECONFIG_append_armv4 = " zero"
 PACKAGECONFIG_append_armv5 = " zero"
Signature · 1 line
2.20.1