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

Thanassis Silis djnass_18 at hotmail.com
Sat Jun 15 08:56:51 PDT 2013


Hi Jessica,thank you for the info, I extracted the rootfs using runqemy-extract-sdk and so now ADT global preferences (from window->preferences) has the following info
-prebuilt standalone toolchain: /opt/poky/1.4.1/ (choosing the the toolchain from the build directory  and pointing to dir : <yocto_root>/build/tmp/ , didn;t work. I'd get a msg stating that no toolchain is found on the specifiec path. If on the other hand, I kept the same path but chose the pre-built option the path was accepted!)-sysroot: <extracted_rootfsdir_image-gui-sdk>
I then recreated the project and it built fine. 
Only one question: Why pointing the toolchain from the build dir (and choosing accordingly the radio button just above) does not work?
Thank you for your help
From: jessica.zhang at intel.com
To: djnass_18 at hotmail.com; yocto at yoctoproject.org
Subject: RE: [yocto] Can not build (configure) a simple Hello world program in eclipse with ADT
Date: Fri, 14 Jun 2013 17:35:44 +0000









Hi Tanassis,
 
Can you install your sysroot setup by following the steps of ADT manual, either download a prebuild image.tar.gz file and use runqemu-extract-sdk to extract
 it under /home/user/sysroot_*** directory, or use adt_installer to set it up?  Any of the sysroot that you got by building  toolchain is just too minimum and we typically advise people to setup their sysroot base on target image rootfs.
 
Thanks,
Jessica
 


From: Thanassis Silis [mailto:djnass_18 at hotmail.com]


Sent: Friday, June 14, 2013 10:13 AM

To: Zhang, Jessica; yocto at yoctoproject.org

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


 

Hi Jessica,

well I selected the toolchain from build dir and pointed both paths (toolchain and sysroots) to

/home/<user>/<yocto_root>/build/tmp/



The rest is appended automatically I guess. 

The target showed up  correctly in the dropdown box ( armv7a-vfp-neon-poky-linux-gnueabi ) .



Following your advice, I changed the toolchain and sysroots to point to /opt/poky/1.4.1/ (changed the radio button to point to "standalone prebuilt toolchain" - i bitbaked from the same build the meta-toolchain-sdk as well.




I then recreated the hello world autotools example and the problem persists.....



Thank you for your help!

Tanassis




From:
jessica.zhang at intel.com

To: djnass_18 at hotmail.com; 
yocto at yoctoproject.org

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

Date: Fri, 14 Jun 2013 16:36:59 +0000

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/20130615/b7ffd79c/attachment.html>


More information about the yocto mailing list