Bug 7547

Summary: Cannot reliably use a build dir as cross toolchain
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Joshua Lock <joshuagloe>
Component: eclipse-pluginAssignee: Todor Minchev <todor.minchev>
Status: VERIFIED NOTABUG QA Contact: Valentin Hangan <valentinx.hangan>
Severity: normal    
Priority: Medium CC: alexandru.costinx.roman, bogdanx.a.voiculescu, ioanax.grigoropol, yp.ep.watcher, yp.watcher
Version: 1.7.1   
Target Milestone: 1.9   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Joshua Lock 2015-03-31 11:31:40 UTC
I have a build dir with several qemuarm images built as well as having built a standalone toolchain (by issuing the -c populate_sdk command).

I built meta-ide-support before trying to set up the Eclipse ADT plugin to use my build dir.

When I set "Toolchain Root Location" to the equivalent of build/tmp (I'm using a build dir on a different partition) which contains an environment setup script with "Sysroot Location" set to an extracted sysroot and QEMU selected as my "Target Options" (with a zImage pointed to by the "Kernel" field) validation fails with:

'Specified toolchain directory does not cont... generated with "bitbake meta-ide-support".'

ADT Plug-in: 1.4.0 (installed from the 1.7.1/kepler software installation site)
Eclipse IDE: Kepler SR 2 (installed from a tarball downloaded from eclipse.org)
Poky: Dizzy HEAD (running the dizzy branch from git with a HEAD of ec75238f6cc2d2d8d40e0268f6d2acc070cbe9a4)
OS: Ubuntu 14.10 x86_64

I'd be happy to try and help debug this further, perhaps there's a way to enable debug output from the IDE plugin so I can understand where things are failing?
Comment 1 Joshua Lock 2015-03-31 16:26:04 UTC
A later attempt following the same steps but, perhaps coincidentally, after a reboot including a restart of Eclipse, was successful.

Is there a way to get more information about *why* plugin configuration has failed?
Comment 2 Joshua Lock 2015-04-02 14:57:57 UTC
FWIW I just confirmed this bug with a version of the plugin I built for Fido and Eclipse Luna.

Steps to verify:
* Install Eclipse Luna
* Add dependant plugins per instructions in reverted yocto-docs commit: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?id=1ca893766047f30ffbb0c99e51e575ea1302e7bc & restart Eclipse
* Build luna/fido branch per instructions in the dev manual:
http://www.yoctoproject.org/docs/1.7.1/dev-manual/dev-manual.html#zip-file-method
* Install built plugin & restart Eclipse
* Close Eclipse and restart with logging on: $ ENABLE_ADT_LOGS=1 ./eclipse
* Configure the Eclipse plugin to use my build dir

Expected result: able to use the toolchain from the build dir
Actual result: "Specified toolchain direct...bitbake meta-ide-support".

Unfortunately nothing useful is logged in adt.log:

$ cat ~/eclipse/adt.log 
Apr 02, 2015 3:13:59 PM org.yocto.sdk.ide.utils.YoctoSDKUtils registerLogger
INFO: Registered logger : adt_logger Log File: [adt.log]
Apr 02, 2015 3:54:43 PM org.yocto.sdk.ide.utils.YoctoSDKUtils unRegisterLogger
INFO: Unregistered logger : adt_logger Log file: [adt.log]

I closed and restarted Eclipse and tried configuring the Build system derived toolchain again to no avail.
Comment 3 Todor Minchev 2015-04-23 08:23:35 UTC
If you are using the "Build System Derived Toolchain" option, your "Toolchain Root Location" needs to be your top level build directory (e.g. xx/build and the "Sysroot Location" (e.g. xx/build/tmp/sysroots/your_target).

Then in the "Target Architecture" drop down menu you should see an option showing your target architecture and the validation message will disappear.
Comment 4 Todor Minchev 2015-04-28 11:01:06 UTC
Please reopen this bug if the problem still occurs when the plugin is set up as recommended in the previous comment.
Comment 5 Joshua Lock 2015-04-28 11:04:50 UTC
Thanks, I have been unable to reproduce but will update this bug should I see the issue again.
Comment 6 Alexandru Roman 2015-08-28 12:38:12 UTC
verified on luna-master: 45aa5c77523bdf051d548fff4305382942db2ebb