Bug 13969

Summary: do_configure does not execute Perl wrapper script
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Paul Menzel <pmenzel+bugzilla.yoctoproject.org>
Component: meta-yoctoAssignee: Unassigned <unassigned>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher, richard.purdie
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
Log file
none
Run file none

Description Paul Menzel 2020-07-04 03:03:28 UTC
Created attachment 4697 [details]
Log file

Following *Yocto Project Quick Build* [1] with 3.2_M1-104-ge21201ec3b, executing

    bitbake core-image-sato

fails with the error below in our custom GNU/Linux distribution MarIuX:

    ERROR: openssl-native-1.1.1g-r0 do_configure: Execution of '/dev/shm/poky/build/tmp/work/x86_64-linux/openssl-native/1.1.1g-r0/temp/run.do_configure.3107' failed with exit code 127:
    /dev/shm/poky/build/tmp/hosttools/perl: line 2: prun: command not found
    WARNING: /dev/shm/poky/build/tmp/work/x86_64-linux/openssl-native/1.1.1g-r0/temp/run.do_configure.3107:1 exit 127 from 'HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="/dev/shm/poky/build/tmp/work/x86_64-linux/openssl-native/1.1.1g-r0/openssl-1.1.1g/external/perl/Text-Template-1.46/lib/" perl /dev/shm/poky/build/tmp/work/x86_64-linux/openssl-native/1.1.1g-r0/openssl-1.1.1g/Configure --with-rand-seed=os,devrandom disable-devcryptoeng --prefix=$useprefix --openssldir=/dev/shm/poky/build/tmp/work/x86_64-linux/openssl-native/1.1.1g-r0/recipe-sysroot-native/usr/lib/ssl-1.1 --libdir=/dev/shm/poky/build/tmp/work/x86_64-linux/openssl-native/1.1.1g-r0/recipe-sysroot-native/usr/lib $target'

We have several Perl versions installed, and `/usr/bin/perl` is a wrapper script.

    $ more /usr/bin/perl
    #! /bin/bash       
    prun perl-5.12.1-0 $(basename "$0") "$@"

    $ more /dev/shm/poky/build/tmp/hosttools/perl
    #! /bin/bash
    prun perl-5.12.1-0 $(basename "$0") "$@"

The wrapper script `prun` is in the `PATH`, so I wonder, why it’s not found.

    $ ls -l /usr/bin/prun
    -rwxr-xr-x 1 root root 189 Nov 19  2018 /usr/bin/prun

[1]: https://www.yoctoproject.org/docs/3.1.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html
Comment 1 Paul Menzel 2020-07-04 03:04:19 UTC
Created attachment 4698 [details]
Run file
Comment 2 Richard Purdie 2020-07-09 07:48:38 UTC
The system filters out PATH to avoid host contamination. prun is not in HOSTTOOLS and therefore it isn't seen. You can probably work around the issue by adding it to HOSTTOOLS. This is the system working as designed and this isn't a bug. Including a path to prun would also work.