Skip to content

fastcgipp-3.0 manager.hpp std::condition_variable #115

@jasinco

Description

@jasinco

I downloaded the stable v3.0 archive and follow the standard compilation, but it jumped out an error that shows the include was incorrect

[  9%] Building CXX object CMakeFiles/fastcgipp.dir/src/manager.cpp.o
In file included from /home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp:30:
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/include/fastcgi++/manager.hpp:227:14: error: ‘condition_variable’ in namespace ‘std’ does not name a type
  227 |         std::condition_variable m_wake;
      |              ^~~~~~~~~~~~~~~~~~
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/include/fastcgi++/manager.hpp:44:1: note: ‘std::condition_variable’ is defined in header ‘<condition_variable>’; did you forget to ‘#include <condition_variable>’?
   43 | #include "fastcgi++/request.hpp"
  +++ |+#include <condition_variable>
   44 | 
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp: In member function ‘void Fastcgipp::Manager_base::terminate()’:
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp:65:5: error: ‘m_wake’ was not declared in this scope
   65 |     m_wake.notify_all();
      |     ^~~~~~
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp: In member function ‘void Fastcgipp::Manager_base::stop()’:
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp:73:5: error: ‘m_wake’ was not declared in this scope
   73 |     m_wake.notify_all();
      |     ^~~~~~
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp: In member function ‘void Fastcgipp::Manager_base::handler()’:
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp:320:9: error: ‘m_wake’ was not declared in this scope
  320 |         m_wake.wait(tasksLock);
      |         ^~~~~~
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp: In member function ‘void Fastcgipp::Manager_base::push(Fastcgipp::Protocol::RequestId, Fastcgipp::Message&&)’:
/home/jasinco/cybwg/subprojects/fastcgipp-3.0/src/manager.cpp:414:5: error: ‘m_wake’ was not declared in this scope
  414 |     m_wake.notify_one();
      |     ^~~~~~
make[2]: *** [CMakeFiles/fastcgipp.dir/build.make:202: CMakeFiles/fastcgipp.dir/src/manager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/fastcgipp.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

After I add #include <condition_variable> like what the log said, it works. Maybe just update the archive?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions