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

compile fails under Mac OS X 10.6.8 due to use of strnlen

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.19-galera, 10.1.4
    • Fix Version/s: 10.0.20
    • Component/s: Compiling
    • Labels:
      None
    • Environment:
    • Sprint:
      10.0.20

      Description

      We had a discussion on the macports developer mailing list & this is the conclusion:

      The mariadb build failures are easy: they're failing because strnlen is not defined. This is correct: strnlen was not part of OS X until 10.7. You should report this problem to the developers of mariadb. They need to either avoid using strnlen, or else provide an implementation of it when the OS does not.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Is 10.6 even supported still?
            I can't find any EOL policy from Apple (and as I understand from some sources, it doesn't seem to have one), but 10.6 is almost 6 years old and is currently n-4, so I have my doubts.

            Show
            elenst Elena Stepanova added a comment - Is 10.6 even supported still? I can't find any EOL policy from Apple (and as I understand from some sources, it doesn't seem to have one), but 10.6 is almost 6 years old and is currently n-4, so I have my doubts.
            Hide
            BjarneDM Bjarne D Mathiesen added a comment - - edited

            10.6 is EOL from Apple ; but it's my impression that many - like me - are still using it on older hardware - in part due to the fact that 10.6 is considered one of the most stable releases of the OS. 10.6 - and older - are still supported by the community through eg macports.

            So it's a question of whether MariaDB wants to address this problem - or - just says 'wontfix'

            Show
            BjarneDM Bjarne D Mathiesen added a comment - - edited 10.6 is EOL from Apple ; but it's my impression that many - like me - are still using it on older hardware - in part due to the fact that 10.6 is considered one of the most stable releases of the OS. 10.6 - and older - are still supported by the community through eg macports. So it's a question of whether MariaDB wants to address this problem - or - just says 'wontfix'
            Hide
            elenst Elena Stepanova added a comment -

            I would vote against supporting an alternative (or non-optimal, if that's what getting rid of strnlen would mean) implementation just for an EOL-ed version of OS X; but maybe there is a solution from which even modern versions could benefit – assigning to Sergei Golubchik for consideration and final decision.

            Show
            elenst Elena Stepanova added a comment - I would vote against supporting an alternative (or non-optimal, if that's what getting rid of strnlen would mean) implementation just for an EOL-ed version of OS X; but maybe there is a solution from which even modern versions could benefit – assigning to Sergei Golubchik for consideration and final decision.
            Hide
            serg Sergei Golubchik added a comment -

            We already have a configure-time check that detects system stnlen and our internal strnlen implementation in strings/strnlen.c that is used if the system one is not available.

            I don't know why it fails in this particular case, may be something in 10.6.8 or macports fools the configure-time check?

            Show
            serg Sergei Golubchik added a comment - We already have a configure-time check that detects system stnlen and our internal strnlen implementation in strings/strnlen.c that is used if the system one is not available. I don't know why it fails in this particular case, may be something in 10.6.8 or macports fools the configure-time check?
            Hide
            BjarneDM Bjarne D Mathiesen added a comment -

            you can find the compile logs here : [#http://www.mathiesen.info/macports/]

            Show
            BjarneDM Bjarne D Mathiesen added a comment - you can find the compile logs here : [#http://www.mathiesen.info/macports/]
            Hide
            ryandesign Ryan Schmidt added a comment -

            The configure check works fine. It correctly determines that the OS does not provide strnlen and compiles your implementation. The problem is that sometime between version 10.1.0 and 10.1.4, an invocation of strnlen was added to storage/connect/xobject.cpp, but the corresponding #include to include your implementation if needed was not also added. Not sure whether it should be #include "strings_def.h" or #include "m_string.h".

            Show
            ryandesign Ryan Schmidt added a comment - The configure check works fine. It correctly determines that the OS does not provide strnlen and compiles your implementation. The problem is that sometime between version 10.1.0 and 10.1.4, an invocation of strnlen was added to storage/connect/xobject.cpp, but the corresponding #include to include your implementation if needed was not also added. Not sure whether it should be #include "strings_def.h" or #include "m_string.h" .
            Hide
            serg Sergei Golubchik added a comment -

            Ah, great, thanks Ryan Schmidt. I think that should be enough for me to fix it.

            Show
            serg Sergei Golubchik added a comment - Ah, great, thanks Ryan Schmidt . I think that should be enough for me to fix it.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                BjarneDM Bjarne D Mathiesen
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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 - 20 minutes
                  20m

                    Agile