[OE-core] [PATCH v3 1/2] autoconf: Adjust shebang lines to remove interpreter path hardcode

Richard Purdie richard.purdie at linuxfoundation.org
Thu Mar 30 16:44:04 UTC 2017


On Tue, 2017-03-28 at 19:25 +0000, Serhii Popovych wrote:
> If build host perl (and other tools) is old and we use some kind
> of toolchain to provide recent perl/python/etc to the OE build
> we still locked to use build host perl due to hardcoded shebang
> lines in autoconf scripts.
> 
> Behaviour was observed with Enterprise Linux 6 and devtoolset
> toolchain from SCL (Software Collections) used to provide recent
> version of perl (not provided with default buildtools-tarball).
> 
> Pass /usr/bin/env perl in ac_cv_path_PERL configuration variables
> for class-native and class-nativesdk. Use patch to autoconf to
> replace
> -w option in shebang line with modern way to enable warnings on perl
> (i.e. "use warnings").
> 
> Note that ac_cv_path_PERL must be valid perl interpreter path
> since configure will check perl version and Flock implementation.
> It is not possible currently to use nativeperl from native
> sysroot because autoconf does not DE
> OBPENDS on perl-native (and

Typo above.

> doing so fails due to circular dependencies). Only possible
> solution is to overwrite shebangs with nativeperl somewhere at
> do_install() and update RDEPENDS for class-native. Or add perl
> symlinks to nativeperl in sysroot.
> 
> For now it seems good to use perl found by /usr/bin/env from
> autoconf-native.
> 
> Also add RDEPENDS for class-nativesdk and add nativesdk-perl
> to them.
> 
> v3: Corrected Upstream-Status tag.
> v2: Just realized that files in quilt directory (.pc) patched
>     unnecessarily.

Revision history should go under --- below.

> Cc: XE-Linux <xe-linux-external at cisco.com>
> Signed-off-by: Serhii Popovych <spopovyc at cisco.com>
> ---
>  meta/recipes-devtools/autoconf/autoconf.inc        |   7 +-
>  ...tion-in-shebangs-with-modern-use-warnings.patch | 120
> +++++++++++++++++++++
>  meta/recipes-devtools/autoconf/autoconf_2.69.bb    |   1 +
>  3 files changed, 127 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-devtools/autoconf/autoconf/autoconf-
> replace-w-option-in-shebangs-with-modern-use-warnings.patch
> 
> diff --git a/meta/recipes-devtools/autoconf/autoconf.inc
> b/meta/recipes-devtools/autoconf/autoconf.inc
> index b4e3356..408c5c9 100644
> --- a/meta/recipes-devtools/autoconf/autoconf.inc
> +++ b/meta/recipes-devtools/autoconf/autoconf.inc
> @@ -27,13 +27,18 @@ RDEPENDS_${PN} = "m4 gnu-config \
>  		  perl-module-data-dumper \
>  		 "
>  RDEPENDS_${PN}_class-native = "m4-native gnu-config-native"
> +RDEPENDS_${PN}_class-nativesdk = "nativesdk-m4 nativesdk-gnu-config
> nativesdk-perl"

This RDEPENDS change is not mentioned in the commit message. Does this
mean we suddenly start including perl in our SDKs or buildtools
tarballs? This should be a separate patch an include impact information
if you're really proposing this.

Cheers,

Richard



More information about the Openembedded-core mailing list