Re: eclipse-poky: Can't build from Eclipse, but command line build works

Bryan Evenson


-----Original Message-----
From: Minchev, Todor [mailto:todor.minchev@...]
Sent: Thursday, March 12, 2015 1:50 PM
To: Bryan Evenson
Cc: yocto@...
Subject: Re: [yocto] eclipse-poky: Can't build from Eclipse, but command line
build works

On Thu, 2015-03-12 at 13:43 +0000, Bryan Evenson wrote:

It appears that your toolchain is configured properly, however the
GNU linker (ld) cannot find the libraries it needs to link the
I suspect that the culprit is "--sysroot=$SDKTARGETSYSROOT"
There should be an environment setup file


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.
I've been having a few other issues with Eclipse (Install New Software
menu item disappearing, other plugins disappearing after restarting,
etc.), so I uninstalled eclipse, deleted my ~/.eclipse and workspace
directories and re-installed Eclipse. I need to run Eclipse Kepler
(another plugin I'm using isn't ready for Eclipse Luna), so I followed
these instructions for installing Eclipse by hand:
17-18-19-centos-red-hat-rhel-5-6. I also edited my environment setup script
as suggested. I then reinstalled all necessary plugins as described in the ADT
manual. I pointed the toolchain to my build directory and the sysroot
location to my extracted sysroot. I then followed the steps in the ADT
manual to create a new Hello World Yocto ADT project. I verified the
SDKTARGETSYSROOT environment variable in the new project points to my
extracted sysroot. When I attempted to build, I get the following output:

Invoking in build
directory: /<home_path>/workspace/adt_test/

Command-line environment variables:
CFLAGS=" -g -O0
--sysroot=/<home_path>/extracted_sysroot_1.6.2" CXXFLAGS=" -g -O0
--sysroot=/<home_path>/extracted_sysroot_1.6.2" LDFLAGS="
--sysroot=/<home_path>/extracted_sysroot_1.6.2" CPPFLAGS="

sh -c "/<home_path>/workspace/adt_test/
--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi
aclocal: warning: couldn't open directory
'/<home_path>/extracted_sysroot_1.6.2/usr/share/aclocal': No such file
or directory warning: AM_INIT_AUTOMAKE: two- and three-
forms are deprecated. For more info, see:
ze-AM_005fINIT_005fAUTOMAKE-invocation installing './compile' installing './config.guess' installing './config.sub' installing './install-sh' installing './missing'
src/ installing './depcomp'
configure: loading site
script /<home_path>/poky/meta/site/endian-little
configure: loading site script /<home_path>/poky/meta/site/arm-common
configure: loading site
script /<home_path>/poky/meta/site/common-linux
configure: loading site
script /<home_path>/poky/meta/site/common-glibc
configure: loading site script /<home_path>/poky/meta/site/arm-linux
configure: loading site script /<home_path>/poky/meta/site/common
configure: loading site
script /<home_path>/poky/meta-openembedded/meta-oe/site/endian-
configure: loading site
script /<home_path>/poky/poky-
configure: loading site
script /<home_path>/poky/poky-
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-poky-linux-gnueabi-strip...
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-poky-linux-gnueabi
checking how to print strings... printf
checking for style of include used by make... GNU
checking for arm-poky-linux-gnueabi-gcc... arm-poky-linux-gnueabi-gcc
-march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s --
checking whether the C compiler works... no
configure: error: in `/<home_path>/workspace/adt_test':
configure: error: in `/<home_path>/workspace/adt_test':
configure: error: C compiler cannot create executables
configure: error: C compiler cannot create executables
See `config.log' for more details
This is a different error. There seems to be a mismatch between your
toolchain and rootfs. Could you please share the full name of

my_built_image.tar.gz from

runqemu-extract-sdk <my_built_image.tar.gz>
I have been able to get things to build, but not exactly in a suggested manner. I copied the entire target sysroot directory (~/poky/poky_build/tmp/sysroots/at91sam9x5ek) to the previously mentioned sysroot destination directory. I re-ran "bitbake meta-ide-support" just to ensure I had a clean copy. I then modified the SDKTARGETSYSROOT to point to my copied sysroot location. With this setup, I was able to get the project to build from Eclipse. It's working, but it's a little ugly getting there.

So I'm assuming I'm starting at the wrong point for the sysroot to extract. What do other people do?


Configuration failed with error

The bold lines are ones that I see as a potential problem. First, the
system couldn't find aclocal in my extracted sysroot. I took a look
in the directory listed, and aclocal is not in there. I think the
configure script also found the build system's install and mkdir
(/usr/bin/install and /usr/bin/mkdir). I don't know if there is
supposed to be one of these in the extracted sysroot or not, but I
thought it was worth noting.

On a possibly related topic, I noticed that the Eclipse Indexer is
using the build system's header files. For example, if I open the
main source file from the Hellow World application, place my cursor on
the line "#include <stdlib.h>" and hit F3, /usr/include/stdlib.h opens
up instead of stdlib.h from my toolchain. Under the Eclipse project,
for the listed Includes directories it has the following:

Eclipse is showing the host headers, but it will use the headers from
your sysroot during the actual build.

Any thoughts on how to fix these issues?


Join { to automatically receive all group messages.