All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Minchev, Todor" <todor.minchev@intel.com>
To: "bevenson@melinkcorp.com" <bevenson@melinkcorp.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: eclipse-poky: Can't build from Eclipse, but command line build works
Date: Thu, 12 Mar 2015 11:21:47 +0000	[thread overview]
Message-ID: <1426159307.7680.18.camel@intel.com> (raw)
In-Reply-To: <BN3PR0501MB109035A8492F6EA261F15FE8BB190@BN3PR0501MB1090.namprd05.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 6345 bytes --]

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 #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5229 bytes --]

  reply	other threads:[~2015-03-12 11:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 13:45 eclipse-poky: Can't build from Eclipse, but command line build works Bryan Evenson
2015-03-12 11:21 ` Minchev, Todor [this message]
2015-03-12 13:43   ` Bryan Evenson
2015-03-12 17:50     ` Minchev, Todor
2015-03-12 18:15       ` Bryan Evenson
2015-03-12 20:09       ` Bryan Evenson
2015-03-13  8:58         ` Minchev, Todor
2015-03-13 11:02           ` Bryan Evenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426159307.7680.18.camel@intel.com \
    --to=todor.minchev@intel.com \
    --cc=bevenson@melinkcorp.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.