Hello Bryan,

On Wed, 2015-03-11 at 13:45 +0000, Bryan Evenson wrote:
> I am trying to get the Yocto Eclipse plug-in setup so that I can build my 
> application from Eclipse.  I am *almost* there, but the final build is not 
> working.  I'm assuming there are some path/rights issues somewhere in the 
> chain because I can build from the command line.  I'm looking for some help 
> in figuring out where the difference is.
> 
> I am using Fedora 21 64-bit for a host system.  I am using Eclipse Kepler; I 
> also have Eclipse Luna installed, but I had to install Eclipse Kepler since 
> another plugin I am using does not yet have support for Eclipse Luna.  I am 
> on poky/daisy HEAD and have been able successfully build my image (image 
> based on core-image-minimal with a few extra applications).  Under Eclipse 
> Kepler, I installed the pre-build plug-in from the Yocto Eclipse Update Site 
> as instructed in the Yocto Project Development Manual for Poky 1.6.2.  I am 
> using my existing toolchain in the build directory, so I issued "bitbake 
> meta-ide-support" to generate the cross-toolchain support.  I then followed 
> the instructions under "Extracting the Root Filesystem" in the ADT Manual to 
> extract the root filesystem.  Specifically, I sourced the newly created 
> environment script and then called "runqemu-extract-sdk 
> <my_built_image.tar.gz> <sysroot_destination_directory>".  Then, from Eclipse 
> I setup the Yocto Project AD
>  T for a "Build System Derived Toolchain", I set the Toolchain Root Directory 
> to my Poky build directory, and I set the Sysroot location to my extracted 
> sysroot directory.
> 
> After the initial environment setup, from Eclipse I selected File->New->C 
> Project, and selected a "Hello World ANSI C Autotools Project" under the 
> "Yocto Project ADT Autotools Project" options.  For the new project, if I 
> select "Reconfigure Project" the configuration fails with the following error:
> 
>       checking whether the C compiler works... no
> 
> From checking config.log, here are the details on the build failure:
> 
>       configure:3289: checking whether the C compiler works
>       configure:3311: arm-poky-linux-gnueabi-gcc  -march=armv5te -marm 
> -mthumb-interwork -mtune=arm926ej-s --sysroot=$SDKTARGETSYSROOT  -g -O0  
> --sysroot=/<home_path>/extracted_sysroot_1.6.2  
> --sysroot=/<home_path>/extracted_sysroot_1.6.2  
> --sysroot=/<home_path>/extracted_sysroot_1.6.2 conftest.c  >&5

It appears that your toolchain is configured properly, however the  GNU
linker (ld) cannot find the libraries it needs to link the binary. 

I suspect that the culprit is "--sysroot=$SDKTARGETSYSROOT"

There should be an environment setup file

/<home_path>/poky/poky-build/tmp/environment-setup-XX


If you open it you will see SDKTARGETSYSROOT environment variable. It
most likely points to a different sysroot path. Please change it to
point to the directory where you extracted your sysroot
(/<home_path>/extracted_sysroot_1.6.2), create a new project and see if
that builds OK.


>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find crt1.o: No such file or directory
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find crti.o: No such file or directory
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find crtbegin.o: No such file or directory
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find -lgcc
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find -lgcc_s
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find -lc
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find -lgcc
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find -lgcc_s
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find crtend.o: No such file or directory
>       
> /<home_path>/poky/poky-build/tmp/sysroots/x86_64-linux/usr/libexec/arm926ejste-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.2/ld:
>  cannot find crtn.o: No such file or directory
>       collect2: error: ld returned 1 exit status
>       configure:3315: $? = 1
>       configure:3353: result: no
>       configure: failed program was:
>       | /* confdefs.h */
>       | #define PACKAGE_NAME "adt_test_app"
>       | #define PACKAGE_TARNAME "adt_test_app"
>       | #define PACKAGE_VERSION "0.1.0"
>       | #define PACKAGE_STRING "adt_test_app 0.1.0"
>       | #define PACKAGE_BUGREPORT ""
>       | #define PACKAGE_URL ""
>       | #define PACKAGE "adt_test_app"
>       | #define VERSION "0.1.0"
>       | /* end confdefs.h.  */
>       | 
>       | int
>       | main ()
>       | {
>       | 
>       |   ;
>       |   return 0;
>       | }
>       configure:3358: error: in `/<home_path>/workspace_kepler/adt_test_app':
>       configure:3360: error: C compiler cannot create executables
> 
> Note that <home_path> included the actual path to my home directory in 
> config.log but I changed it to <home_path> for the purposes of this e-mail 
> (yes, I'm paranoid).
> 
> However, if I instead open a terminal, go to my project directory and do the 
> following:
> 
>       source 
> <path_to_Poky_build_directory>/environment-setup-arm926ejste-poky-linux-gnueabi
>       ./configure ${CONFIGURE_FLAGS}

> The project configures without a problem.  I can then either build from the 
> command line or I can build from Eclipse.  It seems very odd to me that the 
> configure doesn't work from Eclipse, but once it is configured I can build 
> without issue.  Anyone have any ideas as to what I have wrong in my setup?
> 

This builds, but it most likely uses the rootfs bundled in the
poky-build directory as pointed to by SDKTARGETSYSROOT and not the
rootfs which your extracted.

Thanks,
Todor

> Thanks,
> Bryan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to