[yocto] Can not build (configure) a simple Hello world program in eclipse with ADT

Zhang, Jessica jessica.zhang at intel.com
Fri Jun 14 09:36:59 PDT 2013


Hi Thanassis,



How did you configure your toolchain and sysroot, in the windows->preference for ADT? I noticed from the commandling that your sysroot is sysroot=/home/nass/yocto/build/tmp/sysroots/imx6qsabrelite



Typically we'd advise people not to directly use the sysroot under the build environment.  If you follow the ADT manual there're couple ways for you to setup sysroot, either extract from image rootfs or use adt_installer.



Thanks,

Jessica



From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of Thanassis Silis
Sent: Friday, June 14, 2013 9:20 AM
To: yocto at yoctoproject.org
Subject: [yocto] Can not build (configure) a simple Hello world program in eclipse with ADT



hello everyone,
I am following the yocto Project Devel Manual ( http://www.yoctoproject.org/docs/1.4/dev-manual/dev-manual.html#adt-eclipse ) to set up eclipse for use with an embedded target . I am stuck in section 4.2.2.2 trying to make a simple autotools hello world application. The build fails at configure stage

checking for style of include used by make... GNU
checking for arm-poky-linux-gnueabi-gcc... arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/home/nass/yocto/build/tmp/sysroots/imx6qsabrelite
checking whether the C compiler works... no
configure: error: in `/home/nass/eclipse/adt_hello/':
configure: error: in `/home/nass/eclipse/adt_hello/':
configure: error: C compiler cannot create executables
configure: error: C compiler cannot create executables
See `config.log' for more details

Configuration failed with error


config.log looks fairly similar to this post: https://lists.yoctoproject.org/pipermail/yocto/2013-January/013860.html

I have configured to use the toolchain from the build directory. In fact the paths to the toolchain and sysroots are (both):
"/home/nass/yocto/build/tmp/" .

I went on to try the slightly more manual in CLI :  http://www.yoctoproject.org/docs/1.4/adt-manual/adt-manual.html#creating-and-running-a-project-based-on-gnu-autotools

again at configure  stage, I get:


checking for gcc... arm-poky-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/home/nass/yocto/build/tmp/sysroots/imx6qsabrelite
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/nass/appz/dev/yoctauto':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details


Should I really use --host? Wouldn't it be in the plugin setup options already if that was necessary? OR wouldn't the environment-setup* file contain the necessary declarations?

Any ideas how to avert it?

Thank you for your help!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130614/eb033dd3/attachment.html>


More information about the yocto mailing list