diff options
| author | Changqing Li <changqing.li@windriver.com> | 2024-11-22 14:57:33 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-03 11:42:35 +0000 |
| commit | f5a2ea77caf579125b8a1e01225e792e5f67fa76 (patch) | |
| tree | de0bf255aabd653497d93e50d65dc8ada6109a30 /meta | |
| parent | 2d10a8f522b5087ca1518b50ed93696d749b2b5f (diff) | |
| download | poky-f5a2ea77caf579125b8a1e01225e792e5f67fa76.tar.gz | |
automake: fix do_compile error when perl is under a very long path
Fixed:
bitbake automake-native failed with error:
| :; HELP2MAN_NAME="Generate Makefile.in files for configure from Makefile.am"; export HELP2MAN_NAME; LONGPATH/tmp/hosttools/mkdir -p doc && AUTOMAKE_HELP2MAN=true ./pre-inst-env LONGPATH/tmp/hosttools/perl ../automake-1.17/doc/help2man --output=doc/automake-1.17.1 --info-page=automake --name="${HELP2MAN_NAME}" bin/automake-1.17
| help2man: can't get `--help' info from bin/aclocal-1.17
| Try `--no-discard-stderr' if option outputs to stderr
| make: *** [Makefile:3818: doc/aclocal-1.17.1] Error 2
In above command, `bin/aclocal-1.17 --help` will be runned, since
@PERL@ is replaced as the full path of perl, it is possible that the
shebang line exceeds the max limit and causes above error, because the
kernel imposes a maximum length on the text that follows the "#!"
characters at the start of a script; characters beyond the limit are
ignored. Before Linux 5.1, the limit is 127 characters. Since Linux
5.1, the limit is 255 characters.
Add back the forced perl settings and add a patch for workaround the
fatal error caused by space in perl path
(From OE-Core rev: 0061f441501be923ddf326dcc5b3f25b59ac86d4)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-devtools/automake/automake/0001-configure-don-t-report-error-when-the-path-of-Perl-c.patch | 34 | ||||
| -rw-r--r-- | meta/recipes-devtools/automake/automake_1.17.bb | 8 |
2 files changed, 41 insertions, 1 deletions
diff --git a/meta/recipes-devtools/automake/automake/0001-configure-don-t-report-error-when-the-path-of-Perl-c.patch b/meta/recipes-devtools/automake/automake/0001-configure-don-t-report-error-when-the-path-of-Perl-c.patch new file mode 100644 index 0000000000..5a38feb16c --- /dev/null +++ b/meta/recipes-devtools/automake/automake/0001-configure-don-t-report-error-when-the-path-of-Perl-c.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From 4339a2298a2d486fb4636b72393499b59805edde Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Changqing Li <changqing.li@windriver.com> | ||
| 3 | Date: Thu, 21 Nov 2024 14:54:37 +0800 | ||
| 4 | Subject: [PATCH] configure: don't report error when the path of Perl contains | ||
| 5 | spaces or tabs | ||
| 6 | |||
| 7 | In order to make setting PERL to "/usr/bin/env perl" works well, patch | ||
| 8 | configure as upstream suggested, refer [1]. | ||
| 9 | |||
| 10 | [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74453 | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate [ oe-specific ] | ||
| 13 | |||
| 14 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 15 | --- | ||
| 16 | configure | 2 +- | ||
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/configure b/configure | ||
| 20 | index 45bf85a..68d3c7d 100755 | ||
| 21 | --- a/configure | ||
| 22 | +++ b/configure | ||
| 23 | @@ -3514,7 +3514,7 @@ case $PERL in | ||
| 24 | as_fn_error $? "perl not found" "$LINENO" 5 | ||
| 25 | ;; | ||
| 26 | *' '* | *' '*) | ||
| 27 | - as_fn_error $? "The path to your Perl contains spaces or tabs. | ||
| 28 | + : as_fn_error $? "The path to your Perl contains spaces or tabs. | ||
| 29 | This would cause build failures later or unusable programs. | ||
| 30 | Please use a path without spaces and try again." "$LINENO" 5 | ||
| 31 | ;; | ||
| 32 | -- | ||
| 33 | 2.25.1 | ||
| 34 | |||
diff --git a/meta/recipes-devtools/automake/automake_1.17.bb b/meta/recipes-devtools/automake/automake_1.17.bb index e22e51498b..1118aa4668 100644 --- a/meta/recipes-devtools/automake/automake_1.17.bb +++ b/meta/recipes-devtools/automake/automake_1.17.bb | |||
| @@ -24,13 +24,19 @@ SRC_URI += "\ | |||
| 24 | file://0003-build-fix-race-in-parallel-builds.patch \ | 24 | file://0003-build-fix-race-in-parallel-builds.patch \ |
| 25 | file://0004-Add-a-new-distro-feature-ptest.patch \ | 25 | file://0004-Add-a-new-distro-feature-ptest.patch \ |
| 26 | file://0006-automake-Remove-delays-in-configure-scripts-using-au.patch \ | 26 | file://0006-automake-Remove-delays-in-configure-scripts-using-au.patch \ |
| 27 | file://0001-configure-don-t-report-error-when-the-path-of-Perl-c.patch \ | ||
| 27 | " | 28 | " |
| 28 | 29 | ||
| 29 | SRC_URI[sha256sum] = "397767d4db3018dd4440825b60c64258b636eaf6bf99ac8b0897f06c89310acd" | 30 | SRC_URI[sha256sum] = "397767d4db3018dd4440825b60c64258b636eaf6bf99ac8b0897f06c89310acd" |
| 30 | 31 | ||
| 32 | PERL = "${USRBINPATH}/perl" | ||
| 33 | PERL:class-native = "${USRBINPATH}/env perl" | ||
| 34 | PERL:class-nativesdk = "${USRBINPATH}/env perl" | ||
| 35 | |||
| 36 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='${PERL}'" | ||
| 37 | |||
| 31 | do_install:append () { | 38 | do_install:append () { |
| 32 | install -d ${D}${datadir} | 39 | install -d ${D}${datadir} |
| 33 | sed -i -e 's@^#!.*perl$@#!/usr/bin/env perl@' ${D}/${bindir}/* | ||
| 34 | } | 40 | } |
| 35 | 41 | ||
| 36 | BBCLASSEXTEND = "native nativesdk" | 42 | BBCLASSEXTEND = "native nativesdk" |
