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

Broken strict-aliasing rules in /storage/maria/ma_recovery.c prevents from bulding

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.1.40, 10.4.5
    • 10.4
    • None
    • Ubuntu 14.04 LTS 64-bit, Ubuntu 16.04.6 LTS 64-bit

    Description

      Today's 10.4 (and 10.1, of what tested so far) code from GitHub can not be build successfully on up to date Ubuntu 14.04:

      openxs@ao756:~/git/server$ git branch
        10.0
        10.1
        10.2
        10.3
      * 10.4
        bb-10.2-compatibility
        bb-10.2-marko
      openxs@ao756:~/git/server$ uname -a
      Linux ao756 3.13.0-168-generic #218-Ubuntu SMP Thu Mar 14 16:56:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
      openxs@ao756:~/git/server$
      openxs@ao756:~/git/server$ gcc --version
      gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
      Copyright (C) 2013 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
       
      openxs@ao756:~/git/server$ git log -1
      commit d18ef804bb5d9d473055a2fdc04f74e175a8e9cd
      Author: seppo <seppo.jaakola@iki.fi>
      Date:   Fri May 3 10:13:32 2019 +0300
       
          MDEV-18552 MDEV-18699 allowing SR only in galera 4 cluster (#1293)
       
          Streaming replication must be allowed only in a cluster, where all nodes
          have  Galera 4 capability
      

      cmake command line is usual (for me):

      openxs@ao756:~/git/server$ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system -DWITH_ZLIB=bundled -DMYSQL_MAINTAINER_MODE=0 -DENABLED_LOCAL_INFILE=1 -DWITH_JEMALLOC=system -DWITH_INNODB_DISALLOW_WRITES=ON -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/maria10.4
      ...
      -- Looking for event.h - not found
      -- Found BISON: /usr/bin/bison (found suitable version "3.0.2", minimum required is "2.0")
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /home/openxs/git/server
      

      When I try to make it always fails like this:

      openxs@ao756:~/git/server$ make
      ...
      [ 18%] Built target innobase
      [ 21%] Built target myisam
      [ 21%] Building C object storage/maria/CMakeFiles/aria.dir/ma_recovery.c.o
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_REDO_LOGREC_REDO_REPAIR_TABLE’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:1178:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         param.testflag= uint8korr(rec->header + FILEID_STORE_SIZE);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c:1183:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         info->s->state.key_map= uint8korr(rec->header + FILEID_STORE_SIZE + 8);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_REDO_LOGREC_UNDO_ROW_INSERT’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:1910:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
             share->state.state.checksum+= ha_checksum_korr(buff);
             ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_REDO_LOGREC_UNDO_ROW_DELETE’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:1947:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
             share->state.state.checksum+= ha_checksum_korr(buff);
             ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_REDO_LOGREC_UNDO_ROW_UPDATE’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:1981:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
             share->state.state.checksum+= ha_checksum_korr(buff);
             ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_REDO_LOGREC_CLR_END’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2150:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_UNDO_LOGREC_UNDO_ROW_INSERT’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2272:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         LSN previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_UNDO_LOGREC_UNDO_ROW_DELETE’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2329:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         LSN previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_UNDO_LOGREC_UNDO_ROW_UPDATE’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2368:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         LSN previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_UNDO_LOGREC_UNDO_KEY_INSERT’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2407:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         LSN previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_UNDO_LOGREC_UNDO_KEY_DELETE’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2448:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         LSN previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_UNDO_LOGREC_UNDO_KEY_DELETE_WITH_ROOT’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2489:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         LSN previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘exec_UNDO_LOGREC_UNDO_BULK_INSERT’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:2530:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         LSN previous_undo_lsn= lsn_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘get_MARIA_HA_from_REDO_record’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:3074:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         sid= fileid_korr(rec->header);
         ^
      /home/openxs/git/server/storage/maria/ma_recovery.c: In function ‘get_MARIA_HA_from_UNDO_record’:
      /home/openxs/git/server/storage/maria/ma_recovery.c:3175:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
         sid= fileid_korr(rec->header + LSN_STORE_SIZE);
         ^
      cc1: all warnings being treated as errors
      make[2]: *** [storage/maria/CMakeFiles/aria.dir/ma_recovery.c.o] Error 1
      make[1]: *** [storage/maria/CMakeFiles/aria.dir/all] Error 2
      make: *** [all] Error 2
      openxs@ao756:~/git/server$
      

      It was not the case last time I tried on this same box:

      openxs@ao756:~/git/server$ ~/dbs/maria10.4/bin/mysqld --version
      /home/openxs/dbs/maria10.4/bin/mysqld  Ver 10.4.4-MariaDB-log for Linux on x86_64 (Source distribution)
      openxs@ao756:~/git/server$ ~/dbs/maria10.1/bin/mysqld --version
      /home/openxs/dbs/maria10.1/bin/mysqld  Ver 10.1.39-MariaDB for Linux on x86_64 (Source distribution)
      

      so i suspect some regression.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              valerii Valerii Kravchuk
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.