Wireshark-dev: [Wireshark-dev] Gcc compiler version for redhat for Wireshark 2.9.0

From: Jeff Peng <jeff2008_bj@xxxxxxxxxxx>
Date: Thu, 6 Dec 2018 22:00:14 +0000
Hi All,

I tried to compile Wireshark 2.9.0 for redhat os (CentOS Linux release 7.2.1511), but failed. My current gcc version is 4.8.5. Do you know which gcc comipler version is expected for Wireshark 2.9.0 on RedHat?

$ cc --version

cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)

Copyright (C) 2015 Free Software Foundation, Inc.


$ /usr/bin/cmake3 ../wireshark-2.9.0rc0-2747-g56b255dc

…….

-- Configuring incomplete, errors occurred!

See also "xxx/build/CMakeFiles/CMakeOutput.log".

See also "xxx/build/CMakeFiles/CMakeError.log".


CMakeError.log:

  9 cc: error: unrecognized command line option '-Wextra-semi'

24 cc: error: unrecognized command line option '-Wheader-guard'

39 cc: error: unrecognized command line option '-Wcomma'

54 cc: error: unrecognized command line option '-Wshorten-64-to-32'

69 cc: error: unrecognized command line option '-Wunused-const-variable'

84 c++: error: unrecognized command line option '-Wextra-semi'

99 c++: error: unrecognized command line option '-Wheader-guard'

114 c++: error: unrecognized command line option '-Wcomma'

129 c++: error: unrecognized command line option '-Wshorten-64-to-32'

145 /users/pen55339/xs/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: ‘heimdal_version’ undeclared (first use in this function)

187 collect2: error: ld returned 1 exit status


wireshark-2.9.0 $ grep -i gcc CMakeLists.txt
        # In addition, CMake 3.5.2 seems to think that GCC versions
                # some older compilers such as GCC 4.4.7, -std=gnu99
                # Some versions of GCC, such as 4.3.2 and 4.4.5,
                        # Works only with GCC 7
        # Available since Clang >= 3.2 and GCC >= 4.8
        # Available since Clang >= 3.3 and GCC >= 4.9
                # no way, in Apple's llvm-gcc, to prevent that
        # Try the GCC-and-compatible -fvisibility-hidden first.

Does it mean that I should use gcc 7 and above version?

Best Regards,

Jeff Peng