[poky] [PATCH 1/2] toolchain-shar-relocate: don't assume last state of env_setup_script is good

Paul Eggleton paul.eggleton at linux.intel.com
Thu Dec 3 13:56:18 PST 2015


On Mon, 16 Nov 2015 14:37:16 Jean-Francois Dagenais wrote:
> From: Jean-Francois Dagenais <jeff.dagenais at gmail.com>
> 
> In the case where many environment-setup-* files exist, the incorrect
> filename might be lastly set in env_setup_script, which leads to
> incorrect behaviour for the initialization of native_sysroot.
> 
> The scenario I had was that our custom meta-toolchain-*.bb, which
> inherits populate_sdk, defined another environment-setup-* file to dump
> variable information for qt-creator. The file is named like so in order
> for the sdk shell script to pick it up and fix the SDK paths in the
> file. Since it (coincidentally) alphabetically comes after ...-core2, it
> was last set in env_setup_script and the grep OECORE_NATIVE_SYSROOT
> would simply be blank. The apparent symptom was "...relocate_sdk.py:
> Argument list too long" since the find command would not be searching in
> the right path.
> ---
>  meta/files/toolchain-shar-relocate.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/files/toolchain-shar-relocate.sh
> b/meta/files/toolchain-shar-relocate.sh index dfb8e16..bfcf52e 100644
> --- a/meta/files/toolchain-shar-relocate.sh
> +++ b/meta/files/toolchain-shar-relocate.sh
> @@ -1,3 +1,5 @@
> +#reset the env_setup_script value to the proper value
> +env_setup_script=$target_sdk_dir/environment-setup- at REAL_MULTIMACH_TARGET_S
> YS@ # fix dynamic loader paths in all ELF SDK binaries
>  native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep
> 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"') dl_path=$($SUDO_EXEC find
> $native_sysroot/lib -name "ld-linux*")

This patch was merged to master and has unfortunately broken 
buildtools-tarball which does not use the same environment setup script name.

(Additionally this patch was missing Signed-off-by and was sent to the wrong 
list - it should have gone to the openembedded-core at lists.openembedded.org 
list instead.)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


More information about the poky mailing list