Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 530552 - dev-qt/qtsql-4.8.6-r1 USE=odbc - x86_64-pc-linux-gnu-g++ -m32: ld: cannot find -lodbc
Summary: dev-qt/qtsql-4.8.6-r1 USE=odbc - x86_64-pc-linux-gnu-g++ -m32: ld: cannot fin...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-25 10:03 UTC by Lars
Modified: 2015-03-31 00:27 UTC (History)
0 users

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


Attachments
build log (build-abi_x86_32.x86.log,412.76 KB, text/plain)
2014-11-25 11:27 UTC, Lars
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars 2014-11-25 10:03:04 UTC
See summary

Reproducible: Always

Steps to Reproduce:
emerge -av1 dev-qt/qtsql

Actual Results:  
mv -f libqsqlmysql.so ../../../../plugins/sqldrivers/
make[1]: Leaving directory '/var/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/src/plugins/sqldrivers/mysql'
rm -f libqsqlodbc.so
x86_64-pc-linux-gnu-g++ -m32 -Wl,-O1 -Wl,--as-needed -Wl,-rpath-link,/var/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -shared -o libqsqlodbc.so .obj/release-shared/main.o .obj/release-shared/qsql_odbc.o .obj/release-shared/moc_qsql_odbc.o   -L/usr/lib32/mysql -L/var/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -L/usr/lib32/qt4 -lodbc -lQtSql -L/usr/lib32/mysql -L/var/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -lQtCore -lpthread  
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../libodbc.so when searching for -lodbc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libodbc.so when searching for -lodbc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lodbc
collect2: error: ld returned 1 exit status
Makefile:116: recipe for target '../../../../plugins/sqldrivers/libqsqlodbc.so' failed
make[1]: *** [../../../../plugins/sqldrivers/libqsqlodbc.so] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/src/plugins/sqldrivers/odbc'
Makefile:63: recipe for target 'sub-odbc-make_default' failed
make: *** [sub-odbc-make_default] Error 2



