mysql_config --version for alpine (Docker) installs of mariadb-connector-c-dev reports 10.8.8 (mariadb version)
Closed this issue · 4 comments
DBD::mysql version
5.002
MySQL client version
No response
Server version
8.x
Operating system version
Alpine-3.18.2
What happened?
During DBD::mysql-5.002 install the inclusion of mysql_config --version
in the Makefile means that the mariadb-dev > mariadb-connector-c-dev > mysql_config
install which previous worked fine (as it reports the correct libs/cflags for mysql) now fails.
Tried rolling back to 5.001 and got other errors that I couldn't quite be bothered understanding.
Solution: Pin DBD::mysql to ~4.x
Other information
- It appears mysql_config --version reports the mariadb version (which is in the 10.x range)
- mariadb-dev is the de-facto way to install mysql libs on alpine linux, libmysqlclient-dev isn't available.
Some info about Alpine and MySQL: https://wiki.alpinelinux.org/wiki/MySQL
I quickly tried this with a docker run -it alpine:latest
container:
apk update
apk add perl gcc perl-app-cpanminus perl-devel-checklib perl-dbi make gcompat openssl openssl-dev libpthread-stubs build-base perl-dev libaio libnsl libc6-compat
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.35-linux-glibc2.17-x86_64-minimal.tar.xz
tar Jxf mysql-8.0.35-linux-glibc2.17-x86_64-minimal.tar.xz
mv mysql-8.0.35-linux-glibc2.17-x86_64-minimal mysql
rm mysql-8.0.35-linux-glibc2.17-x86_64-minimal.tar.xz
cpanm --interactive --configure-args="--mysql_config=/mysql/bin/mysql_config" DBD::mysql
However that doesn't seem to work. Looks like this might be a musl/glibc issue. It might be needed to build MySQL with musl as well.
If you want to keep using the MariaDB client libraries you can pin DBD::mysql to 4.x.
If you want to use DBD::mysql 5.x then you need an OS with a MySQL client library.
I tried to build MySQL, but that failed due to some issues with libresolv (glibc).
If you want to keep using the MariaDB client libraries you can pin DBD::mysql to 4.x.
Sounds good to me! 👍 cheers.