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

CMAKE failing due to deprecated Apple GSS method

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
    • 10.2.35, 10.3.26, 10.4.16, 10.5.7
    • libmariadb
    • None
    • Mac OS X is Catalina 10.15.6 and XCode Tools 11.6.
      GDB 9.2, GCC (Apple CLang) 11.0.3

    Description

      I followed the steps outlined here:
      https://mariadb.org/get-involved/getting-started-for-developers/get-code-build-test/

      /mariadb/server/libmariadb/plugins/auth/gssapi_client.c:72:12: error: 'gss_import_name' is deprecated: use GSS.framework [-Werror,-Wdeprecated-declarations]
         major= gss_import_name(&minor, &principal_name_buf, GSS_C_NT_USER_NAME, &service_name);
                ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/gssapi/gssapi.h:591:19: note: 'gss_import_name' has been explicitly marked deprecated here
         gss_name_t *) GSSKRB_APPLE_DEPRECATED("use GSS.framework") __API_DEPRECATED("Use GSS.framework", macos(10.0, 10.8)) __API_UNAVAILABLE(macCatalyst); /* output_name */
                       ^
      /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/gssapi/gssapi.h:57:51: note: expanded from macro 'GSSKRB_APPLE_DEPRECATED'
      #define GSSKRB_APPLE_DEPRECATED(x) __attribute__((deprecated(x)))
      

      Attachments

        Activity

          danblack Daniel Black added a comment -

          Hi,

          It seems that this and some other failures, hopefully some of which have been fixed since MDEV-19129 have crept into the MariaDB build.

          There's desperate lack of OSX skill and machines to correct this so I'm wondering given you attempt at building from scratch if you are willing to code a fix for this?

          The libmariadb is a submodule from https://github.com/mariadb-corporation/mariadb-connector-c which is where the fix needs to be coded. This is compilable separately if willing.

          I suspect my freebsd/os fix isn't sufficient for OSX?
          https://github.com/mariadb-corporation/mariadb-connector-c/pull/132

          Otherwise to bypass this error recommend removing the following lines from libmariadb/CMakeLists.txt
          https://github.com/mariadb-corporation/mariadb-connector-c/blob/3.1/CMakeLists.txt#L87-L92
          and
          https://github.com/mariadb-corporation/mariadb-connector-c/blob/3.1/CMakeLists.txt#L393-L402

          Welcome to MariaDB development, if you need a hand, visit our zulip channel - https://mariadb.zulipchat.com.

          If you have any improvement suggestions to https://mariadb.org/get-involved/getting-started-for-developers/get-code-build-test/ please let me know.

          danblack Daniel Black added a comment - Hi, It seems that this and some other failures, hopefully some of which have been fixed since MDEV-19129 have crept into the MariaDB build. There's desperate lack of OSX skill and machines to correct this so I'm wondering given you attempt at building from scratch if you are willing to code a fix for this? The libmariadb is a submodule from https://github.com/mariadb-corporation/mariadb-connector-c which is where the fix needs to be coded. This is compilable separately if willing. I suspect my freebsd/os fix isn't sufficient for OSX? https://github.com/mariadb-corporation/mariadb-connector-c/pull/132 Otherwise to bypass this error recommend removing the following lines from libmariadb/CMakeLists.txt https://github.com/mariadb-corporation/mariadb-connector-c/blob/3.1/CMakeLists.txt#L87-L92 and https://github.com/mariadb-corporation/mariadb-connector-c/blob/3.1/CMakeLists.txt#L393-L402 Welcome to MariaDB development, if you need a hand, visit our zulip channel - https://mariadb.zulipchat.com . If you have any improvement suggestions to https://mariadb.org/get-involved/getting-started-for-developers/get-code-build-test/ please let me know.
          rodfsouza Rodrigo Souza added a comment -

          Hi Daniel,

          Thanks for following up on this, I haven't looked into it deeply yet, but I can own the bug and take a try to come up with a patch for it. I'm still not familiar with the code base, but will get up to speed, another workaround suggested by Sergei was to use cmake -DMYSQL_MAINTAINER_MODE=OFF which seemed have worked on my machine. Yes, please go ahead and assign this bug for me and I'll take a look into it and discuss the options through the ZulipChat or PR.

          Thanks a lot!

          Rodrigo Souza

          rodfsouza Rodrigo Souza added a comment - Hi Daniel, Thanks for following up on this, I haven't looked into it deeply yet, but I can own the bug and take a try to come up with a patch for it. I'm still not familiar with the code base, but will get up to speed, another workaround suggested by Sergei was to use cmake -DMYSQL_MAINTAINER_MODE=OFF which seemed have worked on my machine. Yes, please go ahead and assign this bug for me and I'll take a look into it and discuss the options through the ZulipChat or PR. Thanks a lot! Rodrigo Souza

          In this particular case, gss plugin should automatically use -Wno-error=deprecated-declarations on OSX

          serg Sergei Golubchik added a comment - In this particular case, gss plugin should automatically use -Wno-error=deprecated-declarations on OSX
          danblack Daniel Black added a comment -

          rodfsouza Thanks for taking the first steps with today.
          Notable findings: new api https://developer.apple.com/documentation/gss
          introduced macOS 10.14

          Uncited eol of 10.13 ends support on November 30, 2020 (assumed based on eol intervals).
          https://en.wikipedia.org/wiki/MacOS_version_history#Releases

          Quotes like this, https://www.howtogeek.com/350901/which-releases-of-macos-are-supported-with-security-updates/ " say Apple Has No Official Written Policy". Happy to take more official guidance

          So we might target a wholesale replacement at the scheduled date.

          danblack Daniel Black added a comment - rodfsouza Thanks for taking the first steps with today. Notable findings: new api https://developer.apple.com/documentation/gss introduced macOS 10.14 Uncited eol of 10.13 ends support on November 30, 2020 (assumed based on eol intervals). https://en.wikipedia.org/wiki/MacOS_version_history#Releases Quotes like this, https://www.howtogeek.com/350901/which-releases-of-macos-are-supported-with-security-updates/ " say Apple Has No Official Written Policy". Happy to take more official guidance So we might target a wholesale replacement at the scheduled date.

          A complete rewrite of the gss plugin is not part of this MDEV

          For now let's do like we do with SSL — ignore the "deprecated, rewrite your complete codebase to use non-portable Mac OS X specific libraries" warning.

          For example, something like this

          IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
          MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-declarations")
          ENDIF()
          

          I suspect it needs to be done both in the server (plugin/auth_gssapi) and in C/C

          serg Sergei Golubchik added a comment - A complete rewrite of the gss plugin is not part of this MDEV For now let's do like we do with SSL — ignore the "deprecated, rewrite your complete codebase to use non-portable Mac OS X specific libraries" warning. For example, something like this IF(CMAKE_SYSTEM_NAME MATCHES "Darwin") MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-declarations") ENDIF() I suspect it needs to be done both in the server (plugin/auth_gssapi) and in C/C

          People

            shulga Dmitry Shulga
            rodfsouza Rodrigo Souza
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.