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.
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
If you wanted to place "-mfloat-abi=hard" as a setting in the eclipse IDE, what menu would that go under?
Hi all,
I've had a similar problem and found that adding
-mfloat-abi=hard
when compiling helped.
All the best,
- Johannes
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
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
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
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
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
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
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!
-----------------------------------------------------------------------------------------------------------------------
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.
Above is a link for similar issue.
-Sri