Created attachment 185042 [details] patch MariaDB 10.2 needs additional include. Also, ssl is needed: ====> Running Q/A tests (stage-qa) Warning: you need USES=ssl Error: /usr/local/sbin/mydumper is linked to /usr/local/lib/libiconv.so.2 from converters/libiconv but it is not declared as a dependency The port builds fine on Poudriere with 10.3-RELEASE (with default MySQL 5.6 and MariaDB 10.2).
I think the stage-qa result is false positive. mydumper itself does not use iconv or ssl. Those dependencies are brought from USES=gnome and USES=mysql. I do not understand the patch as I see '#include "mysql_version.h"' in include/mysql.h in mariadb 10.2 tarball.
(In reply to Po-Chuan Hsieh from comment #1) You may be right about USES, but I have errors building against MariaDB 10.2: (00:00:46) ===> Building for mydumper-0.9.1 (00:00:47) [1/6] /usr/bin/cc -I/usr/local/include/mysql -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -O3 -g -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -fstack-protector -fno-strict-aliasing -MD -MT CMakeFiles/mydumper.dir/server_detect.c.o -MF CMakeFiles/mydumper.dir/server_detect.c.o.d -o CMakeFiles/mydumper.dir/server_detect.c.o -c server_detect.c (00:00:47) [2/6] /usr/bin/cc -I/usr/local/include/mysql -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -O3 -g -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -fstack-protector -fno-strict-aliasing -MD -MT CMakeFiles/myloader.dir/myloader.c.o -MF CMakeFiles/myloader.dir/myloader.c.o.d -o CMakeFiles/myloader.dir/myloader.c.o -c myloader.c (00:00:47) FAILED: CMakeFiles/myloader.dir/myloader.c.o (00:00:47) /usr/bin/cc -I/usr/local/include/mysql -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -O3 -g -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -fstack-protector -fno-strict-aliasing -MD -MT CMakeFiles/myloader.dir/myloader.c.o -MF CMakeFiles/myloader.dir/myloader.c.o.d -o CMakeFiles/myloader.dir/myloader.c.o -c myloader.c (00:00:47) myloader.c:117:61: error: use of undeclared identifier 'MYSQL_SERVER_VERSION' (00:00:47) g_print("myloader %s, built against MySQL %s\n", VERSION, MYSQL_SERVER_VERSION); (00:00:47) ^ (00:00:47) 1 error generated. (00:00:47) [3/6] /usr/bin/cc -I/usr/local/include/mysql -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -O3 -g -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -fstack-protector -fno-strict-aliasing -MD -MT CMakeFiles/mydumper.dir/g_unix_signal.c.o -MF CMakeFiles/mydumper.dir/g_unix_signal.c.o.d -o CMakeFiles/mydumper.dir/g_unix_signal.c.o -c g_unix_signal.c (00:00:47) [4/6] /usr/bin/cc -I/usr/local/include/mysql -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -O3 -g -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -fstack-protector -fno-strict-aliasing -MD -MT CMakeFiles/mydumper.dir/mydumper.c.o -MF CMakeFiles/mydumper.dir/mydumper.c.o.d -o CMakeFiles/mydumper.dir/mydumper.c.o -c mydumper.c (00:00:47) FAILED: CMakeFiles/mydumper.dir/mydumper.c.o (00:00:47) /usr/bin/cc -I/usr/local/include/mysql -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wall -Wno-deprecated-declarations -Wunused -Wwrite-strings -Wno-strict-aliasing -Wextra -Wshadow -O3 -g -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -O2 -pipe -DHARDENEDBSD -fPIE -fPIC -fstack-protector -fno-strict-aliasing -MD -MT CMakeFiles/mydumper.dir/mydumper.c.o -MF CMakeFiles/mydumper.dir/mydumper.c.o.d -o CMakeFiles/mydumper.dir/mydumper.c.o -c mydumper.c (00:00:47) mydumper.c:812:61: error: use of undeclared identifier 'MYSQL_SERVER_VERSION' (00:00:47) g_print("mydumper %s, built against MySQL %s\n", VERSION, MYSQL_SERVER_VERSION); (00:00:47) ^ (00:00:47) 1 error generated.
(In reply to Po-Chuan Hsieh from comment #1) And there's actually no such include in ${PREFIX}/include/mysql/mysql.h: root@db:~ # grep mysql_version.h /usr/local/include/mysql/mysql.h root@db:~ #
(In reply to Piotr Kubaj from comment #3) You're correct. I checked mariadb102-client-10.2.7.txz, mysql.h includes mariadb_version.h but MYSQL_SERVER_VERSION is only defined in mysql_version.h. IMHO, it'd be better to patch MariaDB 10.2 client rather than individual ports. brnrd@ (MariaDB 10.2 maintainer) is cc'd. He might give some advice/comment for this. Thanks in advance.
Hadn't tested but happy that the other commit fixes this too!
(In reply to Bernard Spil from comment #5) Except that it doesn't :) That was another issue, which appeared after upgrade to 10.2.9. The issue in this report still needs to be addressed.
The problem is changed. Though mysql_version.h is included in mariadb102-client now, MYSQL_SERVER_VERSION is not defined in mysql_version.h of mariadb102-client-10.2.9_1. % pkg info -x mariadb mariadb102-client-10.2.9_1 % grep MYSQL_SERVER_VERSION `pkg info -lqx mariadb` %
(In reply to Po-Chuan Hsieh from comment #7) Why would a -client port define MYSQL_SERVER_VERSION?
The build failure is due to the missing/undefined MYSQL_SERVER_VERSION. % grep MYSQL_SERVER_VERSION `pkg info -lq mysql57-client` /usr/local/include/mysql/mysql_version.h:#define MYSQL_SERVER_VERSION "5.7.20"
Created attachment 187459 [details] svn diff for databases/mydumper (In reply to Po-Chuan Hsieh from comment #9) Yes, that I see. When going through the code, I noticed that all it is used for is to show version output from the binary. This warrants a problem report upstream, it is not linking server but to the client(-libraries) Reported upstream https://github.com/maxbube/mydumper/pull/71
Upstream merged the patch I supplied. Looks like that's part of the 0.9.5 version which was recently updated in ports too. This PR probably can be closed?
Thanks for fixing it. :)