Bug 5339 - Generated toolchain not working outside default installation path
Summary: Generated toolchain not working outside default installation path
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.4.2
Hardware: All Multiple
: Medium+ major
Target Milestone: 1.4.2
Assignee: Laurentiu Palcu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-10-11 12:49 UTC by Diego Sueiro
Modified: 2013-10-30 07:52 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Sueiro 2013-10-11 12:49:44 UTC
When installing a generated toolchain outside of it's default path all binaries have the default absolute path to the dynamic loader (/opt/poky/...) hardcoded in the elf INTERP section.
This issue was detected when trying to use the meta-toolchain-qte with QT Creator and was reproduced on danny and dylan branches.

Here is some additional info about it:
https://lists.yoctoproject.org/pipermail/yocto/2013-October/018637.html
Comment 1 Laurentiu Palcu 2013-10-28 13:44:22 UTC
Apparently, the paths where QT looks for stuff (libraries, headers, etc) are hard-coded in qmake. A simple 'strings qmake | grep poky' reveals the following:

qt_demopath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/demos
qt_xmplpath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/examples
qt_trnspath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/translations
qt_datapath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr
qt_impspath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/imports
qt_plugpath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/plugins
qt_binspath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin
qt_libspath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib
qt_hdrspath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/include
qt_docspath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/doc
qt_prfxpath=/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr

These can also be seen by executing 'qmake -query'. Luckily, QT allows overriding these paths by providing a qt.conf file in the same directory with qmake. The following qt.conf made it work (replace PATH_TO_MY_SDK_DIR with the path to your sdk installation dir):
-------------
[Paths]
Prefix = <PATH_TO_MY_SDK_DIR>/sysroots/x86_64-pokysdk-linux/usr
-------------

qt-creator didn't complain anymore. I'll prepare a fix for this.
Comment 2 Laurentiu Palcu 2013-10-28 15:48:04 UTC
Sent a fix on the oe-core mailing list.