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

use of undeclared identifier 'pthread_mutex_timedlock' in Mac OS

    XMLWordPrintable

Details

    Description

      Hi everyone,

      We are trying to build the latest version of MariaDB 10.1.x (10.1.31) and we are running into this error message when running the make command:

      /output_directory/src/mariadb-10.1.31/storage/tokudb/PerconaFT/ft/txn/txn.cc:271:19: warning: missing field '__opaque' initializer [-Wmissing-field-initializers]
          .state_cond = ZERO_COND_INITIALIZER,  // Not TOKU_COND_INITIALIZER
                        ^
      /output_directory/src/mariadb-10.1.31/storage/tokudb/PerconaFT/portability/toku_pthread.h:167:13: note: expanded from macro 'ZERO_COND_INITIALIZER'
              { 0 }                 \
                  ^
      /output_directory/src/mariadb-10.1.31/storage/tokudb/PerconaFT/ft/txn/txn.cc:271:19: warning: missing field 'psi_cond' initializer [-Wmissing-field-initializers]
      /output_directory/src/mariadb-10.1.31/storage/tokudb/PerconaFT/portability/toku_pthread.h:168:5: note: expanded from macro 'ZERO_COND_INITIALIZER'
          }
          ^
      2 warnings generated.
      /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libtokufractaltree_static.a(tokufractaltree_static_depends.cc.o) has no symbols
      /Library/Developer/CommandLineTools/usr/bin/ranlib: file: libtokufractaltree_static.a(tokufractaltree_static_depends.cc.o) has no symbols
      warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: warning for library: libtokufractaltree_static.a the table of contents is empty (no object file members in the library define global symbols)
      /Library/Developer/CommandLineTools/usr/bin/libtool: warning same member name (loader.cc.o) in output file used for input files: /output_directory/src/mariadb-10.1.31/storage/tokudb/PerconaFT/ft/libft_static.a(loader.cc.o) and: /output_directory/src/mariadb-10.1.31/storage/tokudb/PerconaFT/src/libtokudb_static_conv.a(loader.cc.o) due to use of basename, truncation and blank padding
      In file included from /output_directory/src/mariadb-10.1.31/storage/tokudb/ha_tokudb.cc:26:
      In file included from /output_directory/src/mariadb-10.1.31/storage/tokudb/hatoku_hton.h:29:
      In file included from /output_directory/src/mariadb-10.1.31/storage/tokudb/hatoku_defines.h:36:
      /output_directory/src/mariadb-10.1.31/sql/sql_class.h:5196:5: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
          register ulonglong max_elems_in_tree=
          ^~~~~~~~~
      In file included from /output_directory/src/mariadb-10.1.31/storage/tokudb/ha_tokudb.cc:26:
      In file included from /output_directory/src/mariadb-10.1.31/storage/tokudb/hatoku_hton.h:33:
      /output_directory/src/mariadb-10.1.31/storage/tokudb/tokudb_thread.h:377:13: error: use of undeclared identifier 'pthread_mutex_timedlock'
          int r = pthread_mutex_timedlock(&_mutex, &waittime);
                  ^
      /output_directory/src/mariadb-10.1.31/storage/tokudb/tokudb_thread.h:485:13: error: use of undeclared identifier 'pthread_mutex_timedlock'
          int r = pthread_mutex_timedlock(&_mutex, &waittime);
                  ^
      1 warning and 2 errors generated.
      make[2]: *** [storage/tokudb/CMakeFiles/tokudb.dir/ha_tokudb.cc.o] Error 1
      make[1]: *** [storage/tokudb/CMakeFiles/tokudb.dir/all] Error 2
      make: *** [all] Error 2
      

      As you can see, there are some undeclared variables during the execution of the make command that make the compilation to fail. We noticed that there were a lot of changes between MariaDB 10.1.30 and 10.1.31 to update TokuDB from `5.6.37-82.2` to `5.6.38-83.0`. In order to fix the issue, we took the lines from the previous MariaDB version that set that variable (see attached file)

      Information about the different components we are using to build MariaDB:

      • System Version: OS X 10.10.5
      • cmake: 3.6.1
      • make: 3.81
      • clang: Apple LLVM version 7.0.2 (clang-700.1.81)

      Attachments

        Issue Links

          Activity

            People

              cvicentiu Vicențiu Ciorbaru
              jota Jota
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.