Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6862

"#error <my_config.h>" and third-party libraries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.5.40
    • Fix Version/s: 10.0.15, 5.5.41
    • Component/s: Compiling
    • Labels:
      None

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              grknight Brian Evans added a comment -

              Does not seem to affect 10.0.14

              Show
              grknight Brian Evans added a comment - Does not seem to affect 10.0.14
              Hide
              serg Sergei Golubchik added a comment -

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

              Show
              serg Sergei Golubchik added a comment - Yes, it was merged into 10.0 after 10.014 release. So it's important to fix it before 10.10.15
              Hide
              guest Hello World! added a comment -

              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!
              
              Show
              guest Hello World! added a comment - 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!
              Hide
              azurit azurit added a comment -

              please revert this also in 5.5 branch

              Show
              azurit azurit added a comment - please revert this also in 5.5 branch
              Hide
              londonappdev Mark Winterbottom added a comment -

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

              Show
              londonappdev Mark Winterbottom added a comment - Hey, this seems to be a problem when installing MySQL-Python on Debian 7. Is there a plan to fix it? Cheers.
              Hide
              azurit azurit added a comment -

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

              Show
              azurit azurit added a comment - The workaround is to downgrade to 5.5.39, install MySQL-python and upgrade back to 5.5.40 (or newer).
              Hide
              londonappdev Mark Winterbottom added a comment - - edited

              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
              
              Show
              londonappdev Mark Winterbottom added a comment - - edited 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
              Hide
              rbu Robert Buchholz added a comment -
              Show
              rbu Robert Buchholz added a comment - 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

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  serg Sergei Golubchik
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 5 minutes
                    5m