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

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.19-galera, 10.1.4
    • 10.0.20
    • Compiling
    • None
    • 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.

      Attachments

        Activity

          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.

          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.
          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'

          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'

          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 serg for consideration and final decision.

          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 serg for consideration and final decision.

          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?

          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?

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

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

          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".

          ryandesign Ryan Carsten 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" .

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

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

          People

            serg Sergei Golubchik
            BjarneDM Bjarne D Mathiesen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.