Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 446904 - Qt4's linux-g++-32 mkspecs has wrong library paths
Summary: Qt4's linux-g++-32 mkspecs has wrong library paths
Status: RESOLVED DUPLICATE of bug 304971
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2012-12-11 18:34 UTC by Evan Teran
Modified: 2012-12-11 20:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Evan Teran 2012-12-11 18:34:53 UTC
I'm not sure if this is an upstream bug or if it's a gentoo packaging bug. Here's the issue. I have a 64-bit system, but I'd like to occasionally build a Qt application as 32-bit.

It would seem that the "proper" way to do this would be to do the following:

    QMAKESPEC=linux-g++-32 qmake

Among other things, this adds "-m32" to the compiler flags and things work generally well. However, there is a quirk. It still tries to link to the Qt libraries found in /usr/lib64/qt4!

After doing some digging, I found that /usr/share/qt4/mkspecs/linux-g++-32/qmake.conf has the following line:


And that file: /usr/share/qt4/mkspecs/common/linux.conf has the following line:

    QMAKE_LIBDIR_QT       = /usr/lib64/qt4

clearly that isn't the correct path for a 32-bit build! Doing a temporary manual edit to be:

    QMAKE_LIBDIR_QT       = /usr/lib32/qt4

makes it search in the right paths. This doesn't fully fix my problems (I think I am dealign with incompatable versions of the libraries), but at least it tries to link to 32-bit versions of the library...

Reproducible: Always

Actual Results:  
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtMultimedia
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtMultimedia
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtMultimedia
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtOpenGL
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtOpenGL
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtOpenGL
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtGui
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtGui
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtGui
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtCore
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/qt4/ when searching for -lQtCore
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtCore
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/ when searching for -lgthread-2.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/ when searching for -lrt
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/librt.a when searching for -lrt
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/ when searching for -lglib-2.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/ when searching for -lGL
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/ when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libpthread.a when searching for -lpthread
collect2: ld returned 1 exit status

Expected Results:  
It should be linking with the libraries in /usr/lib32/qt4

$ emerge --info
Portage 2.2.0_alpha147 (default/linux/amd64/10.0, gcc-4.5.4, glibc-2.15-r3, 3.6.8-gentoo x86_64)
System uname: Linux-3.6.8-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_M_640_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Tue, 11 Dec 2012 15:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.8, 2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3, 4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo codef00-com
CFLAGS="-march=native -O2 -finline-functions -ftracer -pipe -ggdb"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -finline-functions -ftracer -pipe -ggdb"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="64bit X acl acpi aio alsa amd64 android apache2 apng aspell bash-completion berkdb bluetooth boost bzip2 c++0x cairo cddb cdr cli clucene cmake consolekit cracklib crypt css cups curl cxx dbus debugger declarative dell development device-mapper dri dts dvd dvdr encode extra extras fastcgi ffmpeg flac fontconfig fortran gcj gd gdbm gif git google gpm grammar graphite graphviz gtk gudev hfs hwdb iconv icu innodb inotify ioctl ipv6 java java6 javascript jit jpeg json kde kpathsea kqemu kvm lame laptop latex ldap libnotify lto matroska minizip mmx mng modules mono mp3 mpeg mpi mplayer mudflap multilib mysql mysqli ncurses nls nptl nsplugin nvidia oauth ogg openal opengl openmp openrc openssl openxml ovftool pam pcre pdf pdfimport pdo perl plasma png policykit pppd private-headers python qmake qt3support qt4 qtscript rdoc readline romio rss samba script sdl semantic-desktop session simplexml soap sockets sql sqlite sqlite3 sse sse2 sse3 sse4 sse4_1 sse4a ssl ssse3 static-analyzer subversion svg tcpd teamarena theora threads thumbnail tidy tiff tools truetype udisks unicode usb valgrind virtuoso vmware-tools vorbis webgl webkit wicd wifi wxwidgets x264 x86-64 xcomposite xine xinerama xml xscreensaver xsl xvid zeroconf zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US en_US.UTF-8" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.6 2.7"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-11 20:10:34 UTC

*** This bug has been marked as a duplicate of bug 304971 ***