From 8bf79fc2002bb83c6439d25bb63e4206894c2d10 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Fri, 28 Oct 2022 18:16:34 +0200 Subject: [PATCH 1/8] conf: layer: add free(1) to HOSTTOOLS_NONFATAL for icedtea7-native icedtea7-native build uses free -m (from the procfs suite of tools) to determine memory bound during compile. This always fails for us, because free is not passed through from the host environment. This results in a few warnings in the logs: /bin/sh: line 1: free: command not found [..snip..]/Sanity-Settings.gmk:195: WARNING: MB_OF_MEMORY should not be empty [Sanity-Settings.gmk] But otherwise this is handled gracefully. Problems arise when building icedtea7-native on hosts with more modest RAM sizes: Build process will consume so much RAM that the OOM killer is invoked. Let us avoid this by passing through free from the host environment. We use HOSTTOOLS_NONFATAL instead of HOSTTOOLS as to not break currently working setups that have enough RAM but lack free(1). This needs to be done globally due to the way HOSTTOOLS_NONFATAL is evaluated, we thus stick it into the layer.conf. Signed-off-by: Ahmad Fatoum Signed-off-by: Richard Leitner (cherry picked from commit 79df369e89ed72ebdfe84a4a520ed590751ae5d9) --- conf/layer.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/layer.conf b/conf/layer.conf index 2e2ce167..bd8f5aeb 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -12,6 +12,8 @@ LAYERDEPENDS_meta-java += "openembedded-layer" LICENSE_PATH += "${LAYERDIR}/licenses" +HOSTTOOLS_NONFATAL += "free" + SIGGEN_EXCLUDERECIPES_ABISAFE += "\ ca-certificates-java \ " From 87dd00a5b17ab020ee3415556a17c4451092c7fd Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Thu, 1 Jun 2023 09:07:04 -0700 Subject: [PATCH 2/8] xerces-j: update SRC_URI The archive URL has changed slightly, add missing /source/. https://archive.apache.org/dist/xerces/j/source/ Signed-off-by: Tim Orling --- recipes-core/xerces-j/xerces-j_2.11.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/xerces-j/xerces-j_2.11.0.bb b/recipes-core/xerces-j/xerces-j_2.11.0.bb index 159fc9c9..dcdd510e 100644 --- a/recipes-core/xerces-j/xerces-j_2.11.0.bb +++ b/recipes-core/xerces-j/xerces-j_2.11.0.bb @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = " \ file://LICENSE.serializer.txt;md5=d229da563da18fe5d58cd95a6467d584 \ " -SRC_URI = "http://archive.apache.org/dist/xerces/j/Xerces-J-src.${PV}.tar.gz" +SRC_URI = "http://archive.apache.org/dist/xerces/j/source/Xerces-J-src.${PV}.tar.gz" # CVE only applies to some Oracle Java SE and Red Hat Enterprise Linux versions. # Already fixed with updates and closed. From 6cf1a3e210631fd3c5814cacb9daa5ec8b23983d Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Wed, 17 May 2023 09:31:17 -0500 Subject: [PATCH 3/8] Update rhino download link (cherry picked from commit e2e9adb228447f52008b98a80a787cf637d968be) --- recipes-core/rhino/rhino_1.7r4.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-core/rhino/rhino_1.7r4.bb b/recipes-core/rhino/rhino_1.7r4.bb index 54329c19..bb172a5d 100644 --- a/recipes-core/rhino/rhino_1.7r4.bb +++ b/recipes-core/rhino/rhino_1.7r4.bb @@ -11,12 +11,12 @@ PACKAGE_ARCH = "${TUNE_PKGARCH}" inherit java-library SRC_URI = "\ - https://github.com/downloads/mozilla/rhino/rhino1_7R4.zip \ + https://github.com/mozilla/rhino/archive/refs/tags/Rhino1_7R4_RELEASE.zip \ file://rhino \ file://rhino-jsc \ " -S = "${WORKDIR}/rhino1_7R4" +S = "${WORKDIR}/rhino-Rhino1_7R4_RELEASE" PACKAGES = "${JPN} rhino" @@ -46,5 +46,5 @@ do_install:append() { install -m 0755 ${WORKDIR}/rhino-jsc ${D}${bindir} } -SRC_URI[md5sum] = "ad67a3dff135e3a70f0c3528a2d6edf2" -SRC_URI[sha256sum] = "9eb08f85bbe7c8e0b9eaffb1cf4984b31fb679f3c8a682acc3bb8ac20626c61e" +SRC_URI[md5sum] = "1f893577269631703d31e4de9d5dc1f4" +SRC_URI[sha256sum] = "860965fc611764745b3a4fc5bd4baac07356a9fedd2ce6642e7bb0bd7ef58d07" From cb488b8dcb8db1f3d3d00bb25bd5b269fd7af833 Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Wed, 17 May 2023 15:09:33 -0500 Subject: [PATCH 4/8] Switch to use git SRCREV (cherry picked from commit 7fcb6fdace27e25551f84ef4fe730b712a4a5fd0) --- recipes-core/rhino/rhino_1.7r4.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-core/rhino/rhino_1.7r4.bb b/recipes-core/rhino/rhino_1.7r4.bb index bb172a5d..9a580d5c 100644 --- a/recipes-core/rhino/rhino_1.7r4.bb +++ b/recipes-core/rhino/rhino_1.7r4.bb @@ -10,13 +10,14 @@ PACKAGE_ARCH = "${TUNE_PKGARCH}" inherit java-library +SRCREV = "82ffb8f3e09e77e3b1f5782c35b621e7ca742b58" SRC_URI = "\ - https://github.com/mozilla/rhino/archive/refs/tags/Rhino1_7R4_RELEASE.zip \ + git://github.com/mozilla/rhino;protocol=https;branch=master \ file://rhino \ file://rhino-jsc \ " -S = "${WORKDIR}/rhino-Rhino1_7R4_RELEASE" +S = "${WORKDIR}/git" PACKAGES = "${JPN} rhino" From 68e8fdef3af52d36a3b016cea9f7a5eb0d0bdc39 Mon Sep 17 00:00:00 2001 From: Cameron Miller Date: Wed, 17 May 2023 15:29:43 -0500 Subject: [PATCH 5/8] Remove checksum (cherry picked from commit 37f14a397aa553d50ea450eaa614b5760e5d56d9) --- recipes-core/rhino/rhino_1.7r4.bb | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes-core/rhino/rhino_1.7r4.bb b/recipes-core/rhino/rhino_1.7r4.bb index 9a580d5c..d645e8a9 100644 --- a/recipes-core/rhino/rhino_1.7r4.bb +++ b/recipes-core/rhino/rhino_1.7r4.bb @@ -46,6 +46,3 @@ do_install:append() { install -m 0755 ${WORKDIR}/rhino ${D}${bindir} install -m 0755 ${WORKDIR}/rhino-jsc ${D}${bindir} } - -SRC_URI[md5sum] = "1f893577269631703d31e4de9d5dc1f4" -SRC_URI[sha256sum] = "860965fc611764745b3a4fc5bd4baac07356a9fedd2ce6642e7bb0bd7ef58d07" From 62d8dde486dd1a292fd65aae32e182d8e4493d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= Date: Tue, 22 Mar 2022 06:17:40 +0100 Subject: [PATCH 6/8] classpath: inherit pkgconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It fixes this error: | checking for pkg-config... no | *** The pkg-config script could not be found. Make sure it is | *** in your path, or set the PKG_CONFIG environment variable | *** to the full path to pkg-config. | *** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config. | configure: error: Library requirements (gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them. | NOTE: The following config.log files may provide further information. | NOTE: .../work/core2-64-oe-linux/classpath/0.99-r3/build/config.log | ERROR: configure failed Signed-off-by: Zoltán Böszörményi Signed-off-by: Richard Leitner --- recipes-core/classpath/classpath.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/classpath/classpath.inc b/recipes-core/classpath/classpath.inc index 42c5daf4..35e7db3f 100644 --- a/recipes-core/classpath/classpath.inc +++ b/recipes-core/classpath/classpath.inc @@ -7,7 +7,7 @@ LICENSE = "GPL-2.0 & SAX-PD" PBN = "classpath" -inherit autotools java gettext +inherit autotools pkgconfig java gettext DEPENDS = "virtual/javac-native fastjar-native zip-native gmp antlr-native gtk+ gconf libxtst file" From 2926885ebb4c3780789918e0d2ce5ee42cf115a5 Mon Sep 17 00:00:00 2001 From: Evgeny Sagatov Date: Fri, 2 Feb 2024 16:01:24 +0300 Subject: [PATCH 7/8] Add compatability with GCC 12.x Fixes build for kas 4.2 and Yocto Project 4.3.2 Signed-off-by: Evgeny Sagatov Backport from 8c0c9f13cb89008f080fded0ca435f388e97bd7b Signed-off-by: Tim Orling --- recipes-core/icedtea/icedtea7-native.inc | 5 ++--- recipes-core/openjdk/openjdk-7-common.inc | 3 +++ recipes-core/openjdk/openjdk-8-common.inc | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index 0f317bb8..d6f8fd75 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc @@ -21,9 +21,8 @@ CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', ' -DHEADLESS=t # Disable dead store elimination and set C++ standard to C++98. # There are dead stores in the JVM that would be pretty hard to # remove, so disable the optimisation in the compiler. -CFLAGS:append = " -fno-tree-dse" -CXXFLAGS:append = " -fno-tree-dse" -CXX:append = " -std=gnu++98" +CFLAGS:append = " -std=gnu++98 -fno-tree-dse -fno-tree-vectorize" +CXXFLAGS:append = " -std=gnu++98 -fno-tree-dse" # WORKAROUND: ignore errors from new compilers CFLAGS:append = " -Wno-error=stringop-overflow -Wno-error=return-type" diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc index 04352331..cba1ea63 100644 --- a/recipes-core/openjdk/openjdk-7-common.inc +++ b/recipes-core/openjdk/openjdk-7-common.inc @@ -459,3 +459,6 @@ ALTERNATIVE_LINK_NAME[javac] = "${bindir}/javac" ALTERNATIVE_LINK_NAME[keytool] = "${bindir}/keytool" ALTERNATIVE_PRIORITY = "50" + +# canon-prefix-map doesn't exist in gcc 12.x +DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc index 16e3816f..82bf31e0 100644 --- a/recipes-core/openjdk/openjdk-8-common.inc +++ b/recipes-core/openjdk/openjdk-8-common.inc @@ -194,3 +194,6 @@ BUILD_CXXFLAGS:append = " ${GLOBAL_FLAGS}" # flags for -cross TARGET_CFLAGS:append = " ${GLOBAL_FLAGS}" TARGET_CXXFLAGS:append = " ${GLOBAL_FLAGS}" + +# canon-prefix-map doesn't exist in gcc 12.x +DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" From e95c19da9b484ec6973a34c3ad6a8463f2e13d66 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Sat, 6 Apr 2024 17:12:15 -0700 Subject: [PATCH 8/8] README: move to yocto-patches mailing list Since the definitive, canonical repository remains https://git.yoctoproject.org/meta-java the official mailing list should remain in the yoctoproject.org domain. Move to the new yocto-patches@lists.yoctoproject.org. Signed-off-by: Tim Orling --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index cd986170..6afd54a3 100644 --- a/README +++ b/README @@ -113,7 +113,7 @@ Known Limitations/Bugs +--------+-----------------+-----------------+-----------------+ If you encounter any other problems or bugs please report them to our mailing -list at openembedded-devel@lists.openembedded.org. +list at yocto-patches@lists.yoctoproject.org. Usage instructions ------------------