[yocto] eclipse-poky: Can't build from Eclipse, but command line build works

Bryan Evenson bevenson at melinkcorp.com
Wed Mar 11 06:45:11 PDT 2015


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 ADT 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
	/<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?

Thanks,
Bryan



More information about the yocto mailing list