Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0.0
-
$ uname -a
Linux laptop 4.15.0-123-generic #126~16.04.1-Ubuntu SMP Wed Oct 21 13:51:51 UTC 2020 i686 i686 i686 GNU/Linux
$ clang-11 --version
Ubuntu clang version 11.0.0-++20200721055954+cebd637c886-1~exp1~20200721161335.13
Target: i686-pc-linux-gnu
Thread model: posix
$ cmake --version
cmake version 3.19.0-rc2
$ ninja --version
1.10.0.git.kitware.jobserver-1
$ uname -a Linux laptop 4.15.0-123-generic #126~16.04.1-Ubuntu SMP Wed Oct 21 13:51:51 UTC 2020 i686 i686 i686 GNU/Linux $ clang-11 --version Ubuntu clang version 11.0.0-++20200721055954+cebd637c886-1~exp1~20200721161335.13 Target: i686-pc-linux-gnu Thread model: posix $ cmake --version cmake version 3.19.0-rc2 $ ninja --version 1.10.0.git.kitware.jobserver-1
-
Important
Description
Background:
Building civetweb is unstable on certain environment (our CI jobs show errors on builds on Ubuntu builds only).
Example build failure with Ninja and clang-11
[1/445] Performing build step for 'civetweb-external' FAILED: civetweb-external-prefix/src/civetweb-external-stamp/civetweb-external-build thirdparty/civetweb-install/lib/libcivetweb.a thirdparty/civetweb-install/lib/libcivetweb-cpp.a cd /home/oceanfish81/Desktop/nifi-minifi-cpp/build/civetweb-external-prefix/src/civetweb-external-build && /usr/local/bin/cmake --build . && /usr/local/bin/cmake -E touch /home/oceanfish81/Desktop/nifi-minifi-cpp/build/civetweb-external-prefix/src/civetweb-external-stamp/civetweb-external-build [1/6] Building CXX object src/CMakeFiles/civetweb-cpp.dir/CivetServer.cpp.o FAILED: src/CMakeFiles/civetweb-cpp.dir/CivetServer.cpp.o /usr/bin/clang++-11 -DNO_SSL_DL -DUSE_STACK_SIZE=102400 -I/home/oceanfish81/Desktop/nifi-minifi-cpp/build/thirdparty/libressl-install/include -I/home/oceanfish81/Desktop/nifi-minifi-cpp/build/thirdparty/civetweb-src/include -std=c++11 -std=c++14 -Wall -Wextra -Wshadow -Wmissing-prototypes -Weverything /W4 -Wno-padded /Wd4820 -Wno-unused-macros -Wno-format-nonliteral /WX -pedantic-errors -fvisibility=hidden -Os -DNDEBUG -fPIC -MD -MT src/CMakeFiles/civetweb-cpp.dir/CivetServer.cpp.o -MF src/CMakeFiles/civetweb-cpp.dir/CivetServer.cpp.o.d -o src/CMakeFiles/civetweb-cpp.dir/CivetServer.cpp.o -c /home/oceanfish81/Desktop/nifi-minifi-cpp/build/thirdparty/civetweb-src/src/CivetServer.cpp clang: error: no such file or directory: '/W4' clang: error: no such file or directory: '/Wd4820' clang: error: no such file or directory: '/WX' [2/6] Building C object src/CMakeFiles/c-executable.dir/main.c.o FAILED: src/CMakeFiles/c-executable.dir/main.c.o /usr/bin/clang-11 -DNO_SSL_DL -DUSE_STACK_SIZE=102400 -I/home/oceanfish81/Desktop/nifi-minifi-cpp/build/thirdparty/libressl-install/include -I/home/oceanfish81/Desktop/nifi-minifi-cpp/build/thirdparty/civetweb-src/include -std=c11 -Wall -Wextra -Wshadow -Wconversion -Wmissing-prototypes -Weverything -Wparentheses /W4 -Wno-padded -Wno-unused-macros -Wno-reserved-id-macros -Wno-format-nonliteral -Wno-date-time -Wno-cast-qual /Wd4820 -pedantic-errors -fvisibility=hidden -Os -DNDEBUG -fPIE -MD -MT src/CMakeFiles/c-executable.dir/main.c.o -MF src/CMakeFiles/c-executable.dir/main.c.o.d -o src/CMakeFiles/c-executable.dir/main.c.o -c /home/oceanfish81/Desktop/nifi-minifi-cpp/build/thirdparty/civetweb-src/src/main.c clang: error: no such file or directory: '/W4' clang: error: no such file or directory: '/Wd4820' ninja: build stopped: subcommand failed. ninja: build stopped: subcommand failed.
Proposal:
Update civetweb version, see if the problem persists. If it still does, patch out all MSVC warning flags from the civetweb cmake file.
Update:
Seems like civetweb had an issue with checking available compiler flags. I opened a PR to fix it in their repo, and backported the change to our version.