You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mysql2 gem doesn't build with the MariaDB 10.2.9 client library (tested on FreeBSD using packages from https://pkg.freebsd.org/ ) because the mysqld_error.h file is no longer part of the client library; it's only available as part of the full server package.
Gem build output shown below.
# gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.4/gems/mysql2-0.4.9/ext/mysql2
/usr/local/bin/ruby24 -r ./siteconf20171003-99182-qtl6qe.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for rb_big_cmp()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... no
-----
mysqld_error.h is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/$(RUBY_BASE_NAME)24
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/usr/local/lib/ruby/gems/2.4/extensions/amd64-freebsd-10/2.4/mysql2-0.4.9/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.4/gems/mysql2-0.4.9 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.4/extensions/amd64-freebsd-10/2.4/mysql2-0.4.9/gem_make.out
There is a .../include/mysql/errmsg.h file present with the client library, but it doesn't look that similar.
Copying in the mysqld_error.h from the server package results in an error on the lack of mysql_com.h. Copying in mysql_com.h results in a warning that suggests this is the wrong strategy, and an error:
compiling client.c
In file included from client.c:1:
In file included from ./mysql2_ext.h:14:
/usr/local/include/mysql/mysql_com.h:3:2: warning: This file should not be included by clients, include only <mysql.h> [-W#warnings]
#warning This file should not be included by clients, include only <mysql.h>
^
In file included from client.c:1:
./mysql2_ext.h:17:10: fatal error: 'mysql_version.h' file not found
#include <mysql_version.h>
^
1 warning and 1 error generated.
*** Error code 1
Copying in mysql_version.h seems to be enough to allow the gem to build.
Is this intended behavior? That warning about not including these files in clients seems to suggest that the MariaDB developers recommend a different strategy.
At least in the case of mysql_version.h, it looks like the MariaDB developers expect you to include mariadb_version.h instead; their mysql_version.h file only contains another "not from clients!" warning and an #include of mariadb_version.h.
mysql_com.h is similarly a warning and an #include of mariadb_com.h.
Both mariadb_version.h and mariadb_com.h are present in the client package. There appears to be no direct equivalent of mysqld_error.h; there's an errmsg.h but the content is quite different.
Thanks!
The text was updated successfully, but these errors were encountered:
The mysql2 gem doesn't build with the MariaDB 10.2.9 client library (tested on FreeBSD using packages from https://pkg.freebsd.org/ ) because the mysqld_error.h file is no longer part of the client library; it's only available as part of the full server package.
Gem build output shown below.
There is a .../include/mysql/errmsg.h file present with the client library, but it doesn't look that similar.
Copying in the mysqld_error.h from the server package results in an error on the lack of mysql_com.h. Copying in mysql_com.h results in a warning that suggests this is the wrong strategy, and an error:
Copying in mysql_version.h seems to be enough to allow the gem to build.
Is this intended behavior? That warning about not including these files in clients seems to suggest that the MariaDB developers recommend a different strategy.
At least in the case of mysql_version.h, it looks like the MariaDB developers expect you to include mariadb_version.h instead; their mysql_version.h file only contains another "not from clients!" warning and an #include of mariadb_version.h.
mysql_com.h is similarly a warning and an #include of mariadb_com.h.
Both mariadb_version.h and mariadb_com.h are present in the client package. There appears to be no direct equivalent of mysqld_error.h; there's an errmsg.h but the content is quite different.
Thanks!
The text was updated successfully, but these errors were encountered: