MariaDB 10.0.12 incompatible with mysql2 0.3.16
Added by Lukasz Kszonowski over 10 years ago
I am running Redmine 2.5.2 on Arch Linux with MariaDB. Recently I did full system upgrade (yesterday, I think) with pacman -Suy which upgraded MariaDB to newest version, I run mysql_upgrade as suggested and everything worked with no problems (I checked my Wordpress and Redmine setup).
Today I had to restart apache, which broke my Redmine:
Incorrect MySQL client library version! This gem was compiled for 5.5.37-MariaDB but the client library is 10.0.12-MariaDB. (RuntimeError) /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require' /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require' /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency' /usr/lib/ruby/gems/2.1.0/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require' /usr/lib/ruby/gems/2.1.0/gems/mysql2-0.3.16/lib/mysql2.rb:8:in `<top (required)>' /usr/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in `require' /usr/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require' /usr/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:72:in `each' /usr/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:72:in `block in require' /usr/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:61:in `each' /usr/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/runtime.rb:61:in `require' /usr/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler.rb:132:in `require' /srv/http/redmine/config/application.rb:7:in `<top (required)>' /srv/http/redmine/config/environment.rb:2:in `require' /srv/http/redmine/config/environment.rb:2:in `<top (required)>' config.ru:3:in `require' config.ru:3:in `block in <main>' /usr/lib/ruby/gems/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval' /usr/lib/ruby/gems/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize' config.ru:1:in `new' config.ru:1:in `<main>' /usr/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:112:in `eval' /usr/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:112:in `preload_app' /usr/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:158:in `<module:App>' /usr/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>' /usr/lib/ruby/gems/2.1.0/gems/passenger-4.0.45/helper-scripts/rack-preloader.rb:28:in `<main>'
Any hints how to proceed? It worked fine, until restart, so I guess the problem is just with version check.
Replies (3)
RE: MariaDB 10.0.12 incompatible with mysql2 0.3.16 - Added by Jan Niggemann (redmine.org team member) over 10 years ago
https://github.com/brianmario/mysql2/issues/506
"You need to compile mysql2 against MariaDB 10.0.12 if you want to use it with that version."
RE: MariaDB 10.0.12 incompatible with mysql2 0.3.16 - Added by Lukasz Kszonowski over 10 years ago
Thanks for the hint. I tried to follow mentioned steps, but after executing bundle exec rake spec I get error as follow:
mkdir -p tmp/x86_64-linux/mysql2/2.1.2 cd tmp/x86_64-linux/mysql2/2.1.2 /usr/bin/ruby -I. ../../../../ext/mysql2/extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes ----- Using mysql_config at /usr/bin/mysql_config ----- checking for mysql.h... yes checking for errmsg.h... yes checking for mysqld_error.h... yes ----- Setting rpath to /usr/lib ----- creating Makefile cd - cd tmp/x86_64-linux/mysql2/2.1.2 make compiling ../../../../ext/mysql2/infile.c compiling ../../../../ext/mysql2/client.c compiling ../../../../ext/mysql2/result.c compiling ../../../../ext/mysql2/mysql2_ext.c linking shared-object mysql2/mysql2.so cd - install -c tmp/x86_64-linux/mysql2/2.1.2/mysql2.so lib/mysql2/mysql2.so /usr/bin/ruby -S rspec ./spec/em/em_spec.rb ./spec/mysql2/client_spec.rb ./spec/mysql2/error_spec.rb ./spec/mysql2/result_spec.rb Mysql2::EM::Client should support async queries (FAILED - 1) should support queries in callbacks (FAILED - 2) should not swallow exceptions raised in callbacks (FAILED - 3) when an exception is raised by the client should swallow exceptions raised in by the client (FAILED - 4) should fail the deferrable (FAILED - 5) Mysql2::Client should raise an exception upon connection failure (FAILED - 6) should raise an exception on create for invalid encodings (FAILED - 7) should not raise an exception on create for a valid encoding (FAILED - 8) [...]
I was also unable to complete git fetch origin +refs/pull/505/merge:
fatal: Couldn't find remote ref refs/pull/505/merge
This is probably related. Are there any precompiled modules available? Or maybe I can force current one to work, since it was OK after mysql.service restart and worked fine with mariadb-10 just until apache restart.
RE: MariaDB 10.0.12 incompatible with mysql2 0.3.16 - Added by Lukasz Kszonowski over 10 years ago
Well... There is 1800 lines of traceback, most of them ends with FAILED #. But it seems to work. Very interesting.
jan jan Niggemann: thanks for your help!