-
-
Notifications
You must be signed in to change notification settings - Fork 447
Env variables left in cache causes gcc-11 builds on ubuntu to fail #222
Comments
A very nasty fix for this is to override the environment variables. Change your - name: Build
# Clear out LLVM environment to avoid issues with GCC.
env:
LLVM_PATH: ""
LD_LIBRARY_PATH: ""
DYLD_LIBRARY_PATH: ""
LDFLAGS: ""
CPPFLAGS: ""
LIBRARY_PATH: ""
CPATH: ""
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build ./build --config ${{matrix.build_type}} I didn't notice any regression with LLVM builds, so these environment variables are generally not required it seems. These appear to be introduced by setup-cpp when installing LLVM. So this may be something that @aminya might want to look at. I imagine it should be easy enough to clear these after the install on unix within setup-cpp itself. This would also explain why these issues appeared suddenly with no relevant changes to this repository. The use of |
Just pushed a patch to setup-cpp. Please try building again and see if the error persists. |
I haven't tested this just yet, but just a heads up that these pages (#1, #2) seem to indicate that you may want to unset |
I agree that setup-cpp should not set necessary flags when only clang-tidy and clang-format are installed. |
Hey!
I freshly forked your template on my github account, but the initial commit doesn't pass the CI checks for ubuntu with gcc-11.
It seems that some cached env variables are resurfacing during the "Configure CMake" step of the workflow, causing gcc to try to use clang includes, thus causing compile errors because of non-existent preprocessor defs (like
__has_include()
)"7_Configure CMake.txt" logs:
2022-05-12T15:26:59.9540894Z` LLVM_PATH: /opt/hostedtoolcache/llvm/13.0.0/x64
2022-05-12T15:26:59.9541186Z LD_LIBRARY_PATH: /opt/hostedtoolcache/llvm/13.0.0/x64/lib:
2022-05-12T15:26:59.9541494Z DYLD_LIBRARY_PATH: /opt/hostedtoolcache/llvm/13.0.0/x64/lib:
2022-05-12T15:26:59.9541805Z CPATH: /opt/hostedtoolcache/llvm/13.0.0/x64/lib/clang/13.0.0/include
2022-05-12T15:26:59.9542101Z LDFLAGS: -L/opt/hostedtoolcache/llvm/13.0.0/x64/lib
2022-05-12T15:26:59.9542388Z CPPFLAGS: -I/opt/hostedtoolcache/llvm/13.0.0/x64/include
2022-05-12T15:26:59.9542677Z LIBRARY_PATH: /opt/hostedtoolcache/llvm/13.0.0/x64/lib
Sadly that's as far as my (non-existing) github actions skills could take me and I couldn't find what sets those environment variables...
Thanks a lot for your templates, they are amazing!
The text was updated successfully, but these errors were encountered: