Patchwork Getting rid of warning when running perl from the SDK

login
register
mail settings
Submitter Jacob Kroon
Date Jan. 18, 2014, 1:10 p.m.
Message ID <CAPbeDCk26BE-b_ckrR7TEOSC5Y16Vh6DVEGEzdCjG0m1BtkwUQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/65157/
State New
Headers show

Comments

Jacob Kroon - Jan. 18, 2014, 1:10 p.m.
Hi,
When running perl from the SDK created by OE I get this warning:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

The following change sets LC_ALL to "C" in the SDK setup script.

 diff --git a/meta/classes/toolchain-scripts.bbclass
b/meta/classes/toolchain-scripts.bbclass
index b9f2aea9..0737253 100644
PATH=${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${bindir_nativesdk}/${TARGET_SYS}:$PATH'
>> $script
     echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script

and gets rid of the perl warning.

Is this change something that would be appropriate for upstream OE-Core ?

  -- Jacob

Patch

--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -13,6 +13,7 @@  toolchain_create_sdk_env_script () {

script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-$multimach_target_sys}
     rm -f $script
     touch $script
+    echo 'export LC_ALL=C' >> $script
     echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script
     echo 'export