[MDEV-25916] Compilation failed for compile-pentium64-gcov script if gcc < 7 Created: 2021-06-14  Updated: 2023-11-22  Resolved: 2023-11-20

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.4, 10.5, 10.6
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Critical
Reporter: Anel Husakovic Assignee: Anel Husakovic
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-25918 xargs: etags: No such file or directo... Open

 Description   

$ gcc --version
gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026
Copyright (C) 2017 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.

On clean 10.6 following is generated:

$ ./BUILD/compile-pentium64-gcov
testing k6 ... ok
./BUILD/compile-pentium64-gcov=> : path=./BUILD
./BUILD/compile-pentium64-gcov=> : . ./BUILD/autorun.sh
./BUILD/compile-pentium64-gcov=> : dirname ./BUILD/compile-pentium64-gcov
./BUILD/compile-pentium64-gcov=> : path=./BUILD
./BUILD/compile-pentium64-gcov=> : cp ./BUILD/cmake_configure.sh ./BUILD/../configure
./BUILD/compile-pentium64-gcov=> : chmod +x ./BUILD/../configure
./BUILD/compile-pentium64-gcov=> : git submodule update
./BUILD/compile-pentium64-gcov=> : CC=gcc CFLAGS=-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing -Wimplicit-fallthrough=2 -Wformat-security -Wvla  -mtune=native -m64  -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov   CXX=g++ CXXFLAGS=-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing -Wimplicit-fallthrough=2 -Wformat-security -Wvla -Wno-unused-parameter -Wno-invalid-offsetof -Wnon-virtual-dtor  -felide-constructors -fexceptions -mtune=native -m64  -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov   CXXLDFLAGS= ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-plugin-aria --with-aria-tmp-tables --with-plugin-s3=STATIC --with-debug --with-gcov --with-ssl --with-plugins=max --with-embedded-server --with-libevent --with-plugin-rocksdb=dynamic --with-plugin-test_sql_discovery=DYNAMIC --with-plugin-file_key_management=DYNAMIC --without-oqgraph --enable-local-infile
configure.pl : calling cmake /home/anel/mariadb/10.6  -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DENABLE_ASSEMBLER=1 -DWITH_EXTRA_CHARSETS=complex -DENABLE_THREAD_SAFE_CLIENT=1 -DWITH_BIG_TABLES=1 -DWITH_PLUGIN_ARIA=1 -DWITH_ARIA_TMP_TABLES=1 -DPLUGIN_S3=STATIC -DCMAKE_BUILD_TYPE=Debug -DSECURITY_HARDENED=OFF -DENABLE_GCOV=ON -DWITH_SSL=bundled -DWITH_MAX=AUTO -DWITH_EMBEDDED_SERVER=1 -DWITH_LIBEVENT=bundled -DPLUGIN_ROCKSDB=DYNAMIC -DPLUGIN_TEST_SQL_DISCOVERY=DYNAMIC -DPLUGIN_FILE_KEY_MANAGEMENT=DYNAMIC -DWITHOUT_OQGRAPH=1 -DENABLE_LOCAL_INFILE=1
-- The C compiler identification is GNU 6.5.0
-- The CXX compiler identification is GNU 6.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc - broken
CMake Error at /usr/local/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler
 
    "/usr/bin/gcc"
 
  is not able to compile a simple test program.
 
  It fails with the following output:
 
    Change Dir: /home/anel/mariadb/10.6/CMakeFiles/CMakeTmp
 
    Run Build Command(s):/usr/bin/make -f Makefile cmTC_5749f/fast && /usr/bin/make  -f CMakeFiles/cmTC_5749f.dir/build.make CMakeFiles/cmTC_5749f.dir/build
    make[1]: Entering directory '/home/anel/mariadb/10.6/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_5749f.dir/testCCompiler.c.o
    /usr/bin/gcc   -Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing -Wimplicit-fallthrough=2 -Wformat-security -Wvla  -mtune=native -m64  -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov  -o CMakeFiles/cmTC_5749f.dir/testCCompiler.c.o -c /home/anel/mariadb/10.6/CMakeFiles/CMakeTmp/testCCompiler.c
    gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=2’; did you mean ‘-Wno-fallthrough’?
    CMakeFiles/cmTC_5749f.dir/build.make:77: recipe for target 'CMakeFiles/cmTC_5749f.dir/testCCompiler.c.o' failed
    make[1]: *** [CMakeFiles/cmTC_5749f.dir/testCCompiler.c.o] Error 1
    make[1]: Leaving directory '/home/anel/mariadb/10.6/CMakeFiles/CMakeTmp'
    Makefile:127: recipe for target 'cmTC_5749f/fast' failed
    make: *** [cmTC_5749f/fast] Error 2
 
 
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:30 (PROJECT)
 
 
-- Configuring incomplete, errors occurred!
See also "/home/anel/mariadb/10.6/CMakeFiles/CMakeOutput.log".
See also "/home/anel/mariadb/10.6/CMakeFiles/CMakeError.log".
./BUILD/compile-pentium64-gcov=> : make -j 6
make: *** No targets specified and no makefile found.  Stop.

-Wimplicit-fallthrough=2 doesn't exist for gcc < 7.



 Comments   
Comment by Anel Husakovic [ 2021-06-15 ]

Hi monty can you please review cb0e22a62572d9

Comment by Michael Widenius [ 2023-11-17 ]

I have marked this as ok to push

Comment by Anel Husakovic [ 2023-11-20 ]

Pushed to 10.4 with commit 7aca66a3.
Thank you.

Generated at Thu Feb 08 09:41:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.