Use meta-toolchain issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use meta-toolchain issue

Jump to solution
4,468 Views
lixuhui112
Contributor I

hello everyone:

   I use

$ bitbake meta-toolchain

in  tmp/deploy/sdk/ have  poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.sh

and

$ sh poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.sh

  [sudo] password for daiane:

    Enter target directory for SDK (default: /opt/poky/1.4.1):

    You are about to install the SDK to "/opt/poky/1.4.1". Proceed[Y/n]?y

    Extracting SDK...done

    Setting it up...done

    SDK has been successfully set up and is ready to be used.

but I use

$ arm-poky-linux-gnueabi-gcc hello.c -o hello

In file included from /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/features.h:389:0,

                 from /opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/stdio.h:27,

                 from hello.c:8:

/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory

# include <gnu/stubs-soft.h>

                             ^

compilation terminated.

Can someone please help me to resolve this?

Thanks

Labels (1)
0 Kudos
Reply
1 Solution
2,679 Views
BiyongSUN
NXP Employee
NXP Employee

I checked your command.

It seems you forgot to add "$" before CC.

it is "$CC" not just "CC".

View solution in original post

0 Kudos
Reply
6 Replies
2,679 Views
lixuhui112
Contributor I

if I use the CC

lxh@lxh-PC:~/lianxi$ CC hello.c

Fatal Python error: Py_Initialize: Unable to get the locale encoding

ImportError: No module named 'encodings'

已放弃 (核心已转储)

0 Kudos
Reply
2,679 Views
BiyongSUN
NXP Employee
NXP Employee

poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.sh is installation script to install the toolchain.

Once you have finished the installation by default settings, you will find toolchain located in /opt/poky/1.7

source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

$CC -o hello hello.c

file hello
hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=9c5d95682844a03a2c5563a73184fa142035a1d5, not stripped

0 Kudos
Reply
2,679 Views
lixuhui112
Contributor I

Thanks for the response.  but 

lxh@lxh-PC:~/lianxi$ source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

lxh@lxh-PC:~/lianxi$ CC -o hello hello.c

Fatal Python error: Py_Initialize: Unable to get the locale encoding

ImportError: No module named 'encodings'

已放弃 (核心已转储)

0 Kudos
Reply
2,680 Views
BiyongSUN
NXP Employee
NXP Employee

I checked your command.

It seems you forgot to add "$" before CC.

it is "$CC" not just "CC".

0 Kudos
Reply
2,679 Views
lixuhui112
Contributor I

thank you very much!!!

0 Kudos
Reply
2,679 Views
lixuhui112
Contributor I

if I use

$ source poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.sh

source: poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.sh: 无法执行二进制文件

0 Kudos
Reply