readline: Fixed build with GCC-15
PATCH v4 1/9 readline: Fixed build with GCC-15
--- ...ages-that-are-not-compatible-with-C2.patch | 29 +++++++++++++++++++ meta/recipes-core/readline/readline_8.2.13.bb | 4 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/readline/readline/0001-Add-fix-for-packages-that-are-not-compatible-with-C2.patch
meta/recipes-core/readline/readline/0001-Add-fix-for-packages-that-are-not-compatible-with-C2.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 9459ee899a291c55f08341df63e9a1b9b7af200a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sun, 16 Mar 2025 12:48:46 -0700 +Subject: [PATCH] Add fix for packages that are not compatible with C23 + +Fixes builds with GCC-15 +Sourced from Fedora: https://src.fedoraproject.org/rpms/readline/c/c47eb813afb942128253213ad5b8221770557e48?branch=rawhide + +Help getting packages like bluez5 building + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-readline/2025-03/msg00001.html] +Signed-off-by: Khem Raj <[email protected]> +--- + rlstdc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rlstdc.h b/rlstdc.h +index 2aaa30b..a7a0ef3 100644 +--- a/rlstdc.h ++++ b/rlstdc.h +@@ -44,7 +44,7 @@ + + /* Moved from config.h.in because readline.h:rl_message depends on these + defines. */ +-#if defined (__STDC__) && defined (HAVE_STDARG_H) ++#if defined (__STDC__) + # define PREFER_STDARG + # define USE_VARARGS + #else
meta/recipes-core/readline/readline_8.2.13.bb +3 -1
@@ -1,5 +1,7 @@ require readline.inc -SRC_URI += " file://norpath.patch" +SRC_URI += "file://norpath.patch \ + file://0001-Add-fix-for-packages-that-are-not-compatible-with-C2.patch \ + " SRC_URI[archive.sha256sum] = "0e5be4d2937e8bd9b7cd60d46721ce79f88a33415dd68c2d738fb5924638f656"
PATCH v4 2/9 dbus-glib: Fix build with GCC 15
GCC 15 defaults to C23, it can not handle it
latest release is from 2021, and this seems to be
deprecated upstream and no longer actively
developed.
--- meta/recipes-core/dbus/dbus-glib_0.114.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-core/dbus/dbus-glib_0.114.bb +2 -0
@@ -30,6 +30,8 @@ PACKAGECONFIG[tests] = "--enable-tests,,," EXTRA_OECONF:class-target = "--with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool" +CFLAGS += "-std=gnu17" + PACKAGES += "${PN}-tests" FILES:${PN} = "${libdir}/lib*${SOLIBS}"
Re: [OE-core] [PATCH v4 2/9] dbus-glib: Fix build with GCC 15
Quoted 4 lines · Khem Raj via lists.openembedded.org
GCC 15 defaults to C23, it can not handle it
latest release is from 2021, and this seems to be
deprecated upstream and no longer actively
developed.
This isn't true with 0.114 which was recently released.
Was it confirmed we still need this with 0.114?
Cheers,
Richard
Re: [OE-core] [PATCH v4 2/9] dbus-glib: Fix build with GCC 15
Quoted 10 lines · Richard Purdie
Quoted 4 lines · Khem Raj via lists.openembedded.org
GCC 15 defaults to C23, it can not handle it
latest release is from 2021, and this seems to be
deprecated upstream and no longer actively
developed.This isn't true with 0.114 which was recently released.
Was it confirmed we still need this with 0.114?
No, we do not need this patch with 0.114, you can drop it from the series.
Quoted 5 lines
Cheers,
Richard
PATCH v4 3/9 ppp: Fix build when shadow is enabled
In reply to Khem RajGCC-15 patch is not sufficient when shadow is enabled, therefore fix the remaining issues.
--- ...d-session-Fixed-building-with-GCC-15.patch | 33 +++++++++++++++++++ meta/recipes-connectivity/ppp/ppp_2.5.2.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/recipes-connectivity/ppp/ppp/0001-pppd-session-Fixed-building-with-GCC-15.patch
meta/recipes-connectivity/ppp/ppp/0001-pppd-session-Fixed-building-with-GCC-15.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 5edcb01f1d8d521c819d45df1f1bb87697252130 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 17 Mar 2025 14:38:26 -0700 +Subject: [PATCH] pppd/session: Fixed building with GCC 15 + +Fixed building with GCC 15 which defaults to C23 +and find conflicting declration of getspnam() here +with the one provided by shadow.h (extern struct spwd *getspnam (const char *__name);) + +Fixes +../../ppp-2.5.2/pppd/session.c: In function 'session_start': +../../ppp-2.5.2/pppd/session.c:185:18: error: conflicting types for 'getspnam'; have 'struct spwd *(void)' + 185 | struct spwd *getspnam(); + | ^~~~~~~~ + +Upstream-Status: Submitted [https://github.com/ppp-project/ppp/pull/553] +Signed-off-by: Khem Raj <[email protected]> +--- + pppd/session.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/pppd/session.c b/pppd/session.c +index f08d8e1..9cc7538 100644 +--- a/pppd/session.c ++++ b/pppd/session.c +@@ -182,7 +182,6 @@ session_start(const int flags, const char *user, const char *passwd, const char + char *cbuf; + #ifdef HAVE_SHADOW_H + struct spwd *spwd; +- struct spwd *getspnam(); + long now = 0; + #endif /* #ifdef HAVE_SHADOW_H */ + #endif /* #ifdef PPP_WITH_PAM */
meta/recipes-connectivity/ppp/ppp_2.5.2.bb +1 -0
@@ -25,6 +25,7 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ file://[email protected] \ file://0001-pppdump-Fixed-building-with-GCC-15-548.patch \ file://0001-pppd-pppdconf.h-remove-erroneous-generated-header.patch \ + file://0001-pppd-session-Fixed-building-with-GCC-15.patch \ " SRC_URI[sha256sum] = "47da358de54a10cb10bf6ff2cf9b1c03c0d3555518f6182e8f701b8e55733cb2"
PATCH v4 4/9 unzip: Fix build with GCC-15
In reply to Khem RajAdd a patch to remove redundant declarations
--- meta/recipes-extended/unzip/unzip/gcc15.patch | 17 +++++++++++++++++ meta/recipes-extended/unzip/unzip_6.0.bb | 1 + 2 files changed, 18 insertions(+) create mode 100644 meta/recipes-extended/unzip/unzip/gcc15.patch
meta/recipes-extended/unzip/unzip/gcc15.patch new file +17 -0
@@ -0,0 +1,17 @@ +Do not redefine gmtime(), localtime() + +They are already provided by system time.h header + +Upstream-Status: Inactive-Upstream [need a new release] + +Sign-off-by: Khem Raj <[email protected]> +--- a/unix/unxcfg.h ++++ b/unix/unxcfg.h +@@ -117,7 +117,6 @@ typedef struct stat z_stat; + # endif + #else + # include <time.h> +- struct tm *gmtime(), *localtime(); + #endif + + #if (defined(BSD4_4) || (defined(SYSV) && defined(MODERN)))
meta/recipes-extended/unzip/unzip_6.0.bb +1 -0
@@ -32,6 +32,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/ file://CVE-2022-0530.patch \ file://0001-configure-Add-correct-system-headers-and-prototypes-.patch \ file://0001-unix-configure-fix-detection-for-cross-compilation.patch \ + file://gcc15.patch \ " UPSTREAM_VERSION_UNKNOWN = "1"
Patchtest results for [PATCH v4 4/9] unzip: Fix build with GCC-15
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/v4-4-9-unzip-Fix-build-with-GCC-15.patch
FAIL: test Signed-off-by presence: A patch file has been added without a Signed-off-by tag: 'gcc15.patch' (test_patch.TestPatch.test_signed_off_by_presence)
PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
PATCH v4 5/9 time: Fix build with GCC 15
In reply to Khem RajInitialize interrupt_signal and quit_signal with correct type
--- .../time-1.9-Fix-compiling-with-GCC15.patch | 33 +++++++++++++++++++ meta/recipes-extended/time/time_1.9.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/recipes-extended/time/time/time-1.9-Fix-compiling-with-GCC15.patch
meta/recipes-extended/time/time/time-1.9-Fix-compiling-with-GCC15.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 831194f0be7733c99c7a2c69d9e9695b82e05010 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= <[email protected]> +Date: Thu, 30 Jan 2025 08:48:47 +0100 +Subject: [PATCH] time: fix compiling with GCC15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC15 complains about incompatible pointer type in run_command() +Initialize interrupt_signal and quit_signal with correct type + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-time/2025-01/msg00000.html] +Signed-off-by: Ondřej Pohořelský <[email protected]> +--- + src/time.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/time.c b/src/time.c +index 7b401bc..c8d7ab0 100644 +--- a/src/time.c ++++ b/src/time.c +@@ -803,7 +803,7 @@ run_command (cmd, resp) + RESUSE *resp; + { + pid_t pid; /* Pid of child. */ +- sighandler interrupt_signal, quit_signal; ++ __sighandler_t interrupt_signal, quit_signal; + int saved_errno; + + resuse_start (resp); +-- +2.48.1 +
meta/recipes-extended/time/time_1.9.bb +1 -0
@@ -15,6 +15,7 @@ BBCLASSEXTEND = "native nativesdk" SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \ file://0001-include-string.h-for-memset.patch \ + file://time-1.9-Fix-compiling-with-GCC15.patch \ " SRC_URI[md5sum] = "d2356e0fe1c0b85285d83c6b2ad51b5f"
PATCH v4 6/9 time: Fix build with musl
In reply to Khem Raj--- .../0001-Fix-the-type-for-sighandler_t.patch | 27 +++++++++++++++++++ meta/recipes-extended/time/time_1.9.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch
meta/recipes-extended/time/time/0001-Fix-the-type-for-sighandler_t.patch new file +27 -0
@@ -0,0 +1,27 @@ +From cfef684e2c2c93c4a871d6c2a7af8f4c1b7c6741 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 18 Mar 2025 09:29:58 -0700 +Subject: [PATCH] Fix the type for sighandler_t + +__sighandler_t is private interface in glibc so its +better to not use it, as an aside fixes build with musl + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/bug-time/2025-03/msg00000.html] +Signed-off-by: Khem Raj <[email protected]> +--- + src/time.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/time.c b/src/time.c +index 7ff29a4..82eb66a 100644 +--- a/src/time.c ++++ b/src/time.c +@@ -728,7 +728,7 @@ run_command (cmd, resp) + RESUSE *resp; + { + pid_t pid; /* Pid of child. */ +- __sighandler_t interrupt_signal, quit_signal; ++ sighandler_t interrupt_signal, quit_signal; + int saved_errno; + + resuse_start (resp);
meta/recipes-extended/time/time_1.9.bb +1 -0
@@ -16,6 +16,7 @@ BBCLASSEXTEND = "native nativesdk" SRC_URI = "${GNU_MIRROR}/time/time-${PV}.tar.gz \ file://0001-include-string.h-for-memset.patch \ file://time-1.9-Fix-compiling-with-GCC15.patch \ + file://0001-Fix-the-type-for-sighandler_t.patch \ " SRC_URI[md5sum] = "d2356e0fe1c0b85285d83c6b2ad51b5f"
Patchtest results for [PATCH v4 6/9] time: Fix build with musl
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/v4-6-9-time-Fix-build-with-musl.patch
FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)
PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
PATCH v4 7/9 oeqa: Build cpio with C17 std
In reply to Khem Rajcpio is not yet buildable with C23 standard which is default with GCC 15, therefore ensure to apply needed bandage to keep it compiling in C17 mode even with GCC 15
--- meta/lib/oeqa/runtime/cases/buildcpio.py | 4 ++-- meta/lib/oeqa/sdk/cases/autotools.py | 4 ++-- meta/lib/oeqa/selftest/cases/meta_ide.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
meta/lib/oeqa/runtime/cases/buildcpio.py +2 -2
@@ -29,6 +29,6 @@ class BuildCpioTest(OERuntimeTestCase): @OEHasPackage(['autoconf']) def test_cpio(self): self.project.download_archive() - self.project.run_configure() - self.project.run_make() + self.project.run_configure(configure_args="CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration'") + self.project.run_make(make_args="CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration'") self.project.run_install()
meta/lib/oeqa/sdk/cases/autotools.py +2 -2
@@ -35,8 +35,8 @@ class AutotoolsTest(OESDKTestCase): self.assertTrue(os.path.isdir(dirs["source"])) os.makedirs(dirs["build"]) - self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs)) - self._run("cd {build} && make -j".format(**dirs)) + self._run("cd {build} && {source}/configure CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' $CONFIGURE_FLAGS".format(**dirs)) + self._run("cd {build} && make CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration' -j".format(**dirs)) self._run("cd {build} && make install DESTDIR={install}".format(**dirs)) self.check_elf(os.path.join(dirs["install"], "usr", "local", "bin", "cpio"))
meta/lib/oeqa/selftest/cases/meta_ide.py +2 -2
@@ -47,9 +47,9 @@ class MetaIDE(OESelftestTestCase): "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz", self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir) self.project.download_archive() - self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS'), 0, + self.assertEqual(self.project.run_configure('CFLAGS="-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration" $CONFIGURE_FLAGS'), 0, msg="Running configure failed") - self.assertEqual(self.project.run_make(), 0, + self.assertEqual(self.project.run_make(make_args="CFLAGS='-std=gnu17 -Dbool=int -Dtrue=1 -Dfalse=0 -Wno-error=implicit-function-declaration'"), 0, msg="Running make failed") self.assertEqual(self.project.run_install(), 0, msg="Running make install failed")
PATCH v4 8/9 man-db: Add missing rdep for col utility
In reply to Khem Rajman utility calls col utility internally when formatting is asked for therefore it expects col to be in rootfs otherwise silently errors with retcode 3 meaning 'file not found' in this case its due to col not being found, other distros eg. gets this via bsdextrautils dependency
libssh2 ptest mansyntax.sh fails due to this error, which now works
--- meta/recipes-extended/man-db/man-db_2.13.0.bb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-extended/man-db/man-db_2.13.0.bb +6 -1
@@ -13,8 +13,9 @@ SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ " SRC_URI[sha256sum] = "82f0739f4f61aab5eb937d234de3b014e777b5538a28cbd31433c45ae09aefb9" -DEPENDS = "libpipeline gdbm groff-native base-passwd" +DEPENDS = "libpipeline gdbm groff-native base-passwd zlib" RDEPENDS:${PN} += "base-passwd" +RDEPENDS:${PN}:append:libc-glibc = " util-linux-col" PACKAGE_WRITE_DEPS += "base-passwd" # | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr'
@@ -23,6 +24,10 @@ USE_NLS:libc-musl = "no" inherit gettext pkgconfig autotools systemd EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}" + +# util-linux col is deprecated and only builds for glibc +EXTRA_OECONF:append:libc-musl = " --with-col=''" + EXTRA_AUTORECONF += "-I ${S}/gl/m4" PACKAGECONFIG[bzip2] = "--with-bzip2=bzip2,ac_cv_prog_have_bzip2='',bzip2"
Re: [OE-core] [PATCH v4 8/9] man-db: Add missing rdep for col utility
meta/recipes-extended/man-db/man-db_2.13.0.bb SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ · line 16
Quoted 2 lines · Khem Raj via lists.openembedded.org
meta/recipes-extended/man-db/man-db_2.13.0.bb +1
-1-DEPENDS = "libpipeline gdbm groff-native base-passwd" +DEPENDS = "libpipeline gdbm groff-native base-passwd zlib"
Wrong commit ;)
meta/recipes-extended/man-db/man-db_2.13.0.bb USE_NLS:libc-musl = "no" · line 30
Quoted 13 lines
RDEPENDS:${PN} += "base-passwd" +RDEPENDS:${PN}:append:libc-glibc = " util-linux-col"
PACKAGE_WRITE_DEPS+= "base-passwd"# |
/usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr'(quoted diff) +0
-0@@ -23,6 +24,10 @@ USE_NLS:libc-musl = "no"inherit gettext pkgconfig autotools systemd
EXTRA_OECONF= "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}"meta/recipes-extended/man-db/man-db_2.13.0.bb +4
-0+ +# util-linux col is deprecated and only builds for glibc +EXTRA_OECONF:append:libc-musl = " --with-col=''" +
Feels like this could be neater as a PACKAGECONFIG.
PACKAGECONFIG ??= “col”
# util-linux col is deprecated and only builds for glibc PACKAGECONFIG:remove:libc-musl = “col" PACKAGECONFIG[col] = “—with-col,—without-col,,util-linux-col”
Ross
PATCH v4 9/9 man-db: Fix musl build with NLS
In reply to Khem Raj_nl_msg_cat_cntr is not defined in libintl on musl systems therefore add configure time check for it and use it to guard the use of _nl_msg_cat_cntr
Add missing dependency on zlib
--- ...ck-for-_nl_msg_cat_cntr-in-configure.patch | 61 +++++++++++++++++++ meta/recipes-extended/man-db/man-db_2.13.0.bb | 4 +- 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-extended/man-db/files/0001-check-for-_nl_msg_cat_cntr-in-configure.patch
meta/recipes-extended/man-db/files/0001-check-for-_nl_msg_cat_cntr-in-configure.patch new file +61 -0
@@ -0,0 +1,61 @@ +From ea00e32a87cc733dd5aa05cef407a5bee3e6db29 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 18 Mar 2025 22:42:45 -0700 +Subject: [PATCH] check for _nl_msg_cat_cntr in configure + +_nl_msg_cat_cntr is not available in all implementations e.g. musl libintl +does not have it, therefore add a check to detect it and use it only if +it is found. + +Upstream-Status: Submitted [https://gitlab.com/man-db/man-db/-/merge_requests/13] +Signed-off-by: Khem Raj <[email protected]> +--- + configure.ac | 9 +++++++++ + include/manconfig.h | 6 ++++-- + 2 files changed, 13 insertions(+), 2 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -404,6 +404,15 @@ AC_TYPE_PID_T + AC_TYPE_UID_T + AC_TYPE_SIZE_T + ++dnl _nl_msg_cat_cntr is required for GNU gettext ++AC_MSG_CHECKING([for _nl_msg_cat_cntr]) ++AC_LINK_IFELSE([AC_LANG_PROGRAM( ++ [[#include <libintl.h> ++ extern int _nl_msg_cat_cntr;]], ++ [[++_nl_msg_cat_cntr;]])], ++ AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_NL_MSG_CAT_CNTR], [], [_nl_msg_cat_cntr from GNU Gettext]), ++ AC_MSG_RESULT([no])) ++ + # Check for pipeline library. + PKG_CHECK_MODULES([libpipeline], [libpipeline >= 1.5.0]) + +--- a/include/manconfig.h ++++ b/include/manconfig.h +@@ -24,6 +24,8 @@ + #ifndef MANCONFIG_H + #define MANCONFIG_H + ++#include "config.h" ++ + /* STD_SECTIONS must contain all of your man hierarchy subdirectories. The + order is important. Manual pages will be displayed in this order. Ie + if "1" comes before "2", then a kill(1) will be displayed in preference to +@@ -138,13 +140,13 @@ + #define UNLIKELY(cond) __builtin_expect ((cond), 0) + + /* GNU gettext needs to know when the locale changes. This macro tells it. */ +-#ifdef ENABLE_NLS ++#ifdef HAVE_NL_MSG_CAT_CNTR + extern int _nl_msg_cat_cntr; + # define locale_changed() \ + do { \ + ++_nl_msg_cat_cntr; \ + } while (0) +-#else /* !ENABLE_NLS */ ++#else /* !HAVE_NL_MSG_CAT_CNTR */ + # define locale_changed() + #endif /* ENABLE_NLS */ +
meta/recipes-extended/man-db/man-db_2.13.0.bb +1 -3
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/man-db/man-db-${PV}.tar.xz \ file://flex.patch \ + file://0001-check-for-_nl_msg_cat_cntr-in-configure.patch \ file://99_mandb \ " SRC_URI[sha256sum] = "82f0739f4f61aab5eb937d234de3b014e777b5538a28cbd31433c45ae09aefb9"
@@ -18,9 +19,6 @@ RDEPENDS:${PN} += "base-passwd" RDEPENDS:${PN}:append:libc-glibc = " util-linux-col" PACKAGE_WRITE_DEPS += "base-passwd" -# | /usr/src/debug/man-db/2.8.0-r0/man-db-2.8.0/src/whatis.c:939: undefined reference to `_nl_msg_cat_cntr' -USE_NLS:libc-musl = "no" - inherit gettext pkgconfig autotools systemd EXTRA_OECONF = "--with-pager=less --with-systemdsystemunitdir=${systemd_system_unitdir}"
Re: [OE-core] [PATCH v4 9/9] man-db: Fix musl build with NLS
Quoted 1 line · Khem Raj via lists.openembedded.org
Add missing dependency on zlib
In your rebasing/committing this got separated from the actual change which is in the commit before.
Can you split the zlib change out from the musl change, and explain why the build worked without zlib or what is improved with it?
Ross
Patchtest results for [PATCH v4 1/9] readline: Fixed build with GCC-15
In reply to Khem RajThank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/v4-1-9-readline-Fixed-build-with-GCC-15.patch
FAIL: test commit message presence: Please include a commit message on your patch explaining the change (test_mbox.TestMbox.test_commit_message_presence)
PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!