maintainer-feedback requested: [Bug 279823] databases/rubygem-mysql2 failed to build with MariaDB 10.11

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 17 Jun 2024 21:54:16 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-ruby (Nobody)
<ruby@FreeBSD.org> for maintainer-feedback:
Bug 279823: databases/rubygem-mysql2 failed to build with MariaDB 10.11
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279823



--- Description ---
I tried to build redmine51 in a Poudriere where I have MariaDB 10.11 set as
mysql variant.	Redmine depends on databases/rubygem-mysql2 and it failed to
build with the following error:

ERROR:	Error installing mysql2-0.5.6.gem:
	ERROR: Failed to build gem native extension.

    current directory:
/wrkdirs/usr/ports/databases/rubygem-mysql2/work/stage/usr/local/lib/ruby/gems/
3.2/gems/mysql2-0.5.6/ext/mysql2
/usr/local/bin/ruby32 extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_gc_mark_movable()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enc_interned_str() in ruby.h... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing. You may need to 'sudo apt-get install libmariadb-dev',
'sudo apt-get install libmysqlclient-dev' or 'sudo 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.


I don't know why it cannot find mysql.h. MariaDB client is installed as
dependency. Earlier in the build log:

===>   rubygem-mysql2-0.5.6 depends on shared library: libmariadb.so.3 - not
found
===>   Installing existing package /packages/All/mariadb1011-client-10.11.7.pkg
..
..
[pkg.example.com] Extracting mariadb1011-client-10.11.7: .......... done