Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 668148 - dev-ruby/mysql2: Incorrect MySQL client library version
Summary: dev-ruby/mysql2: Incorrect MySQL client library version
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
Depends on:
Reported: 2018-10-09 10:03 UTC by Anton Bolshakov
Modified: 2018-10-26 23:53 UTC (History)
1 user (show)

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 Anton Bolshakov 2018-10-09 10:03:57 UTC
I received the following error recently:

spawned uWSGI worker 1 (pid: 23690, cores: 1)
/usr/lib64/ruby/gems/2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'mysql2'.
Gem Load Error is: Incorrect MySQL client library version! This gem was compiled for 5.6.40 but the client library is 6.1.11.
Backtrace for gem load error is:
/usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `block in require'
/usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:274:in `require'
/usr/lib64/ruby/gems/2.3.0/gems/mysql2-0.3.21/lib/mysql2.rb:31:in `<top (required)>'

This is because mysql2 depends on "virtual/libmysqlclient:=" and even there is the specific ":=" instruction to recompile it seems unable to detect the change

emerge --info
Portage 2.3.49 (python 3.6.5-final-0, default/linux/amd64/17.0/hardened, gcc-7.3.0, glibc-2.26-r7, 4.18.11-pentoo x86_64)
System uname: Linux-4.18.11-pentoo-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-gentoo-2.4.1
KiB Mem:     7971060 total,   2626672 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Tue, 09 Oct 2018 03:15:02 +0000
Head commit of repository gentoo: 5cc1ec1dda7d320ad0fb4016f3b879e7aca71d71
Head commit of repository pentoo: df6d5340252945827782d71b28421aa3c494132b

sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.38.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

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

    location: /var/db/overlays/pentoo-overlay
    sync-type: git
    masters: gentoo

    location: /var/db/overlays/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_LICENSE="* -@EULA OPERA-12 NVIDIA-CUDA PUEL AdobeFlash-11.x Google-TOS dlj-1.1 google-chrome Oracle-BCLA-JavaSE Intel-SDP skype- baudline"
CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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"
CXXFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
EMERGE_DEFAULT_OPTS="--load-average=3.6 --quiet-build"
FCFLAGS="-O2 -pipe -frecord-gcc-switches -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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 -frecord-gcc-switches -frecord-gcc-switches"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
LINGUAS="en ru"
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"
USE="X a52 aac acl acpi activities alsa amd64 branding bzip2 cairo cdda consolekit crypt cups cxx dbus declarative dri dri3 dts dvdr emboss encode exif ffmpeg flac gif glamor gtk hackrf hardened iconv ipv6 jpeg kde kipi kwallet lcms libnotify libtirpc mad minipentoo mng modemmanager mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pax_kernel pcre pdf phonon pie plasma png policykit ppds qml qt5 readline samba sdl seccomp semantic-desktop spell ssl ssp startup-notification svg tiff truetype udev udisks unicode upower usb vaapi vlc vorbis widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xtpax xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx 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="libinput" KERNEL="linux" L10N="en ru" 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 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23" UNICORN_TARGETS="x86" USERLAND="GNU" VIDEO_CARDS="vesa intel i965" XFCE_PLUGINS="brightness menu logout trash" 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"
Comment 1 Brian Evans Gentoo Infrastructure gentoo-dev 2018-10-09 11:57:49 UTC
Please follow the post-install instructions to rebuild all libmysqlclient consumers in the latest versions.
Comment 2 Anton Bolshakov 2018-10-13 00:54:41 UTC
Re-opening because I didn't receive the post_install message. The solution was to rebuild dev-ruby/mysql2 which I expected to be picked up by revdep-rebuild.

There is an "virtual/libmysqlclient:=" instruction in the slot 0.3 (and it doesn't work with virtual packages):

Hower, it is missing in the latest ebuild:

Shouldn't it be "MDEPEND="mysql? ( dev-db/mysql-connector-c:= ) mariadb? ( dev-db/mariadb-connector-c:= )" (with :=) ?
Comment 3 Hans de Graaff gentoo-dev 2018-10-26 18:05:55 UTC
(In reply to Anton Bolshakov from comment #2)

> Shouldn't it be "MDEPEND="mysql? ( dev-db/mysql-connector-c:= ) mariadb? (
> dev-db/mariadb-connector-c:= )" (with :=) ?

No, because these are API-compatible and don't require recompilation after updating the library.
Comment 4 Anton Bolshakov 2018-10-26 23:53:41 UTC
Have you seen an error which(In reply to Hans de Graaff from comment #3)
> No, because these are API-compatible and don't require recompilation after
> updating the library.

Have you seen the error which I was facing?

They are compatible between each other but mysql2 complained after major mysql client version upgrade