Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

RESTinio For QNX7.1 #219

Open FaiqueAli opened 1 month ago

FaiqueAli commented 1 month ago

Hi I am trying to use RESTinio for cross-compilation, for that I have created a hello-world project with all the basic settings and installed RESTinio package using conan2.4 with all dependencies.

Unfortunately, there are various issues for QNX Neutrino OS and I am not able to find support. it looks like that RESTinio or one of the dependency does not support QNX.

Meanwhile I fixes some issue and some are not but at the moment I am getting the following

[ 33%] Building CXX object CMakeFiles/output.dir/main.cpp.o
/home/path/Conan-restinio/main.cpp:11: warning: "RESTINIO_ENABLE_SENDFILE_DEFAULT_IMPL" redefined
 #define RESTINIO_ENABLE_SENDFILE_DEFAULT_IMPL

<command-line>: note: this is the location of the previous definition
In file included from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/error_code.ipp:29,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/error_code.hpp:36,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/throw_error.hpp:20,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/impl/posix_tss_ptr.ipp:23,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/posix_tss_ptr.hpp:74,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/tss_ptr.hpp:27,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/call_stack.hpp:20,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/thread_context.hpp:20,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/recycling_allocator.hpp:20,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/handler_alloc_helpers.hpp:21,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/executor_function.hpp:19,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/execution/any_executor.hpp:24,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/execution.hpp:19,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/any_completion_executor.hpp:22,
                 from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio.hpp:18,
                 from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/asio_include.hpp:14,
                 from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:16,
                 from /home/path/Conan-restinio/main.cpp:13:
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/signal_set_base.hpp:65:15: error: 'SA_RESTART' was not declared in this scope
     restart = ASIO_OS_DEF(SA_RESTART),
               ^~~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/signal_set_base.hpp:65:15: note: suggested alternative: 'ERESTART'
gmake[2]: *** [CMakeFiles/output.dir/build.make:76: CMakeFiles/output.dir/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/output.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

as the issue is already discussed here and also at some other locations and the suggested fixed is not approved. So my question is, is there any possibility that this repository provide support for issues I am having for cross compilation?

eao197 commented 1 month ago

Hi!

At the moment the main problem is the lack of support for QNX from Asio, as mentioned here. It's a show stopper and we can't do anything with Asio because it's not our project and not our area of responsibility. So you have to wait until this support will be added.

Another possible way (from my point of view): you can fork Asio and apply this PR to your fork, then you use your fork of Asio with RESTinio.

FaiqueAli commented 1 month ago

Yes, I have already gone through that link and you can also find my comments there. The problem is I am using RESTinio using Conan package, if I fork this repo, I need also to install all the dependencies individually and manually, which is a tedious process and most of the time creates some other issues. Meanwhile I have asked asio lets see how they respond.