Works with USE="-odbc"
Comment 1 Lars 2014-11-25 11:27:01 UTC
Created attachment 390258 [details]
build log
Comment 2 Lars 2014-11-25 11:28:47 UTC
emerge --info '=dev-qt/qtsql-4.8.6-r1::gentoo'
Portage 2.2.8-r2 (default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.16.5-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.16.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-3632QM_CPU_@_2.20GHz-with-gentoo-2.2
KiB Mem:     8049720 total,   1754984 free
KiB Swap:    4194300 total,   2317544 free
Timestamp of tree: Tue, 25 Nov 2014 01:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6-r1, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.3-r2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo local-crossdev java x11 sunrise johu mrueg enlightenment local_overlay g-ctan g-cpan
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 sun-bcla-java-vm skype-eula skype-4.0.0.7-copyright AdobeFlash-10.1 AdobeFlash-10.3 cadsoft EULA Oracle-BCLA-JavaSE AdobeFlash-11.x Intel-SDP yEd-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -mtune=core-avx-i -mcx16 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mfsgsbase -mrdrnd -mf16c -mpopcnt -mfpmath=sse -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb /var/lib/redmine/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml"
CXXFLAGS="-O2 -mtune=core-avx-i -mcx16 -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -mpclmul -mfsgsbase -mrdrnd -mf16c -mpopcnt -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage-crossdev /var/lib/layman/java /var/lib/layman/x11 /var/lib/layman/sunrise /var/lib/layman/johu /var/lib/layman/mrueg /var/lib/layman/enlightenment /usr/local/portage /var/lib/g-ctan /var/lib/g-cpan"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aacplus aalib abook acct acl acpi activefilter addbookmarks additions addns aio akonadi alias alisp alsa amd64 amr amrnb amrwb anacron aotuv apache2 apng archive ass async asyncns atm audiofile auth autoipd automount autoreplace autotrace avahi bash-completion berkdb bitmap bittorrent bluetooth bluray boost branding bs2b btrfs bzip2 cairo calendar caps cdaudio cdda cddax cddb cdio cdparanoia cdr chdir chroot cleartype cli clucene clutter connectionstatus consolekit contactnotes contrast coverage cracklib cron crypt cryptsetup cscope css cue cups curl cxx cydir daap dar64 dbus dc1394 dell desktopglobe detex device-mapper devil dga dhcp-tools dia dirac directfb discid disk-partition distinct-l djbfft djvu dmraid dmx dnd dnssec dri drm dts dv dvb dvd dvdr dvdread dvi dvi2tty dvipdfm dynamic eap eap-tls ebook eigen embedded-fuseiso emf emovix enca encode enscript entropy eolconv epos epspdf escreen espeak etwin eurephia exif expat extras faac faad fam fame fastcgi fasteap fat fax fbcon fbcondecor fbsplash fdt festival ffmpeg fftw finger firefox firefox3 firewalld firmware fits flac flash flite fmod fontconfig foomaticdb fortran fpx freetds freetts ftd2xx ftdi ftp fts3 fuse fusion g3dvl gadu gbm gcj gcrypt gd gdbm geoip geolocation ggi ggz gif gimp git glamor glep gles1 gles2 glib glitz gme gmp gnokii gnuplot gnutls gopher gpg gphoto2 gpm gpu graphics graphicsmagick graphviz groupwise grp gs gsm gstreamer gtk gtk3 gudev gzip handwriting hardened hbci hddtemp hfs highlight history hog hotpixels hpcups hpijs hpn html htmlhandbook htmlsingle http humanities hwdb hybrid-auth ical iconv icotools icoutils icu id3tag idea idn ieee1394 ifp ilbc imagemagick imapc imlib inkjar inotify ioctl ios ipod iproute2 ipv6 ipw4965 irc irmc isag ithreads ivtv jabber jadetex java java5 java6 javascript jbig jce jemalloc jfs jingle jit joystick jpeg jpeg2k jsapi json kate kdm kdrive kernel-patch keymap kig-scripting kipi kpathsea kqemu kvm ladspa lame lapack laptop lasi lastfm lastfmradio latex lcms ldap lensfun libass libcaca libkms libmpeg2 libnl libnotify libsamplerate libssh2 libsysfs libtiger libv4l libv4l2 libvisual live llvm lm_sensors logitech-mouse loop-aes lqr lua lucene lvm lzma lzo mac macvtap mad maildir managesieve marble matroska mbox mbrola md5sum mdadm mdbox mdnsresponder-compat mem-scramble messenger metapost midi mikmod minizip mixer mjpeg mmap mms mmx mmxext mng mod modplug modules mono mozdevelop mozdom mozilla mp2 mp3 mp3tunes mp4 mpeg mpg123 mpi mplayer mpx mtp mule multilib multimedia multiuser musepack musicbrainz mutt mvl mysql mysqli mythtv natspec ncurses nemesi netbeans netboot nettle network network-cron new-hpcups nfs nfsv3 nfsv4 nfsv41 njb nls nntp nodrm nokia normalize nowlistening nptl nsplugin nss ntfs ntlm nut nuv objc objc++ objc-gc ocr octave odbc ofa offensive ofono ofx ogg omega oom openal opencl opencore-amr openexr opengl openmp openssl openvg openvpn optimization optimized-qmake opus orc oscar otp otr p2p pam pam_ssh panorama parted passenger password passwordsave paste64 pcap pcmcia pcre pdf pdfannotextractor pdfimport perl phonon pidgin pipe pkcs11 pkinit plasma plotutils plugin-dot15d4 plugins pmu png pnm policykit pop3c postscript ppds ppp presto procmail pronounce pstricks pth publishers pulseaudio pvr python qalculate qemu qemu-ifup qpak qt-faststart qt3support qt4 quicktime quotas qwt r600-llvm-compiler radio radius rar raw rdesktop rdesktop-vrdp rdp rdpusb readline realtime recorder redeyes reiser4 reiserfs replaygain replytolist restrict-javascript rfc3779 rss rtc rtf rtmp rtsp ruby rups samba sametime sasl sbsms scanner schroedinger science script scripts sdbox sdl sdl-image secure-delete security segger sensord serial session sftp shine shout sid sieve sift silc sip sipim skins skype slang slit slp smbclient smbsharemodes smi smime smp sms smtp sndfile snmp socks5 sound soundcloud soundex soundtouch soup speech speex spell spice spoof-source sqlite sse sse2 sse3 sse4 sse41 sse4_1 ssh ssl ssse3 startup-notification statistics stream subversion svg swat swig sysfs syslog t1lib taglib tci tcl tcpd telepathy teletext templates test-programs tex4ht texi2html texteffect tga themes theora thin-splines threads thumbnail tiff timezone timidity tk tls toolbar toolkit-scroll-bars tor-hardening tordns translator transmitter trayicon truetype tty-helpers tv twolame udev udev-acl udisks ukit uml unicode usb usbredir utempter uuid uxa v4l v4l2 vaapi vamp vcd vcdinfo vcdx vde vdpau vdr versaloon vhosts video vim vim-pager vim-syntax vim-with-x virt-network visualization vlc vlm vnc vorbis vpnc vpx wad wavpack webgl webinterface webkit webp webpresence wicd wifi wildmidi wimax win32 winbind winetools winetriks winpopup wma wma-fixed wmf wps wxwidgets wxwindows x264 xa xanim xattr xcomposite xetex xext xface xforms xfs xim xine xinerama xinetd xml xmldoclet xmp xnest xosd xpm xprint xrandr xscreensaver xulrunner xv xvfb xvid xvmc yahoo yv12 zephyr zeroconf zip zlib zoran zsh-completion zvbi" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="cgid 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 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 dav dav_fs dav_lock deflate dir disk_cache" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template toshiba_pdrm11 jl2005a topfield ax203 st2205 jl2005c tp6801 pentax" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="pvrusb2" 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 ublox ubx" INPUT_DEVICES="evdev keyboard mouse joystick synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="wiki-publisher nlpsolver pdfimport presenter-console presenter-minimizer scripting-beanshell scripting-javascript" LINGUAS="en de" LIRC_DEVICES="hauppauge hauppauge_dvb" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby19" SANE_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e avision bh canon canon630u canon_dr canon_pp cardscan coolscan coolscan2 coolscan3 dc210 dc240 dc25 dell1600n_net dmc epjitsu epson epson2 fujitsu genesys gt68xx hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s hs2p ibm kodak kodakaio kvs1025 kvs20xx leo lexmark ma1509 magicolor matsushita microtek microtek2 mustek mustek_pp mustek_usb nec net niash p5 pie pixma plustek plustek_pp qcam ricoh rts8891 s9036 sceptre sharp sm3600 sm3840 snapscan sp15c st400 stv680 tamarack teco1 teco2 teco3 test u12 umax umax1220u umax_pp xerox_mfp kvs40xx mustek_usb2 pnm" USERLAND="GNU" VIDEO_CARDS="fbdev vesa radeon fglrx v4l intel i915 i965" 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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-qt/qtsql-4.8.6-r1 was built with the following:
USE="exceptions freetds mysql qt3support sqlite (-aqua) -debug -oci8 -odbc -pch -postgres" ABI_X86="32 64 -x32"
Comment 3 Lars 2014-11-25 12:12:51 UTC
emerge -pqv '=dev-qt/qtsql-4.8.6-r1::gentoo'
[ebuild   R   ] dev-qt/qtsql-4.8.6-r1  USE="exceptions freetds mysql odbc* qt3support sqlite (-aqua) -debug -oci8 -pch -postgres" ABI_X86="32 (64) (-x32)"


Please note, the output of Comment 2 is after I emerged qtsql with 

USE="-odbc" emerge -av1 dev-qt/qtsql 

to confirm it is an odbc related issue.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-25 20:34:22 UTC
Please post the output of `emerge -vpq dev-db/unixODBC' in a comment.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-12-09 16:45:50 UTC
@Lars, this looks extremely weird. From what I can see in the build log, it seems that either you don't have /usr/lib32/libodbc.so* or your system doesn't look for libraries in /usr/lib32.

Could you please try to rebuild unixODBC, and if that doesn't help provide:

1. the output of 'equery f unixODBC',

2. the contents of /etc/ld.so.conf,

3. the output of ': | gcc -v -m32 -x c -' (it's going to end with an error but that's not important).
Comment 6 Lars 2014-12-10 08:45:17 UTC
(In reply to Jeroen Roovers from comment #4)
> Please post the output of `emerge -vpq dev-db/unixODBC' in a comment.

emerge -vpq dev-db/unixODBC
[ebuild   R   ] dev-db/unixODBC-2.3.2-r1  USE="minimal unicode -odbcmanual -static-libs" ABI_X86="32 (64) (-x32)"
Comment 7 Lars 2014-12-13 22:49:23 UTC
(In reply to Michał Górny from comment #5)
> @Lars, this looks extremely weird. From what I can see in the build log, it
> seems that either you don't have /usr/lib32/libodbc.so* or your system
> doesn't look for libraries in /usr/lib32.
> 
> Could you please try to rebuild unixODBC, and if that doesn't help provide:

Rebuilding unixODBC solved it. Unfortunately I did not save the output of 'equery f unixODBC' before rebuilding.

The last time I build unixODBC before was Fr 15. Aug 2014 dev-db/unixODBC-2.3.1.
This time it is dev-db/unixODBC-2.3.2-r1. Maybe some version conflict?
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2014-12-15 21:33:01 UTC
(In reply to Lars from comment #7)
> The last time I build unixODBC before was Fr 15. Aug 2014
> dev-db/unixODBC-2.3.1.

This doesn't make sense. qtsql requires >=dev-db/unixODBC-2.3.2 for a good reason, so if you had 2.3.1 you had broken dependencies.
Comment 9 Johannes Buchner 2015-03-30 23:26:19 UTC
Had a similar/same? issue with installing dev-qt/qtsql-4.8.6-r1 with ABI_X86 32 (on a 64 bit). I did not have a 32 bit /usr/lib/libodbc.so so compilation failed.
Re-installing dev-db/unixODBC with abi_x86_32 USE flag solved it.

I think the proper solution would be to make dev-qt/qtsql when emerged with abi_x86_32, require that dev-db/unixODBC is also emerged with abi_x86_32.

Below the compile log:

x86_64-pc-linux-gnu-g++ -m32 -c -Os -pipe -I/usr/include/mysql -I/usr/include/iodbc -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_HAVE_SSE4_1 -DQT_HAVE_SSE4_2 -DQT_HAVE_AVX -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_SHARED -I/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/mkspecs/linux-g++ -I/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/plugins/sqldrivers/sqlite -I../../../../include/QtCore -I../../../../include/QtSql -I../../../../include -I.moc/release-shared -I. -o .obj/release-shared/moc_qsql_sqlite.o .moc/release-shared/moc_qsql_sqlite.cpp
/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/sql/drivers/odbc/qsql_odbc.cpp: In function ‘QSqlField qMakeFieldInfo(const QODBCPrivate*, int)’:
/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6/src/sql/drivers/odbc/qsql_odbc.cpp:636:9: warning: variable ‘required’ set but not used [-Wunused-but-set-variable]
     int required = -1;
         ^
rm -f libqsqlite.so
x86_64-pc-linux-gnu-g++ -m32 -Wl,-O1 -Wl,--as-needed -Wl,-rpath-link,/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -shared -o libqsqlite.so .obj/release-shared/smain.o .obj/release-shared/qsql_sqlite.o .obj/release-shared/moc_qsql_sqlite.o   -L/usr/lib32/mysql -L/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -L/usr/lib32/qt4 -L/usr/lib32 -lsqlite3 -lQtSql -L/usr/lib32/mysql -L/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -lQtCore -lpthread  
mv -f libqsqlite.so ../../../../plugins/sqldrivers/
make[1]: Leaving directory '/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/src/plugins/sqldrivers/sqlite'
rm -f libqsqlmysql.so
x86_64-pc-linux-gnu-g++ -m32 -Wl,-O1 -Wl,--as-needed -Wl,-rpath-link,/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -shared -o libqsqlmysql.so .obj/release-shared/main.o .obj/release-shared/qsql_mysql.o .obj/release-shared/moc_qsql_mysql.o   -L/usr/lib32/mysql -L/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -L/usr/lib32/qt4 -L/usr/lib64 -lmysqlclient -lz -lm -lssl -lcrypto -ldl -lQtSql -L/usr/lib32/mysql -L/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -lQtCore -lpthread  
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libmysqlclient.so when searching for -lmysqlclient
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libz.so when searching for -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libssl.so when searching for -lssl
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libcrypto.so when searching for -lcrypto
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libdl.so when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libdl.a when searching for -ldl
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libpthread.so when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libpthread.a when searching for -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libm.so when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libm.a when searching for -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libc.so when searching for -lc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libc.a when searching for -lc
mv -f libqsqlmysql.so ../../../../plugins/sqldrivers/
make[1]: Leaving directory '/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/src/plugins/sqldrivers/mysql'
rm -f libqsqlodbc.so
x86_64-pc-linux-gnu-g++ -m32 -Wl,-O1 -Wl,--as-needed -Wl,-rpath-link,/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -shared -o libqsqlodbc.so .obj/release-shared/main.o .obj/release-shared/qsql_odbc.o .obj/release-shared/moc_qsql_odbc.o   -L/usr/lib32/mysql -L/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -L/usr/lib32/qt4 -lodbc -lQtSql -L/usr/lib32/mysql -L/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/lib -lQtCore -lpthread  
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../libodbc.so when searching for -lodbc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libodbc.so when searching for -lodbc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lodbc
collect2: error: ld returned 1 exit status
Makefile:116: recipe for target '../../../../plugins/sqldrivers/libqsqlodbc.so' failed
make[1]: *** [../../../../plugins/sqldrivers/libqsqlodbc.so] Error 1
make[1]: Leaving directory '/mnt/data/tmp/portage/dev-qt/qtsql-4.8.6-r1/work/qt-everywhere-opensource-src-4.8.6-abi_x86_32.x86/src/plugins/sqldrivers/odbc'
Makefile:63: recipe for target 'sub-odbc-make_default' failed
make: *** [sub-odbc-make_default] Error 2
 * ERROR: dev-qt/qtsql-4.8.6-r1::gentoo failed (compile phase):
Comment 10 Davide Pesavento (RETIRED) gentoo-dev 2015-03-31 00:09:17 UTC
(In reply to Johannes Buchner from comment #9)
> I think the proper solution would be to make dev-qt/qtsql when emerged with
> abi_x86_32, require that dev-db/unixODBC is also emerged with abi_x86_32.
> 

The dependency is already there... are you sure your depgraph is consistent?

$ grep unixODBC qtsql-4.8.6-r1.ebuild
	>=dev-db/unixODBC-2.3.2-r2[${MULTILIB_USEDEP}]
Comment 11 Johannes Buchner 2015-03-31 00:27:07 UTC
(In reply to Davide Pesavento from comment #10)
> are you sure your depgraph is consistent?
How do I check that?