Bug 1474764

Summary: perl-DBD-MySQL-4.043-2.fc27 FTBFS: mysql.xs:827:29: error: 'MYSQL_OPT_NET_BUFFER_LENGTH' undeclared
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: mariadbAssignee: Adam Williamson (Fedora) <rhbz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dciabrin, hhorak, jplesnik, jstanek, mbayer, mkocka, mmuzila, mschorm, perl-devel, praiskup, rhbz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://apps.fedoraproject.org/koschei/build/3109874
See Also: https://jira.mariadb.org/browse/MDEV-13370
Whiteboard:
Fixed In Version: mariadb-10.2.7-6.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-26 07:51:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Pisar 2017-07-25 11:08:00 UTC
perl-DBD-MySQL-4.043-2.fc27 fails to build in F27:

gcc -c  -I/usr/lib64/perl5/vendor_perl/auto/DBI -I/usr/include/mysql -DDBD_MYSQL_WITH_SSL -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1   -DVERSION=\"4.043\" -DXS_VERSION=\"4.043\" -fPIC "-I/usr/lib64/perl5/CORE"   mysql.c
mysql.c: In function 'XS_DBD__mysql__db__login':
mysql.c:302:7: warning: variable 'attribs' set but not used [-Wunused-but-set-variable]
  SV * attribs;
       ^~~~~~~
mysql.xs: In function 'XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:827:6: warning: implicit declaration of function 'mysql_get_option'; did you mean 'mysql_options'? [-Wimplicit-function-declaration]
      mysql_get_option(NULL, MYSQL_OPT_NET_BUFFER_LENGTH, &buffer_len);
      ^~~~~~~~~~~~~~~~
      mysql_options
mysql.xs:827:29: error: 'MYSQL_OPT_NET_BUFFER_LENGTH' undeclared (first use in this function); did you mean 'MYSQL_OPT_SSL_CRLPATH'?
      mysql_get_option(NULL, MYSQL_OPT_NET_BUFFER_LENGTH, &buffer_len);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                             MYSQL_OPT_SSL_CRLPATH
mysql.xs:827:29: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:353: mysql.o] Error 1

This is triggered by upgrading mariadb-devel from 3:10.2.7-4.fc27 to 3:10.2.7-5.fc27:

The new mariadb changelog:

* Fri Jul 21 2017 Adam Williamson <awilliam> - 3:10.2.7-5 - Install correct headers (server, not client) - MDEV-13370

Comment 1 Petr Pisar 2017-07-25 11:29:32 UTC
The 10.2.7-5.fc27 is broken. It's /usr/include/mysql/mysql.h does not declare MYSQL_OPT_NET_BUFFER_LENGTH. Reassigning to mariadb.

Comment 2 Adam Williamson (Red Hat non-Fedora) 2017-07-25 16:08:49 UTC
Gah, you're right...four items were added to the mysql_option enum in the libmariadb mysql.h , but not the top-level mysql.h :/ So we're between a rock and a hard place with this mess (that is, https://jira.mariadb.org/browse/MDEV-13370 ). I'll go ahead and revert my change, then - if both choices have problems, we may as well stick to the upstream problems.

Comment 3 Adam Williamson (Red Hat non-Fedora) 2017-07-25 22:36:34 UTC
I've done that, so this should build now.

Comment 4 Petr Pisar 2017-07-26 07:51:58 UTC
Thanks. I confirm my package builds again.