Uploaded image for project: 'Apache NiFi MiNiFi C++'
  1. Apache NiFi MiNiFi C++
  2. MINIFICPP-1405

Fix improperly defined warning flags for civetweb

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 0.9.0
    • 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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hunyadi Adam Hunyadi
            oceanfish81 Ivan Serdyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h 40m
                3h 40m

                Slack

                  Issue deployment