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

Errors while compiling mysql.cc on macOS with Xcode 9.4.1 (readline related it seems)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.7.2, 10.6
    • 10.6
    • Compiling

    Description

      I've got the following errors (after patching current 10.6 from GitHub to fix MDEV-27402 as described there):

      ...
      [ 99%] Building CXX object client/CMakeFiles/mariadb.dir/completion_hash.cc.o
      [ 99%] Building CXX object client/CMakeFiles/mariadb.dir/mysql.cc.o
      /Users/Valerii/git/server/client/mysql.cc:2747:59: error: expected expression
        rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_co...
                                                                ^
      /Users/Valerii/git/server/client/mysql.cc:2747:38: error: use of undeclared
            identifier 'rl_completion_func_t'; did you mean 'rl_completion_matches'?
        rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_co...
                                           ^~~~~~~~~~~~~~~~~~~~
                                           rl_completion_matches
      /usr/include/editline/readline.h:202:16: note: 'rl_completion_matches' declared
            here
      char           **rl_completion_matches(const char *, rl_compentry_func_t *);
                       ^
      /Users/Valerii/git/server/client/mysql.cc:2748:33: error: assigning to
            'Function *' (aka 'int (*)(const char *, int)') from incompatible type
            'rl_compentry_func_t *' (aka 'char *(*)(const char *, int)'): different
            return type ('int' vs 'char *')
        rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /Users/Valerii/git/server/client/mysql.cc:2750:3: error: no matching function
            for call to 'rl_add_defun'
        rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1);
        ^~~~~~~~~~~~
      /usr/include/editline/readline.h:195:7: note: candidate function not viable: no
            known conversion from 'rl_command_func_t *' (aka 'int (*)(int, int)') to
            'Function *' (aka 'int (*)(const char *, int)') for 2nd argument
      int              rl_add_defun(const char *, Function *, int);
                       ^
      4 errors generated.
      make[2]: *** [client/CMakeFiles/mariadb.dir/mysql.cc.o] Error 1
      make[1]: *** [client/CMakeFiles/mariadb.dir/all] Error 2
      make: *** [all] Error 2
      Yuliyas-Air:buildtmp Valerii$ cd ..
      Yuliyas-Air:server Valerii$ git log -1
      commit 21778b8aa88280458f2196aab93044149cf0a18c (HEAD -> 10.6, origin/10.6)
      Merge: 764ca7e6e75 66465914c1a
      Author: Marko M<C3><A4>kel<C3><A4> <marko.makela@mariadb.com>
      Date:   Thu Jan 20 07:39:11 2022 +0200
       
          Merge 10.5 into 10.6
      Yuliyas-Air:server Valerii$ git diff
      diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
      index 8ab28e4d84f..3af40d2b418 100644
      --- a/storage/innobase/include/fil0fil.h
      +++ b/storage/innobase/include/fil0fil.h
      @@ -1545,7 +1545,7 @@ inline void fil_space_t::reacquire()
       inline bool fil_space_t::set_stopping_check()
       {
         mysql_mutex_assert_owner(&fil_system.mutex);
      -#if defined __clang_major__ && __clang_major__ < 10
      +#if (defined __clang_major__ && __clang_major__ < 10) || defined __APPLE_CC__
         /* Only clang-10 introduced support for asm goto */
         return n_pending.fetch_or(STOPPING, std::memory_order_relaxed) & STOPPING;
       #elif defined __GNUC__ && (defined __i386__ || defined __x86_64__)
      

      The following cmake command line was used:

      Yuliyas-Air:buildtmp Valerii$ cmake .. -DCMAKE_INSTALL_PREFIX=/Users/Valerii/dbs/maria10.6 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DPLUGIN_TOKUDB=NO -DWITH_SSL=/opt/local/libexec/openssl11 -DENABLE_DTRACE=1
      

      Attachments

        Activity

          People

            shulga Dmitry Shulga
            valerii Valerii Kravchuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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