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

writable-string error on OSX with 10.4.8

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3, 10.4.8
    • Fix Version/s: 10.3.19, 10.4.9
    • Component/s: Compiling
    • Labels:
      None
    • Environment:
      MacOS 10.13, Clang 10

      Description

      MDEV-17609 introduced a change to client/mysql.cc which is causing an error with clang on OSX. We discovered this in our CI building 10.4.8 from source.

      The error we are seeing on OSX is:

      mariadb-10.4.8/client/mysql.cc:2671:21: error: ISO C++11 does not allow conversion from string literal to 'char *' [-Werror,-Wwritable-strings]
        rl_readline_name= "mysql";
      

      It looks like this was fixed in 10.5 with a merge from 10.4. branch but I can't find the actual change included in the 10.4. branch.
      https://github.com/MariaDB/server/commit/edef6a007428599fd249815f1dc59a02428090f4

       rl_readline_name= (char *) "mysql";
      

      The cast to `(char *)` is all that is needed to remove this error from OSX builds.

      I will push a PR to github shortly with this fix for the 10.4 branch.

        Attachments

          Activity

            People

            • Assignee:
              anel Anel Husakovic
              Reporter:
              Shelnutt2 Seth Shelnutt
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: