sensu-plugins-mysql icon indicating copy to clipboard operation
sensu-plugins-mysql copied to clipboard

Mysql gem is outdated, won't compile against mysql8

Open gwinans opened this issue 6 years ago • 1 comments

These need to be converted away from the "mysql" gem. It's long-dead. It won't even compile against mysql8-dev.

I'd go for it, but my ruby skills are.. questionable. at best. for now.

Small sample of mysql gem failing to compile:

gem install mysql
Fetching: mysql-2.9.1.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing mysql:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/mysql-2.9.1/ext/mysql_api
/usr/bin/ruby2.5 -r ./siteconf20190413-580-1qljyc4.rb extconf.rb
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... no
checking for mysql.h... yes
creating Makefile

current directory: /var/lib/gems/2.5.0/gems/mysql-2.9.1/ext/mysql_api
make "DESTDIR=" clean

current directory: /var/lib/gems/2.5.0/gems/mysql-2.9.1/ext/mysql_api
make "DESTDIR="
compiling mysql.c
mysql.c:79:2: error: unknown type name ‘my_bool’
  my_bool *is_null;
  ^~~~~~~
mysql.c: In function ‘options’:
mysql.c:361:5: error: unknown type name ‘my_bool’; did you mean ‘_Bool’?
     my_bool b;
     ^~~~~~~
     _Bool

gwinans avatar Apr 13 '19 08:04 gwinans

So, I have taken up learning some ruby and am nearly complete in the process of moving this over to the Mysql2 gem.

gwinans avatar Apr 14 '19 15:04 gwinans