[PATCH] D98278: [test] Add ability to get error messages from CMake for errc substitution
Markus Böck via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 16 03:38:33 PDT 2021
zero9178 added a comment.
In D98278#2628477 <https://reviews.llvm.org/D98278#2628477>, @uabelho wrote:
> Hi,
>
> I'm seeing a problem with this. Compiling with gcc 9.3.0 the compilation of the test program works, but then when I run it I get
>
> /repo/uabelho/master-github/llvm/build-all-bbigcc/CMakeFiles/CMakeTmp/cmTC_00188: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /repo/uabelho/master-github/llvm/build-all-bbigcc/CMakeFiles/CMakeTmp/cmTC_00188)
>
> and this causes everything to fail with
>
> llvm-lit: /repo/uabelho/master-github/llvm/utils/lit/lit/TestingConfig.py:100: fatal: unable to parse config file '/repo/uabelho/master-github/llvm/build-all-bbigcc/tools/clang/test/lit.site.cfg.py', traceback: Traceback (most recent call last):
> File "/repo/uabelho/master-github/llvm/build-all-bbigcc/bin/../../utils/lit/lit/TestingConfig.py", line 89, in load_from_path
> exec(compile(data, path, 'exec'), cfg_globals, None)
> File "/repo/uabelho/master-github/llvm/build-all-bbigcc/tools/clang/test/lit.site.cfg.py", line 19
> config.errc_messages = "/repo/uabelho/master-github/llvm/build-all-bbigcc/CMakeFiles/CMakeTmp/cmTC_00188: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /repo/uabelho/master-github/llvm/build-all-bbigcc/CMakeFiles/CMakeTmp/cmTC_00188)
>
> so perhaps there should be some additional error handling when running the compiled program doesn't work?
Could you try changing line 32 of llvm/cmake/modules/GetErrcMessages.cmake from `if (errc_compiled)` to `if (errc_compiled AND "${errc_test_code}" STREQUAL "0")` and report back if it changes anything? I think that should fix your issue, although it'll fall back to using python's strerror messages. Indeed an oversight of mine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98278/new/
https://reviews.llvm.org/D98278
More information about the cfe-commits
mailing list