Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql2 & MariaDB 10.5 Compatibility #374

Open
iniOr opened this issue Oct 11, 2021 · 1 comment
Open

mysql2 & MariaDB 10.5 Compatibility #374

iniOr opened this issue Oct 11, 2021 · 1 comment

Comments

@iniOr
Copy link

iniOr commented Oct 11, 2021

Hi,

trying to install this software on Centos 7, cannot install some needed gems following documentation :

# bundle install --deployment --without development:test
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Fetching gem metadata from https://rubygems.org/...........
Fetching additional metadata from https://rubygems.org/..
Using rake 11.2.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.9.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.6
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Installing nokogiri 1.6.8
Installing rails-deprecated_sanitizer 1.0.3
Installing rails-dom-testing 1.0.7
Installing loofah 2.0.3
Installing rails-html-sanitizer 1.0.3
Installing actionview 4.2.6
Installing rack 1.6.5
Installing rack-test 0.6.3
Installing actionpack 4.2.6
Installing globalid 0.3.6
Installing activejob 4.2.6
Installing mime-types-data 3.2016.0521
Installing mime-types 3.1
Installing mail 2.6.4
Installing actionmailer 4.2.6
Installing activemodel 4.2.6
Installing arel 6.0.3
Installing activerecord 4.2.6
Installing currencies 0.4.2
Installing countries 0.9.3
Installing date_validator 0.7.1
Installing phony 2.10.4
Installing activevalidators 3.2.0
Installing addressable 2.3.8
Installing authie 1.1.1
Installing bcrypt 3.1.10
Installing chronic 0.10.2
Installing numerizer 0.1.1
Installing chronic_duration 0.10.6
Installing coffee-script-source 1.9.1
Installing execjs 2.3.0
Installing coffee-script 2.3.0
Installing thor 0.19.1
Installing railties 4.2.6
Installing coffee-rails 4.1.0
Installing concurrent-ruby 1.0.2
Installing css_parser 1.3.6
Installing datey 1.0.1
Installing deep_merge 1.0.1
Installing delayed_job 4.0.6
Installing delayed_job_active_record 4.0.3
Installing dotenv 1.0.2
Installing dynamic_form 1.1.4
Installing florrick 1.1.2
Installing foreman 0.77.0
Installing tilt 2.0.1
Installing haml 4.0.6
Installing htmlentities 4.3.4
Installing jquery-rails 4.0.3
Installing kaminari 0.16.3
Installing moonrope 1.3.2

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby 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
-----
Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
-----
-----
Setting libpath to /usr/lib64/
-----
creating Makefile

make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/include/mysql -I/usr/include/mysql/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o client.o -c client.c
In file included from ./mysql2_ext.h:18:0,
                 from client.c:1:
/usr/include/mysql/mysql_com.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
 #warning This file should not be included by clients, include only <mysql.h>
  ^
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/include/mysql -I/usr/include/mysql/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o mysql2_ext.o -c mysql2_ext.c
In file included from ./mysql2_ext.h:18:0,
                 from mysql2_ext.c:1:
/usr/include/mysql/mysql_com.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
 #warning This file should not be included by clients, include only <mysql.h>
  ^
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/include/mysql -I/usr/include/mysql/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o infile.o -c infile.c
In file included from ./mysql2_ext.h:18:0,
                 from infile.c:1:
/usr/include/mysql/mysql_com.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
 #warning This file should not be included by clients, include only <mysql.h>
  ^
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/include/mysql -I/usr/include/mysql/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H    -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -mtune=generic -fPIC -m64 -o result.o -c result.c
In file included from ./mysql2_ext.h:18:0,
                 from result.c:1:
/usr/include/mysql/mysql_com.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
 #warning This file should not be included by clients, include only <mysql.h>
  ^
rm -f mysql2.so
gcc -shared -o mysql2.so client.o mysql2_ext.o infile.o result.o -L. -L/usr/lib64 -L/usr/lib64/ -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic  -m64  -lruby -L/usr/lib64/ -lmariadb  -lpthread -lrt -ldl -lcrypt -lm   -lc
/usr/bin/ld: cannot find -lmariadb
collect2: error: ld returned 1 exit status
make: *** [mysql2.so] Error 1


Gem files will remain installed in /var/www/html/staytus/vendor/bundle/ruby/gems/mysql2-0.3.18 for inspection.
Results logged to /var/www/html/staytus/vendor/bundle/ruby/gems/mysql2-0.3.18/ext/mysql2/gem_make.out
An error occurred while installing mysql2 (0.3.18), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.3.18'` succeeds before bundling.

MariaDB-devel package is installed :

MariaDB-devel-10.5.4-1.el7.centos.x86_64

Is this software compatible with MariaDB 10.5 ?

Thanks in advance !

@iniOr
Copy link
Author

iniOr commented Oct 19, 2021

Working with mariadb 55, this software is not supported anymore : https://mariadb.org/mariadb-55-rip/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant