"Multiarch support": missing libQt's symlinks when crosscompiling
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qt4-x11 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
System: Ubuntu 11.10 amd64
libqt4-dev: 4:4.7.4-0ubuntu8 and others
Compiling a simple native app with no problems.
Trying to compile for i386(i686) arch first install the missing packages
sudo apt-get install libqtcore4:i386 libqtgui4:i386
When compiling an app with "gcc -m32 example.o -o example -lQtCore -lQtGui" the linker tries to link native amd64 libraries libQtGui.so and libQtCore.so instead of i386 libs results in an error.
This happens becouse there are non symlinks to those libraries. If i create those symlinks
cd /usr/lib/
sudo ln libQtCore.so.4 libQtCore.so
sudo ln libQtGui.so.4 libQtGui.so
the linker find those libs and everything works without errors.
$ apt-file -a i386 search libQtCore.so
libqt4-dbg: /usr/lib/
libqt4-dev: /usr/lib/
libqtcore4: /usr/lib/
libqtcore4: /usr/lib/
libqtcore4: /usr/lib/
The libQtCore.so symlink should be put in libqtcore4 instead of libqt4-dev or make libqt4-dev multiarch compliant removing all binary dependant packages.
if a try
$ sudo apt-get install libqt4-dev:i386
apt-get will need to REMOVE the native package with all symlinks and libraries to properly install the other.