drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.62k stars 1.12k forks source link

Problems with send stream on version 1.8.0 #1370

Closed paulocoutinhox closed 6 months ago

paulocoutinhox commented 2 years ago

Hi,

Im updating drogon in conan CI, but im getting this error:

[ 19%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpControllersRouter.cc.o
[ 21%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpFileImpl.cc.o
[ 22%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpFileUploadRequest.cc.o
[ 24%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpRequestImpl.cc.o
[ 26%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpRequestParser.cc.o
[ 28%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpResponseImpl.cc.o
[ 29%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpResponseParser.cc.o
[ 31%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpServer.cc.o
[ 33%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpSimpleControllersRouter.cc.o
[ 35%] Building CXX object source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpUtils.cc.o
source_subfolder/CMakeFiles/drogon.dir/build.make:302: recipe for target 'source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpServer.cc.o' failed
CMakeFiles/Makefile2:112: recipe for target 'source_subfolder/CMakeFiles/drogon.dir/all' failed
Makefile:170: recipe for target 'all' failed
drogon/1.8.0: 
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_DROGON_SHARED
    BUILD_POSTGRESQL_BATCH
    CMAKE_EXPORT_NO_PACKAGE_REGISTRY

/home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715/source_subfolder/lib/src/HttpServer.cc: In member function ‘void drogon::HttpServer::sendResponse(const TcpConnectionPtr&, const HttpResponsePtr&, bool)’:
/home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715/source_subfolder/lib/src/HttpServer.cc:727:27: error: ‘using element_type = class trantor::TcpConnection {aka class trantor::TcpConnection}’ has no member named ‘sendStream’; did you mean ‘sendFile’?
                     conn->sendStream(chunkCallback);
                           ^~~~~~~~~~
                           sendFile
/home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715/source_subfolder/lib/src/HttpServer.cc:730:27: error: ‘using element_type = class trantor::TcpConnection {aka class trantor::TcpConnection}’ has no member named ‘sendStream’; did you mean ‘sendFile’?
                     conn->sendStream(streamCallback);
                           ^~~~~~~~~~
                           sendFile
/home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715/source_subfolder/lib/src/HttpServer.cc: In member function ‘void drogon::HttpServer::sendResponses(const TcpConnectionPtr&, const std::vector<std::pair<std::shared_ptr<drogon::HttpResponse>, bool> >&, trantor::MsgBuffer&)’:
/home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715/source_subfolder/lib/src/HttpServer.cc:803:31: error: ‘using element_type = class trantor::TcpConnection {aka class trantor::TcpConnection}’ has no member named ‘sendStream’; did you mean ‘sendFile’?
                         conn->sendStream(chunkCallback);
                               ^~~~~~~~~~
                               sendFile
/home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715/source_subfolder/lib/src/HttpServer.cc:806:31: error: ‘using element_type = class trantor::TcpConnection {aka class trantor::TcpConnection}’ has no member named ‘sendStream’; did you mean ‘sendFile’?
                         conn->sendStream(streamCallback);
                               ^~~~~~~~~~
                               sendFile
make[2]: *** [source_subfolder/CMakeFiles/drogon.dir/lib/src/HttpServer.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [source_subfolder/CMakeFiles/drogon.dir/all] Error 2
make: *** [all] Error 2
WARN: trantor/1.5.5: requirement openssl/1.1.1q overridden by drogon/1.8.0 to openssl/1.1.1o 
drogon/1.8.0: ERROR: Package '19e6c08cc47c6c2a06d6a7361c7813f829451715' build failed
drogon/1.8.0: WARN: Build folder /home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715
ERROR: drogon/1.8.0: Error in build() method, line 139
    cmake.build()
    ConanException: Error 2 while executing cmake --build '/home/conan/w/prod/BuildSingleReference/.conan/data/drogon/1.8.0/_/_/build/19e6c08cc47c6c2a06d6a7361c7813f829451715' '--' '-j3'

Do you have any tips about whats can be wrong?

Reference: https://github.com/conan-io/conan-center-index/pull/12725

Thanks.

an-tao commented 2 years ago

@paulocoutinhox thanks so much. What's the version of trantor in Conan?

paulocoutinhox commented 2 years ago

Hi,

The latest version is 1.5.6

https://github.com/conan-io/conan-center-index/blob/master/recipes/trantor/config.yml

an-tao commented 2 years ago

The sendStream method was introduced in commit #c1e57a before v1.5.6 in Trantor. please check if the version of Trantor is the latest version in your environment.