Issue with cross compiling with arm-poky-linux-gnueabi-gcc for i.MX6 wandboard-dual

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

Issue with cross compiling with arm-poky-linux-gnueabi-gcc for i.MX6 wandboard-dual

35,851 Views
harsha2708
Contributor II

Hi all,

I was trying to cross compile a simple 'helloWorld.c' program using 'arm-poky-linux-gnueabi-gcc' with the latest version of poky (1.7.1) for a custom built image and came up with this error that I am unable to to resolve.

harsha@harsha:~/fsl-community-bsp/build/tmp/deploy/images/wandboard-dual/rootfs-core-image-wvsnp-minimal/home/root$

arm-poky-linux-gnueabi-gcc helloWorld.c

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

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

                 from helloWorld.c:1:

/opt/poky/1.7.1/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.

I tried doing the same with  'core-image-minimal' using dizzy as my branch but the same thing happens. Please help.

Regards

--Sri

Labels (3)
11 Replies

5,735 Views
MichaelBMiner
Contributor IV

If you wanted to place "-mfloat-abi=hard" as a setting in the eclipse IDE, what menu would that go under?

0 Kudos

8,949 Views
johannesthoma
Contributor I

Hi all, 

I've had a similar problem and found that adding

-mfloat-abi=hard

when compiling helped.

All the best, 

- Johannes

0 Kudos

8,950 Views
fewo_c
Contributor I

Hi Johannes, I try adding to ccflags-y=-mfloat-abi=hard but the make file response with :

arm-poky-linux-gnueabi-gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together

Explicity I don't put the-mfloat-abi=soft. Any idea how can i fix this issue ?

Thanks in advance

0 Kudos

8,949 Views
BiyongSUN
NXP Employee
NXP Employee

Please follow the Yocto document.https://www.yoctoproject.org/

You need to source the environment first

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

then

$CC -o hello hello.c

8,950 Views
yangmiao02
Contributor I

same problem with me : fatal error: gnu/stubs-soft.h: No such file or directory

and I try to : source environment-setup-cortexa9hf-non-poky-linux-gnueabi

and check with: echo $CC 

the result is : arm-poky-linux-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --systemroot=/opt/poky/2.1.1/sysroots/cortxa9hf-neon-poky-linux-gnuwabi

 

the error still exits, I don't know why, so please help ,thanks

0 Kudos

8,949 Views
liu_jialu
Contributor III

it works for me. and :

$ echo $CC
$ arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

0 Kudos

8,950 Views
harsha2708
Contributor II

Hi All,

Is there a resolution to this issue yet? I have been trying to cross compile and could not get it to work.

This is what I tried:

Poky Distro 1.7.1 and also the corresponding .sh file for sourcing the environment.

Using arm-poky-linux-gnueabi-gcc compiler for cross compiling is producing the following error consistently.

harsha@harsha:~/WVSNP_Dashboard_Final/wvsnp_dashboard_v1.0.3/Source Code$ arm-poky-linux-gnueabi-gcc buttonfunctions.c -lxbee -o buttonfunctions.cgi -L /home/harsha/Billy_Strub/mygits/my_libxbee/libxbee3/xbee.h -lm cgic.h cgic.c

buttonfunctions.c:23:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

                   ^

compilation terminated.

cgic.h:12:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

                   ^

compilation terminated.

cgic.c:25:19: fatal error: stdio.h: No such file or directory

#include <stdio.h>

                   ^

compilation terminated.

All the build-essential files are intact and up to date and this should have resolved the stdio.h dependency.

I tried using the CC cross compiler, by just replacing 'arm-poky-linux-gnueabi-gcc' by 'CC' in the above command.

The binary properties of the buttinfunctions.cgi is still in x86 format.

harsha@harsha:~/WVSNP_Dashboard_Final/wvsnp_dashboard_v1.0.3/www/CGI$ file buttonfunctions.cgi

buttonfunctions.cgi: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x15ca70ec8491594ff1290b06dd1f908129fd45ad, not stripped

I would really appreciate any help here.

-Sri

0 Kudos

8,950 Views
Yuri
NXP Employee
NXP Employee
0 Kudos

8,950 Views
harsha2708
Contributor II

Yuri,

Thanks for the response. I got this issue resolved from the below discussion.

https://community.freescale.com/message/499896#499896

Thanks for the help.


Regards,

Sri

0 Kudos

8,950 Views
Yuri
NXP Employee
NXP Employee

Sri, hello !

   Have You provided host setup and machine configuration ($ source setup-environment <build-dir>)

as described in "Freescale_Yocto_Project_User's_Guide.pdf" ?


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

8,950 Views
harsha2708
Contributor II

Yuri,

Thanks for your prompt response.

Yes, I did follow all the steps given in the document.

I see similar issue from others as well.

fatal error: gnu/stubs-soft.h: No such file or directory · Issue #1 · digitallumens/meta-golang · Gi...

Above is a link for similar issue.

-Sri

0 Kudos