Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.7
    • Server
    • None

    Description

      Since 10.4 requires C++11 capable compiler, gcc sync builtins became dead code. Remove relevant cmake checks and cleanup include files.

      Attachments

        Activity

          svoj Sergey Vojtovich created issue -
          robertbindar Robert Bindar made changes -
          Field Original Value New Value
          Fix Version/s 10.4.7 [ 23720 ]
          Fix Version/s 10.4 [ 22408 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          VVD VVD added a comment - - edited

          This change broke build on FreeBSD i386 (12.0 and 12.1):
          In file included from /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/mysys/my_new.cc:25:
          In file included from /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/mysys/mysys_priv.h:20:
          In file included from /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/include/my_sys.h:34:
          /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/include/my_pthread.h:822:10: error: use of undeclared
          identifier 'my_atomic_add32'
          (void) my_atomic_add32_explicit(value, 1, MY_MEMORY_ORDER_RELAXED);
          ^
          /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/include/my_atomic.h:153:43: note: expanded from macro
          'my_atomic_add32_explicit'
          #define my_atomic_add32_explicit(P, A, O) my_atomic_add32((P), (A))

          Details are here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239981#c2

          VVD VVD added a comment - - edited This change broke build on FreeBSD i386 (12.0 and 12.1): In file included from /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/mysys/my_new.cc:25: In file included from /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/mysys/mysys_priv.h:20: In file included from /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/include/my_sys.h:34: /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/include/my_pthread.h:822:10: error: use of undeclared identifier 'my_atomic_add32' (void) my_atomic_add32_explicit(value, 1, MY_MEMORY_ORDER_RELAXED); ^ /usr/obj/usr/ports/databases/mariadb104-client/work/mariadb-10.4.7/include/my_atomic.h:153:43: note: expanded from macro 'my_atomic_add32_explicit' #define my_atomic_add32_explicit(P, A, O) my_atomic_add32((P), (A)) Details are here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239981#c2

          VVD, no surprise if that's gcc 4.2. Wasn't clang default FreeBSD compiler?

          svoj Sergey Vojtovich added a comment - VVD , no surprise if that's gcc 4.2. Wasn't clang default FreeBSD compiler?
          VVD VVD added a comment -

          clang 8.0.1 is in 12.1, clang 6.0 is in 12.0. gcc 9.2.0 installed too.
          But it build fine on same version of FreeBSD (12.0 and 12.1) but amd64. Only difference is arch - i386 vs amd64.

          VVD VVD added a comment - clang 8.0.1 is in 12.1, clang 6.0 is in 12.0. gcc 9.2.0 installed too. But it build fine on same version of FreeBSD (12.0 and 12.1) but amd64. Only difference is arch - i386 vs amd64.

          VVD, we observed similar problem on CentOS 5 amd64 vs x86, where we had gcc 4.1.

          Could you identify which compiler version triggered this failure?

          svoj Sergey Vojtovich added a comment - VVD , we observed similar problem on CentOS 5 amd64 vs x86, where we had gcc 4.1. Could you identify which compiler version triggered this failure?
          VVD VVD added a comment -

          – Running cmake version 3.15.5
          – The C compiler identification is Clang 8.0.1
          – The CXX compiler identification is Clang 8.0.1
          – Check for working C compiler: /usr/bin/cc
          – Check for working C compiler: /usr/bin/cc – works
          – Detecting C compiler ABI info
          – Detecting C compiler ABI info - done
          – Detecting C compile features
          – Detecting C compile features - done
          – Check for working CXX compiler: /usr/bin/c++
          – Check for working CXX compiler: /usr/bin/c++ – works

          $ /usr/bin/cc --version
          FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
          Target: i386-unknown-freebsd12.1
          Thread model: posix
          InstalledDir: /usr/bin
          $ /usr/bin/c++ --version
          FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
          Target: i386-unknown-freebsd12.1
          Thread model: posix
          InstalledDir: /usr/bin

          VVD VVD added a comment - – Running cmake version 3.15.5 – The C compiler identification is Clang 8.0.1 – The CXX compiler identification is Clang 8.0.1 – Check for working C compiler: /usr/bin/cc – Check for working C compiler: /usr/bin/cc – works – Detecting C compiler ABI info – Detecting C compiler ABI info - done – Detecting C compile features – Detecting C compile features - done – Check for working CXX compiler: /usr/bin/c++ – Check for working CXX compiler: /usr/bin/c++ – works $ /usr/bin/cc --version FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1) Target: i386-unknown-freebsd12.1 Thread model: posix InstalledDir: /usr/bin $ /usr/bin/c++ --version FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1) Target: i386-unknown-freebsd12.1 Thread model: posix InstalledDir: /usr/bin

          Alright, it is something different. clang 7.0 is recent enough to support everything we need, but there was some change wrt atomic handling on 32bit systems. There're quite a few FreeBSD bug reports about it, e.g. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888

          It is unlikely, but I wonder if this change is going to help?
          https://salsa.debian.org/mariadb-team/mariadb-10.3/blob/master/debian/patches/c11_atomics.patch

          Not sure how sync builtins worked in this case, but they're in no way less buggy than what was described in bug 230888. Even worse they lack atomic load/store, which are heavily used by MariaDB. Remember that famous data race of 64bit variable update on 32bit system...

          svoj Sergey Vojtovich added a comment - Alright, it is something different. clang 7.0 is recent enough to support everything we need, but there was some change wrt atomic handling on 32bit systems. There're quite a few FreeBSD bug reports about it, e.g. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888 It is unlikely, but I wonder if this change is going to help? https://salsa.debian.org/mariadb-team/mariadb-10.3/blob/master/debian/patches/c11_atomics.patch Not sure how sync builtins worked in this case, but they're in no way less buggy than what was described in bug 230888. Even worse they lack atomic load/store, which are heavily used by MariaDB. Remember that famous data race of 64bit variable update on 32bit system...
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 97358 ] MariaDB v4 [ 133984 ]

          People

            robertbindar Robert Bindar
            svoj Sergey Vojtovich
            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.