drogonframework / drogon

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

Cannot get cmake working with latest Drogon #1130

Closed shivshankardayal closed 5 months ago

shivshankardayal commented 2 years ago

I just pulled latest drogon and cmake refuses to build my code.

To Reproduce Steps to reproduce the behavior:

  1. Clone latest drogon
  2. Compile and install
  3. Create a new simple drogon program with a CMakeLists.txt
  4. Run cmake ..

Expected behavior It should run successfully.

However, it fails with following messages:

CMake Error at /usr/local/lib/cmake/Drogon/FindFilesystem.cmake:258 (message):
  Cannot run simple program using std::filesystem
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /usr/local/lib/cmake/Drogon/DrogonConfig.cmake:71 (find_dependency)
  CMakeLists.txt:54 (find_package)
an-tao commented 2 years ago

What's your OS and compiler? Did you create the project via drogon_ctl?

shivshankardayal commented 2 years ago

OS is Ubuntu 20.04 and compiler is gcc 10.3. No I did not create projetc via drogon_ctl. It is an old project which used to work fine but it no longer works for that step.

an-tao commented 2 years ago

Try to create a new one, and update your old CmakeLists.txt (use diff comand to find the difference of them)

shivshankardayal commented 2 years ago

I have modified the installed cmake file for filesystem and set _found to TRUE.

Greisby commented 2 years ago

I have exactly the same problem with MSVC 2022 + vcpkg (drogon 1.7.5) I have an old project, not created via drogon_ctl, that worked on my old machine (MSVC 2019, not idea of the drogon version). I just do a find_package(Drogon CONFIG REQUIRED) in my CMakeLists.txt and I have exactly this error. I thought it was a problem with the new MSVC compiler, seems not to be the case since you have the same on Ubuntu/gcc.

shivshankardayal commented 2 years ago

This is a broken framework with zero support. I raised a regression issue in its base trantor package. The changes broke my code and nobody cared to figure out the issue. I will suggest that you use actix which has much better community.

shivshankardayal commented 2 years ago

The issue I am referring to was https://github.com/an-tao/trantor/issues/179 which was closed for no good reason.

rbugajewski commented 2 years ago

This is a broken framework with zero support. I raised a regression issue in its base trantor package. The changes broke my code and nobody cared to figure out the issue. I will suggest that you use actix which has much better community.

Yikes, looks like somebody took things personally and is still salty. For the record: The framework is not broken, most certainly it has bugs like every other piece of software in its existence, and we try to fix them as soon as possible and also welcome every PR that improves the code base. Not much to see here. Furthermore all of the core maintainers cared about the issue, responded, but OP failed to deliver. As we have support issues on our list that belong into our official Gitter chat, and we want to keep our backlog clean, the issue was closed due to inactivity.

@shivshankardayal Consider this the first warning, because of innapropriate behavior in our community.

shivshankardayal commented 2 years ago

@rbugajewski Where did I fail to deliver? The last message was from me. No one asked sample code or I could have provided that. The repository which had issues is public on github and you can verify that. Anyway, I do not care about your warnings. I am done with Drogon and your aristocratic behavior.

shivshankardayal commented 2 years ago

@rbugajewski Look at the timeline in above issue. Was I not prompt in answering? Drogon authors were slow in responding and for their inactivity you closed the bug. Great job! Your behavior was wrong in closing the issue not mine in this ticket.

shivshankardayal commented 2 years ago

@rbugajewski Even look at this ticket. No one investigated the issue. I have to do a work around.

Greisby commented 2 years ago

Well, my report can be ignored. The problem was due to the installation of VS2022 on a fresh Windows installing obsolete msvc libraries in C:\Windows\System32, although the latest redists are present in add/remove software. Reinstalling the redists fixes the problem.

rbugajewski commented 2 years ago

Well, my report can be ignored. The problem was due to the installation of VS2022 on a fresh Windows installing obsolete msvc libraries in C:\Windows\System32, although the latest redists are present in add/remove software. Reinstalling the redists fixes the problem.

Thanks for following up. Glad that you could solve the issue on Windows.

li1553770945 commented 2 years ago

I also have this problem on CentOS7.And I used drogon_ctl to create project.

an-tao commented 2 years ago

The default gcc version of centOs is low, and it is recommended to use drogon after upgrading gcc(newer than gcc9).

shivshankardayal commented 2 years ago

@li1553770945 Refer to my solution and force the filesystem cmake to return true. There are issues with default cmake script.