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

writable-string error on OSX with 10.4.8

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.4.8, 10.3(EOL)
    • 10.3.19, 10.4.9
    • Compiling
    • None
    • 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

            anel Anel Husakovic
            Shelnutt2 Seth Shelnutt
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.