[MDEV-6862] "#error <my_config.h>" and third-party libraries Created: 2014-10-10  Updated: 2014-12-01  Resolved: 2014-11-19

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 5.5.40
Fix Version/s: 5.5.41, 10.0.15

Type: Bug Priority: Critical
Reporter: Sergei Golubchik Assignee: Sergei Golubchik
Resolution: Fixed Votes: 2
Labels: None

Issue Links:
Relates
relates to MDEV-5120 Test suite test maria-no-logging fails Closed

 Description   

The safety check in my_config.h ensures that this file is always included before system headers.

But when my_config.h is installed, this breaks compilation of various third-party projects. In particular, mysql-python doesn't compile anymore.

While technically forcing my_config.h first is correct and mysql-python doesn't break by a sheer luck and, we still cannot force all third-party projects to include files correctly.

This check has to be relaxed.



 Comments   
Comment by Brian Evans [ 2014-10-17 ]

Does not seem to affect 10.0.14

Comment by Sergei Golubchik [ 2014-10-17 ]

Yes, it was merged into 10.0 after 10.014 release. So it's important to fix it before 10.10.15

Comment by Hello World! [ 2014-10-20 ]

cPanel EasyApache fails to build/update Apache because of this bug, the error is:

/usr/include/mysql/my_config.h:654:2: error: #error <my_config.h> MUST be included first!

Comment by azurit [ 2014-10-28 ]

please revert this also in 5.5 branch

Comment by Mark Winterbottom [ 2014-10-30 ]

Hey, this seems to be a problem when installing MySQL-Python on Debian 7. Is there a plan to fix it? Cheers.

Comment by azurit [ 2014-10-30 ]

The workaround is to downgrade to 5.5.39, install MySQL-python and upgrade back to 5.5.40 (or newer).

Comment by Mark Winterbottom [ 2014-10-30 ]

Thanks. We got it to install by commenting out these lines in /usr/include/mysql/my_config.h:654

#ifdef __GLIBC__
#error <my_config.h> MUST be included first!
#endif

Comment by Robert Buchholz [ 2014-11-21 ]

Downstream bug for RHEL 7:
https://bugzilla.redhat.com/show_bug.cgi?id=1166603

Upstream bug for MySQL-python:
https://github.com/farcepest/MySQLdb1/issues/80

Generated at Thu Feb 08 07:15:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.