Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 626370 - dev-db/mariadb-10.2.7 32-bit i686-pc-linux-gnu-mysql_config points to /usr/lib64
Summary: dev-db/mariadb-10.2.7 32-bit i686-pc-linux-gnu-mysql_config points to /usr/lib64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-27 15:46 UTC by Karl-Johan Karlsson
Modified: 2017-07-28 12:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl-Johan Karlsson 2017-07-27 15:46:22 UTC
I build my entire system with ABI_X86="32 64". After upgrading dev-db/mariadb from 10.1.25 to 10.2.7, rebuilding dev-qt/qtsql:4 failed with the following error:

MySQL (thread-safe) auto-detection... ()
x86_64-pc-linux-gnu-g++ -m32 -c -march=native -O2 -pipe -ggdb -std=gnu++98 -Wall -W  -I/var/tmp/portage/dev-qt/qtsql-4.8.7-r1/work/qt-everywhere-opensource-src-4.8.7/mkspec
s/linux-g++ -I/var/tmp/portage/dev-qt/qtsql-4.8.7-r1/work/qt-everywhere-opensource-src-4.8.7/config.tests/unix/mysql_r -I/usr/include/mysql -I/usr/include -I/var/tmp/portag
e/dev-qt/qtsql-4.8.7-r1/work/qt-everywhere-opensource-src-4.8.7/config.tests/unix/mysql_r -I. -o mysql.o /var/tmp/portage/dev-qt/qtsql-4.8.7-r1/work/qt-everywhere-opensource-src-4.8.7/config.tests/unix/mysql/mysql.cpp
x86_64-pc-linux-gnu-g++ -m32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--enable-new-dtags -o mysql_r mysql.o     -L/usr/lib32/mysql -L/usr/lib64 -lmariadb -lpthread -lz -ldl -lm -lssl -lcrypto -lmysqlclient_r
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libmariadb.so when searching for -lmariadb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../libmariadb.so when searching for -lmariadb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libmariadb.so when searching for -lmariadb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmariadb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../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/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib64/libpthread.a when searching for -lpthread
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:102: mysql_r] Error 1
MySQL (thread-safe) disabled.

The error looked similar to bug 564554, but the proposed patch in that bug did not fix the issue.

Looking closer, it turns out that the i686-pc-linux-gnu-mysql_config script from 
dev-db/mariadb-10.2.7 is wrong, and points to 64-bit libs instead of 32-bit.

Here's the output from dev-db/mariadb-10.2.7, which does not work:

Usage: ./i686-pc-linux-gnu-mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/include/mysql -I/usr/include/mysql/.. ]
        --include        [-I/usr/include/mysql -I/usr/include/mysql/..]
        --libs           [-L/usr/lib64  -lmariadb -lpthread -lz -ldl -lm -lssl -lcrypto]
        --libs_r         [-L/usr/lib64  -lmariadb -lpthread -lz -ldl -lm -lssl -lcrypto]
        --plugindir      [/usr/lib64/mariadb/plugin]
        --socket         [/var/run/mysqld/mysqld.sock]
        --port           [0]
        --version        [10.2.7]
        --libmysqld-libs [-L/usr/lib64  -lmysqld]
        --variable=VAR   VAR is one of:
                pkgincludedir [/usr/include/mysql]
                pkglibdir     [/usr/lib64]
                plugindir     [/usr/lib64/mariadb/plugin]

And here's from dev-db/mariadb-10.1.25, which did work:

Usage: ./i686-pc-linux-gnu-mysql_config [OPTIONS]
Options:
        --cflags         [-I/usr/include/mysql -I/usr/include/mysql/.. ]
        --include        [-I/usr/include/mysql -I/usr/include/mysql/..]
        --libs           [-L/usr/lib32  -lmysqlclient -lpthread -lz -lm -ldl -lssl -lcrypto]
        --libs_r         [-L/usr/lib32  -lmysqlclient -lpthread -lz -lm -ldl -lssl -lcrypto]
        --plugindir      [/usr/lib32/mysql/plugin]
        --socket         [/var/run/mysqld/mysqld.sock]
        --port           [0]
        --version        [10.1.25]
        --libmysqld-libs [-L/usr/lib32/mysql  -lmysqld]
        --variable=VAR   VAR is one of:
                pkgincludedir [/usr/include/mysql]
                pkglibdir     [/usr/lib32]
                plugindir     [/usr/lib32/mysql/plugin]
