Message ID | 20240521151739.591124-1-ross.burton@arm.com |
---|---|
State | Accepted, archived |
Commit | a6e7c3ce700b82c57f1102187fea6b387339eca3 |
Headers | show |
Series | gawk: fix readline detection | expand |
Please include a link to the submission. Alex On Tue 21. May 2024 at 17.17, Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > The code fragment used to detect readline in cross builds doesn't compile > cleanly with GCC 14.1, so readline is never enabled. > > Add missing includes so the test works, and readline can be enabled. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > ...001-m4-readline-add-missing-includes.patch | 38 +++++++++++++++++++ > meta/recipes-extended/gawk/gawk_5.3.0.bb | 1 + > 2 files changed, 39 insertions(+) > create mode 100644 > meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch > > diff --git > a/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch > b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch > new file mode 100644 > index 00000000000..97edf1ccf8c > --- /dev/null > +++ > b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch > @@ -0,0 +1,38 @@ > +From 4f4e84f139e2a8682f1374a592f2636c43ad857b Mon Sep 17 00:00:00 2001 > +From: Ross Burton <ross.burton@arm.com> > +Date: Tue, 21 May 2024 15:10:11 +0000 > +Subject: [PATCH] m4/readline: add missing includes > + > +The cross-specific code fragment only includes stdio.h, where the native > +fragment also includes fcntl.h and unistd.h. This is important because > +GCC 14.1 has made the implicit definitions an error: > + > +conftest.c: In function 'main': > +conftest.c:144:9: error: implicit declaration of function 'close'; did > you mean 'pclose'? [-Wimplicit-function-declaration] > +conftest.c:146:14: error: implicit declaration of function 'open'; did > you mean 'popen'? [-Wimplicit-function-declaration] > + > +Add the missing includes so that the check doesn't always fail due to > +these errors. > + > +Upstream-Status: Submitted > +Signed-off-by: Ross Burton <ross.burton@arm.com> > +--- > + m4/readline.m4 | 2 ++ > + 1 file changed, 2 insertions(+) > + > +diff --git a/m4/readline.m4 b/m4/readline.m4 > +index 38f96326..efd52d4e 100644 > +--- a/m4/readline.m4 > ++++ b/m4/readline.m4 > +@@ -66,6 +66,8 @@ dnl action if false: > + dnl action if cross compiling: > + [AC_LINK_IFELSE( > + [AC_LANG_PROGRAM([[#include <stdio.h> > ++#include <fcntl.h> > ++#include <unistd.h> > + #include <readline/readline.h> > + #include <readline/history.h>]], dnl includes > + dnl function body > +-- > +2.34.1 > + > diff --git a/meta/recipes-extended/gawk/gawk_5.3.0.bb > b/meta/recipes-extended/gawk/gawk_5.3.0.bb > index d7a0fc616d3..e94cf19db48 100644 > --- a/meta/recipes-extended/gawk/gawk_5.3.0.bb > +++ b/meta/recipes-extended/gawk/gawk_5.3.0.bb > @@ -16,6 +16,7 @@ PACKAGECONFIG[readline] = > "--with-readline,--without-readline,readline" > PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" > > SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ > + file://0001-m4-readline-add-missing-includes.patch \ > file://run-ptest \ > " > > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#199648): > https://lists.openembedded.org/g/openembedded-core/message/199648 > Mute This Topic: https://lists.openembedded.org/mt/106225075/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
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/gawk-fix-readline-detection.patch FAIL: test Upstream-Status presence: Upstream-Status is Submitted, but it is not mentioned where (test_patch.TestPatch.test_upstream_status_presence_format) 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 author valid (test_mbox.TestMbox.test_author_valid) PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence) 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) 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) SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list) --- 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!
On Tue, May 21, 2024 at 8:17 AM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > The code fragment used to detect readline in cross builds doesn't compile > cleanly with GCC 14.1, so readline is never enabled. > > Add missing includes so the test works, and readline can be enabled. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > ...001-m4-readline-add-missing-includes.patch | 38 +++++++++++++++++++ > meta/recipes-extended/gawk/gawk_5.3.0.bb | 1 + > 2 files changed, 39 insertions(+) > create mode 100644 meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch > > diff --git a/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch > new file mode 100644 > index 00000000000..97edf1ccf8c > --- /dev/null > +++ b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch > @@ -0,0 +1,38 @@ > +From 4f4e84f139e2a8682f1374a592f2636c43ad857b Mon Sep 17 00:00:00 2001 > +From: Ross Burton <ross.burton@arm.com> > +Date: Tue, 21 May 2024 15:10:11 +0000 > +Subject: [PATCH] m4/readline: add missing includes > + > +The cross-specific code fragment only includes stdio.h, where the native > +fragment also includes fcntl.h and unistd.h. This is important because > +GCC 14.1 has made the implicit definitions an error: > + > +conftest.c: In function 'main': > +conftest.c:144:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration] > +conftest.c:146:14: error: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] > + This kinds of errors are something I worry about, where configure may silently decide to take another path for wrong or insufficient tests. I wonder if we have a way to cache and compare configure outcomes. > +Add the missing includes so that the check doesn't always fail due to > +these errors. > + > +Upstream-Status: Submitted > +Signed-off-by: Ross Burton <ross.burton@arm.com> > +--- > + m4/readline.m4 | 2 ++ > + 1 file changed, 2 insertions(+) > + > +diff --git a/m4/readline.m4 b/m4/readline.m4 > +index 38f96326..efd52d4e 100644 > +--- a/m4/readline.m4 > ++++ b/m4/readline.m4 > +@@ -66,6 +66,8 @@ dnl action if false: > + dnl action if cross compiling: > + [AC_LINK_IFELSE( > + [AC_LANG_PROGRAM([[#include <stdio.h> > ++#include <fcntl.h> > ++#include <unistd.h> > + #include <readline/readline.h> > + #include <readline/history.h>]], dnl includes > + dnl function body > +-- > +2.34.1 > + > diff --git a/meta/recipes-extended/gawk/gawk_5.3.0.bb b/meta/recipes-extended/gawk/gawk_5.3.0.bb > index d7a0fc616d3..e94cf19db48 100644 > --- a/meta/recipes-extended/gawk/gawk_5.3.0.bb > +++ b/meta/recipes-extended/gawk/gawk_5.3.0.bb > @@ -16,6 +16,7 @@ PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" > PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" > > SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ > + file://0001-m4-readline-add-missing-includes.patch \ > file://run-ptest \ > " > > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#199648): https://lists.openembedded.org/g/openembedded-core/message/199648 > Mute This Topic: https://lists.openembedded.org/mt/106225075/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 21 May 2024, at 22:55, Khem Raj <raj.khem@gmail.com> wrote: > This kinds of errors are something I worry about, where configure may > silently decide to take another path for wrong or > insufficient tests. I wonder if we have a way to cache and compare > configure outcomes. buildhistory-diff is the easy solution (and how I spotted this). Ross
diff --git a/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch new file mode 100644 index 00000000000..97edf1ccf8c --- /dev/null +++ b/meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch @@ -0,0 +1,38 @@ +From 4f4e84f139e2a8682f1374a592f2636c43ad857b Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@arm.com> +Date: Tue, 21 May 2024 15:10:11 +0000 +Subject: [PATCH] m4/readline: add missing includes + +The cross-specific code fragment only includes stdio.h, where the native +fragment also includes fcntl.h and unistd.h. This is important because +GCC 14.1 has made the implicit definitions an error: + +conftest.c: In function 'main': +conftest.c:144:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration] +conftest.c:146:14: error: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] + +Add the missing includes so that the check doesn't always fail due to +these errors. + +Upstream-Status: Submitted +Signed-off-by: Ross Burton <ross.burton@arm.com> +--- + m4/readline.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/m4/readline.m4 b/m4/readline.m4 +index 38f96326..efd52d4e 100644 +--- a/m4/readline.m4 ++++ b/m4/readline.m4 +@@ -66,6 +66,8 @@ dnl action if false: + dnl action if cross compiling: + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[#include <stdio.h> ++#include <fcntl.h> ++#include <unistd.h> + #include <readline/readline.h> + #include <readline/history.h>]], dnl includes + dnl function body +-- +2.34.1 + diff --git a/meta/recipes-extended/gawk/gawk_5.3.0.bb b/meta/recipes-extended/gawk/gawk_5.3.0.bb index d7a0fc616d3..e94cf19db48 100644 --- a/meta/recipes-extended/gawk/gawk_5.3.0.bb +++ b/meta/recipes-extended/gawk/gawk_5.3.0.bb @@ -16,6 +16,7 @@ PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ + file://0001-m4-readline-add-missing-includes.patch \ file://run-ptest \ "
The code fragment used to detect readline in cross builds doesn't compile cleanly with GCC 14.1, so readline is never enabled. Add missing includes so the test works, and readline can be enabled. Signed-off-by: Ross Burton <ross.burton@arm.com> --- ...001-m4-readline-add-missing-includes.patch | 38 +++++++++++++++++++ meta/recipes-extended/gawk/gawk_5.3.0.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-extended/gawk/gawk/0001-m4-readline-add-missing-includes.patch