Bug 4509 - Creating debug session fails when SDK is not installed in the default location
Summary: Creating debug session fails when SDK is not installed in the default location
Status: RESOLVED NOTABUG
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: unspecified
Hardware: x86 x86_64
: Medium normal
Target Milestone: 1.5
Assignee: Jessica
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-05-17 14:05 UTC by Gabriel Barbu
Modified: 2013-08-09 21:51 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Barbu 2013-05-17 14:05:30 UTC
After setting up Eclipse as described in the Yocto Project Development Manual;
with a Standalone pre-build toolchain and a QEMU target extracted using the runqemu-extract-sdk;
and installing the SDK in another location than the default /opt/poky/1.4+snapshot (for example in ~/toolchain );

when attempting to start the debugger as in 4.2.2.6. Deploying and Debugging the Application, 
the following error occurs:

“Launching hwPrj_gdb_i586-poky-linux has encountered a problem.
Error creating session.
Could not find platform independent libraries <prefix>”
Comment 1 Jessica 2013-06-04 23:46:13 UTC
Hi Gabriel,

Can you provide more info about your setup, what is your sysroot? and what is your toolchain, what in eclipse preference is your ADT setup.  Also, are you usin the defult hello world ansi c project?  

Thanks,
Jessica
Comment 2 Gabriel Barbu 2013-06-05 11:50:16 UTC
Hi Jessica,

Here is the info:
sysroot: runqemu-extract-sdk my_view/poky/build/tmp/deploy/images/core-image-sato-sdk-qemux86.tar.bz2 ~/ym-ciss-qx86-sysroot

Toolchain: my_view/poky/build/tmp/deploy/sdk/poky-eglibc-x86_64-i586-toolchain-1.4+snapshot.sh
./poky-eglibc-x86_64-i586-toolchain-1.4+snapshot.sh ~/toolchain

ADT setup:
- Standalone pre-build toolchain
- Toolchain location: ~/toolchain
- Sysroot location: ~/toolchain/sysroots
- Target architecture: i586-poky-linux
- Target Options: QEMU
   - Kernel: my_view/poky/build/tmp/deploy/images/bzImage-qemux86.bin
   - Custom Options: nographic

Project: Yocto Project ADT Autotools Project > Hello World ANSI C Autotools Project

Also, I found (as a workaround) that if I source the environment before starting Eclipse/from the same shell, then it works.

Best regards,

Gabriel
Comment 3 Jessica 2013-06-07 17:20:04 UTC
Hi Gabriel,

Your sysroot should be set to: ~/ym-ciss-qx86-sysroot
Comment 4 Gabriel Barbu 2013-06-13 09:08:38 UTC
Hi Jessica,

I tried setting the sysroot as you suggested (actually now that one is: /opt/ym-ciss-qx86-sysroot due to another cross-host issue we had).
I get the same behavior and the same workaround applies.

I think the problem is that from what you could see in the External Tools Configuration > Arguments:

-e "source /opt/ytc/environment-setup-i586-poky-linux;runqemu qemux86 /media/sdd1/fb/gaba/ym/poky/build/tmp/deploy/images/bzImage-qemux86.bin /opt/ym-ciss-qx86-sysroot nographic;bash"

this part is not executed: “source /opt/ytc/environment-setup-i586-poky-linux”.

At least this explains why the workaround I mentioned above works.

Best regards,

Gabriel
Comment 5 Jessica 2013-08-09 21:51:57 UTC
Hi Gabriel,

I took another look of the bug, you need to start qemu session first then bring up the debug session, the debugger won't bring up qemu session for you and I just can't reproduce the issue on my end.  

Thanks,
Jessica