[MDEV-17103] tokudb doesn't build with gcc8 due to warning Created: 2018-08-31 Updated: 2021-01-09 Resolved: 2019-06-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling, Storage Engine - TokuDB |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.2.25, 10.1.41, 10.3.16, 10.4.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Noel Kuntze | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Arch Linux, gcc8 |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The CMake code of the tokudb build files sets and checks the following cflags:
Of those, the following produce a warning with gcc8 with cause CMake to abort the compilation. Therefore they have to be removed. This pertains all versions. It probably does not trigger with old CMake versions or older gcc versions that do not print those warnings.
|
| Comments |
| Comment by Noel Kuntze [ 2019-05-29 ] | ||
|
More wrong cflags: | ||
| Comment by Noel Kuntze [ 2019-05-30 ] | ||
|
I wrote a rather large patch that seperates the handling of CFLAGS and CXXFLAGS to make sure invalid options are never passed to the corresponding compiler. The patch is in total around 600 lines. | ||
| Comment by Noel Kuntze [ 2019-06-04 ] | ||
|
PR 1318 on GH (https://github.com/MariaDB/server/pull/1318) | ||
| Comment by Sergei Golubchik [ 2019-06-05 ] | ||
|
I don't get it. First, I have gcc8 and everything compiles fine. Second, MY_CHECK_AND_SET_COMPILER_FLAG macro checks C and C++ separately and does not enable C++ flags for C or vice versa. Why one would need to separate options into C and C++ manually (which is error prone and, quite probably, depends on the compiler version) when currently cmake does all that automatically? Or at least is supposed to. | ||
| Comment by Vladislav Vaintroub [ 2019-06-05 ] | ||
|
maybe thermi could attach build log to the bug so we get an idea. Also CMakeFiles/CMakeOutput.log and CMakeFiles/CMakeError.log, in tar.gz or zip | ||
| Comment by Noel Kuntze [ 2019-06-05 ] | ||
|
I just figured out that the problem is only caused when LANG is not set to C. | ||
| Comment by Vladislav Vaintroub [ 2019-06-05 ] | ||
|
SET(fail_patterns) in cmake/check_compiler_flag.cmake muß ein wenig Deutsch üben. serg, was meinst Du dazu? | ||
| Comment by Vladislav Vaintroub [ 2019-06-05 ] | ||
|
maybe
in MY_CHECK_C_COMPILER_FLAG,MY_CHECK_CXX_COMPILER_FLAG helps thermi, kannst Du ausprobieren ob es hilft? | ||
| Comment by Noel Kuntze [ 2019-06-05 ] | ||
|
Yes, that works and makes all the CMake tests pass. | ||
| Comment by Sergei Golubchik [ 2019-06-05 ] | ||
|
Great, that explains it. Thanks! |