Bug 1478739
Summary: | Conflicting headers - regression causing other packages to no longer compile | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mattias Ellert <mattias.ellert> | ||||
Component: | mariadb | Assignee: | Michal Schorm <mschorm> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 27 | CC: | dciabrin, hhorak, jstanek, mattias.ellert, mbayer, mkocka, mmuzila, mschorm, praiskup | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | mariadb-10.2.9-3.fc27 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-10-10 19:29:52 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: | |||||||
Attachments: |
|
Description
Mattias Ellert
2017-08-06 18:03:00 UTC
Hello. With update to MariaDB 10.2, there are two "mysql.h" libraries. /usr/include/mysql.h /usr/include/mysql/mysql.h They are not the same. One is used to build against client, and the other against server. Can you please try to build with the second one? Hope that will solve your issue. There are several issues tracked in this bugzilla, I think you would be able to find simmilar one solved there: https://bugzilla.redhat.com/show_bug.cgi?id=1467297 Created attachment 1313096 [details]
This patch will fix the problem
The problem is that in the new version, the headers /usr/include/mysql/mysql.h and /usr/include/mysql/mysql_time.h are not compatible with each other.
In the previous version /usr/include/mysql/mysql.h contained the line
#include "mysql_time.h"
- and that work just fine.
In the new version, this #include statement has been replaces with a
#ifndef _mysql_time_h_
...
#endif
block. The _mysql_time_h_ macro is the include guard used in /usr/include/mysql/mysql_time.h, so this is supposed to prevent getting duplicate declarations from including both files. But, the new block in mysql.h is missing the corresponding
#define _mysql_time_h_
so this protection only works one way.
The /usr/include/mysql/mysql_time.h header has a
typedef long my_time_t;
that is missing from the new block in mysql.h, so only adding the missing #define will result in complaints about my_time_t being undefined, so the attached patch addresses this to.
Lastly, /usr/include/mysql/mysql_time.h does not #define AUTO_SEC_PART_DIGITS, so the patch moves this statement to after the #ifndef block.
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'. I waited for an upstream fix. With the latest update in rawhide, the reproducer output seems to be: # gcc -I /usr/include/mysql -o test.o -c test.c In file included from test.c:2:0: /usr/include/mysql/my_global.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp] #warning This file should not be included by clients, include only <mysql.h> ^~~~~~~ --- It looks, like the issue was solved by upstream. Can you please confirm this in rawhide, before I move this update to the f27? Yes, it is fixed. Great, thanks! I started preparations to push (some) rawhide changes into F27 and deliver a build. mariadb-10.2.9-3.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-dff1218bfa mariadb-10.2.9-3.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-dff1218bfa mariadb-10.2.9-3.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. |