Comment 1 Karl-Johan Karlsson 2017-07-27 15:50:19 UTC
# emerge --info dev-db/mariadb
Portage 2.3.6 (python 3.4.6-final-0, hardened/linux/amd64, gcc-6.3.0, glibc-2.24-r3, 4.12.3-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.12.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770K_CPU_@_3.50GHz-with-gentoo-2.4.1
KiB Mem:    32884656 total,  19704364 free
KiB Swap:   33521660 total,  33521660 free
Timestamp of repository gentoo: Thu, 27 Jul 2017 09:30:02 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.1) 2.27
ccache version 3.3.4 [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo
dev-util/ccache:          3.3.4::gentoo
dev-util/cmake:           3.9.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r3::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15.1::gentoo
sys-devel/binutils:       2.27-r1::gentoo, 2.28-r2::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --timeout=10 --ipv6

creideiki
    location: /usr/local/portage
    masters: gentoo
    priority: 0

rion
    location: /var/lib/layman/rion
    sync-type: laymansync
    sync-uri: git://github.com/rion-overlay/rion-overlay.git
    masters: gentoo
    priority: 50

seden
    location: /var/lib/layman/seden
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/user/seden.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

torbrowser
    location: /var/lib/layman/torbrowser
    sync-type: laymansync
    sync-uri: git://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --keep-going --quiet-build=n --backtrack=30 --verbose-conflicts"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--enable-new-dtags"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=10 --ipv6"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 berkdb bluray bzip2 cli cracklib crypt cuda cups cxx dri dvd emacs exif ffmpeg flac gdbm gif hackrf hardened iconv idn ipv6 jpeg jpeg2k justify kde mng modules multilib ncurses nls nptl ogg opengl openmp pam pax_kernel pcre pdf pie png postscript qt5 readline seccomp session ssl ssp svg tcpd tiff unicode urandom vaapi vdpau vorbis wmf xattr xpm xtpax zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" 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="braindump flow karbon kexi krita sheets stage words" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" L10N="en en-US en-GB sv" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby23 ruby24" SANE_BACKENDS="pixma hp" USERLAND="GNU" VIDEO_CARDS="nvidia" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

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

dev-db/mariadb-10.2.7::gentoo was built with the following:
USE="backup -bindist cracklib -debug embedded -extraengine -galera -innodb-lz4 -innodb-lzo -innodb-snappy -jdbc -jemalloc -kerberos -latin1 -libressl -mroonga -odbc openssl -oqgraph pam perl -profiling -rocksdb (-selinux) server -sphinx -sst-rsync -sst-xtrabackup -static -static-libs -systemd -systemtap -tcmalloc -test -tokudb -xml -yassl" ABI_X86="32 (64) (-x32)"
CFLAGS="-march=native -O2 -pipe -ggdb -fno-strict-aliasing"
CXXFLAGS="-march=native -O2 -pipe -ggdb -felide-constructors -fno-strict-aliasing"
Comment 2 Brian Evans (RETIRED) gentoo-dev 2017-07-27 17:29:21 UTC
I just noticed some calls which will be invalid.  Working on a new revision now.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2017-07-28 01:04:03 UTC
10.2.7-r1 should fix all issues.  Please test
Comment 4 Karl-Johan Karlsson 2017-07-28 08:09:03 UTC
dev-db/mariadb-10.2.7-r1 works for me. /usr/bin/i686-pc-linux-gnu-mysql_config points to /usr/lib32 and dev-qt/qtsql-4.8.7-r1 builds without issue.