Details

    • Bug
    • Status: Stalled (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.15, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
    • 10.5
    • Compiling, Server
    • None
    • Fedora 30
      Debian GNU/Linux unstable, GCC 9.2.1

    Description

      While 10.3.12 debug build passed without any problem, 10.3.15 has several compilation time errors.

      A workaround exists - add some "-Wno-error" to CFLAGS.


      Build commands:

      /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON . -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DINSTALL_LAYOUT=RPM -DDAEMON_NAME=mariadb -DDAEMON_NO_PREFIX=mariadb -DLOG_LOCATION=/var/log/mariadb/mariadb.log -DPID_FILE_DIR=/run/mariadb -DNICE_PROJECT_NAME=MariaDB -DRPM=fedora30 -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_SYSCONFDIR=/etc -DINSTALL_SYSCONF2DIR=/etc/my.cnf.d -DINSTALL_DOCDIR=share/doc/mariadb -DINSTALL_DOCREADMEDIR=share/doc/mariadb -DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_INFODIR=share/info -DINSTALL_LIBDIR=lib64 -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mariadb -DINSTALL_MYSQLTESTDIR=share/mysql-test -DINSTALL_PLUGINDIR=lib64/mariadb/plugin -DINSTALL_SBINDIR=libexec -DINSTALL_SCRIPTDIR=bin -DINSTALL_SQLBENCHDIR=share -DINSTALL_SUPPORTFILESDIR=share/mariadb -DINSTALL_PCDIR=lib64/pkgconfig -DMYSQL_DATADIR=/var/lib/mysql -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DTMPDIR=/var/tmp -DENABLED_LOCAL_INFILE=ON -DENABLE_DTRACE=ON -DSECURITY_HARDENED=ON -DWITH_WSREP=ON -DWITH_INNODB_DISALLOW_WRITES=ON -DWITH_EMBEDDED_SERVER=ON -DWITH_MARIABACKUP=ON -DWITH_UNIT_TESTS=ON -DCONC_WITH_SSL=NO -DWITH_SSL=system -DWITH_ZLIB=system -DWITH_JEMALLOC=yes -DLZ4_LIBS=/usr/lib64/liblz4.so -DLZ4_LIBS=/usr/lib64/liblz4.so -DWITH_INNODB_LZ4=ON -DWITH_ROCKSDB_LZ4=ON -DPLUGIN_MROONGA=DYNAMIC -DPLUGIN_OQGRAPH=DYNAMIC -DPLUGIN_CRACKLIB_PASSWORD_CHECK=DYNAMIC -DPLUGIN_ROCKSDB=DYNAMIC -DPLUGIN_SPHINX=DYNAMIC -DPLUGIN_TOKUDB=DYNAMIC -DPLUGIN_CONNECT=DYNAMIC -DPYTHON_SHEBANG=/usr/bin/python3 -DPLUGIN_CACHING_SHA2_PASSWORD=OFF -DPLUGIN_AWS_KEY_MANAGEMENT=NO -DCONNECT_WITH_MONGO=OFF -DCONNECT_WITH_JDBC=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=OFF -DWITH_INNODB_EXTRA_DEBUG=ON -DWITH_VALGRIND=ON
       
      make -j6 VERBOSE=1
      


      1)
      Problem: "-Werror=deprecated-copy"

      2)
      Problem: "-Werror=pessimizing-move" "-Werror=maybe-uninitialized" "-Werror=format-overflow="

      .
      That's it for x86_64.
      However, on armv7hl, there's more:
      .

      3)
      Problem: "-Werror=shift-count-overflow"

      4)
      Problem: "-Werror=format"


      So I end up with:

      CFLAGS="$CFLAGS -Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=maybe-uninitialized -Wno-error=format-overflow"
      CFLAGS="$CFLAGS -Wno-error=shift-count-overflow -Wno-error=format"
      


      I'm attaching build logs for each failure.
      It's likely, those issuses will be on more places, those are just the first encountered.

      In the attached root.log you can find packages in the buildroot for armv7hl build. (usefull for getting version of GCC, make, cmake, ...)

      Attachments

        1. 1.log
          678 kB
        2. 2.log
          6.75 MB
        3. 3.log
          345 kB
        4. 4.log
          4.42 MB
        5. root.log
          108 kB

        Issue Links

          Activity

            In 10.4, MDEV-5313 and MDEV-16188 introduced some type mismatch, triggering GCC 10 -Wenum-conversion and clang 10 -Wimplicit-int-float-conversion.

            marko Marko Mäkelä added a comment - In 10.4, MDEV-5313 and MDEV-16188 introduced some type mismatch, triggering GCC 10 -Wenum-conversion and clang 10 -Wimplicit-int-float-conversion .

            It looks like my fixes for GCC 10 and clang 10 could reach the 10.5.2 release after all. But I am building a very limited set of storage engines.

            marko Marko Mäkelä added a comment - It looks like my fixes for GCC 10 and clang 10 could reach the 10.5.2 release after all. But I am building a very limited set of storage engines.

            In my experience, cmake -DWITH_ASAN=ON will cause GCC to emit even more warnings. I just fixed one -Wmaybe-uninitialized in 10.2 that was flagged by GCC for an 10.5 ASAN build. I also have the feeling that GCC is reporting some bogus -Wstringop-overflow when -fsanitize=address is enabled.

            marko Marko Mäkelä added a comment - In my experience, cmake -DWITH_ASAN=ON will cause GCC to emit even more warnings. I just fixed one -Wmaybe-uninitialized in 10.2 that was flagged by GCC for an 10.5 ASAN build. I also have the feeling that GCC is reporting some bogus -Wstringop-overflow when -fsanitize=address is enabled.

            I think that we should by default enable all warnings, and have MYSQL_MAINTAINER_MODE only enable -Werror. Currently, a debug version of 10.1 cannot be built with GCC 10 or clang 10 because of various -Werror. That would not be changed by me; I think that 10.1 is already too close to its end of life. But, with my pending change, if you specify cmake -DMYSQL_MAINTAINER_MODE=OFF, you will not lose useful warnings. (And we will enjoy those warnings also for non-debug builds by default.)

            marko Marko Mäkelä added a comment - I think that we should by default enable all warnings, and have MYSQL_MAINTAINER_MODE only enable -Werror . Currently, a debug version of 10.1 cannot be built with GCC 10 or clang 10 because of various -Werror . That would not be changed by me; I think that 10.1 is already too close to its end of life. But, with my pending change, if you specify cmake -DMYSQL_MAINTAINER_MODE=OFF , you will not lose useful warnings. (And we will enjoy those warnings also for non-debug builds by default.)
            Roel Roel Van de Paar added a comment - - edited

            Just small note to confirm that 10.1, debug, can not be build with GCC 7.5.0 without `-DMYSQL_MAINTAINER_MODE=OFF`:

            10.1.45 c8e0c524af83149e77c88e9a6fd763221dea9277

            /test/10.1_dbg/storage/myisam/ft_nlq_search.c: In function ‘walk_and_match’:
            /test/10.1_dbg/storage/myisam/ft_nlq_search.c:139:15: error: ‘subkeys.i’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 tmp_weight= subkeys.f;
                 ~~~~~~~~~~^~~~~~~~~~~
            

            Adding `-DMYSQL_MAINTAINER_MODE=OFF` enables the build to complete. Interestingly, `-DMYSQL_MAINTAINER_MODE=0` does not work and still aborts the build as above.

            Roel Roel Van de Paar added a comment - - edited Just small note to confirm that 10.1, debug, can not be build with GCC 7.5.0 without `-DMYSQL_MAINTAINER_MODE=OFF`: 10.1.45 c8e0c524af83149e77c88e9a6fd763221dea9277 /test/10.1_dbg/storage/myisam/ft_nlq_search.c: In function ‘walk_and_match’: /test/10.1_dbg/storage/myisam/ft_nlq_search.c:139:15: error: ‘subkeys.i’ may be used uninitialized in this function [-Werror=maybe-uninitialized] tmp_weight= subkeys.f; ~~~~~~~~~~^~~~~~~~~~~ Adding `-DMYSQL_MAINTAINER_MODE=OFF` enables the build to complete. Interestingly, `-DMYSQL_MAINTAINER_MODE=0` does not work and still aborts the build as above.

            People

              sanja Oleksandr Byelkin
              mschorm Michal Schorm
              Votes:
              0 Vote for this issue
              Watchers:
              9 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.