Bug 1474764 - perl-DBD-MySQL-4.043-2.fc27 FTBFS: mysql.xs:827:29: error: 'MYSQL_OPT_NET_BUFFER_LENGTH' undeclared
perl-DBD-MySQL-4.043-2.fc27 FTBFS: mysql.xs:827:29: error: 'MYSQL_OPT_NET_BUF...
Product: Fedora
Classification: Fedora
Component: mariadb (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Adam Williamson
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-07-25 07:08 EDT by Petr Pisar
Modified: 2017-07-26 03:51 EDT (History)
11 users (show)

See Also:
Fixed In Version: mariadb-10.2.7-6.fc27
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-07-26 03:51:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2017-07-25 07:08:00 EDT
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.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.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@redhat.com> - 3:10.2.7-5 - Install correct headers (server, not client) - MDEV-13370
Comment 1 Petr Pisar 2017-07-25 07:29:32 EDT
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 2017-07-25 12:08:49 EDT
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 2017-07-25 18:36:34 EDT
I've done that, so this should build now.
Comment 4 Petr Pisar 2017-07-26 03:51:58 EDT
Thanks. I confirm my package builds again.

Note You need to log in before you can comment on or make changes to this bug.