[MDEV-18273] CMake Error at storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake:178 Created: 2019-01-16 Updated: 2021-01-09 Resolved: 2021-01-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling, Server |
| Affects Version/s: | 10.3.12 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Jan Kohnert | Assignee: | Sergei Golubchik |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | contribution | ||
| Environment: |
Arch Linux (AUR-Package mariadb-10.3) |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Trying to cmake the project in a non-english environment leads to the following error:
The problem does not occur in an english environment (f.e LANG=C cmake). Further investigation leads to a broken check in cmake/check_compiler_flag.cmake, which does a regex search for valid compiler flags. Since gcc in a f.e. german environment does not output "error", but "Fehler", the regex check does not work as expected. It issues warning to some flags set before the failing test, which then lead to the error seen above. I prepared a patch that uses the cmake-builtin check_c_compiler_flag/check_cxx_compiler_flag in that file. One additional fix had to be done in order to get rid of MY_CHECK_C_COMPILER_FLAG defined in the same file (only one check directly used that function). Since I could not find the feature documented for cmake<3.0.2 (the first cmake-3 doc on the cmake-webpage), I had to change the minimum cmake version to 3.0.2, too. Possibly one could push the version further to a more recent version of cmake; my local cmake-3.13.2 works just fine. Best regards Jan |
| Comments |
| Comment by Sergey Vojtovich [ 2020-02-20 ] |
|
confirmed by code analysis, didn't try reproducing though. |
| Comment by Sergei Golubchik [ 2021-01-09 ] |
|
I cannot repeat it. Tried with LANG=C and with LANG=de_DE, I get exactly the same CMakeCache.txt, that is all compiler feature detection works identically. Presumably, it was fixed in |