socketio / socket.io-client-cpp

C++11 implementation of Socket.IO client
MIT License
2.25k stars 725 forks source link

Build error of release 3.1.0 using CMake and MinGW 11.2 #430

Open 8Observer8 opened 3 days ago

8Observer8 commented 3 days ago

Configuration requires to add the OpenSSL path to the Path variable:

Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found version "1.1.1q")

I added it. Configuration works without problems:

cmake -G "MinGW Makefiles" --fresh -S . -B dist -DCMAKE_INSTALL_PREFIX=E:/libs/socket.io-client-cpp-3.1.0-prefix

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Qt/Tools/mingw1120_64/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Qt/Tools/mingw1120_64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- not define build type, set to release
-- Found OpenSSL: C:/Qt/Tools/OpenSSL-1.1.1j/Win_x64/bin/ssl_1.1/x86_64/libcrypto.a (found version "1.1.1u")
-- Configuring done (3.6s)
-- Generating done (0.1s)
-- Build files have been written to: E:/libs/socket.io-client-cpp-3.1.0/dist

But when I try to build I have errors:

cmake --build dist -j4

[ 10%] Building CXX object CMakeFiles/sioclient_tls.dir/src/sio_client.cpp.obj
[ 20%] Building CXX object CMakeFiles/sioclient.dir/src/sio_client.cpp.obj
[ 30%] Building CXX object CMakeFiles/sioclient.dir/src/sio_socket.cpp.obj
[ 40%] Building CXX object CMakeFiles/sioclient_tls.dir/src/sio_socket.cpp.obj
In file included from In file included from                                                                             ent-cpp-3.1.0\src\sio_client.cpp:8                                                                                      :                                                                                                                        sio_client_impl.h:14:10:                                                                                                   14 | #include websocketpp/client.hpp: No such file or directory
   14 | #include                                                                                                              |
      |          ^~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~

ccoommppiillaattiioonn  tteerrmmiinnaatteedd..

mingw32-make.exe[2]: *** [CMakeFiles\sioclient.dir\build.make:76: CMakeFiles/sioclient.dir/src/sio_client.cpp.obj] Error 1
mingw32-make.exe[2]: *** Waiting for unfinished jobs....
mingw32-make.exe[2]: *** [CMakeFiles\sioclient_tls.dir\build.make:76: CMakeFiles/sioclient_tls.dir/src/sio_client.cpp.obj] Error 1
mingw32-make.exe[2]: *** Waiting for unfinished jobs....
[ 50%] Building CXX object CMakeFiles/sioclient_tls.dir/src/internal/sio_client_impl.cpp.obj
In file included from E:\libs\socket.io-client-cpp-3.1.0\src\internal\sio_client_impl.cpp:9:
E:\libs\socket.io-client-cpp-3.1.0\src\internal\sio_client_impl.h:14:10: fatal error: websocketpp/client.hpp: No such file or directory
   14 | #include <websocketpp/client.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make.exe[2]: *** [CMakeFiles\sioclient_tls.dir\build.make:106: CMakeFiles/sioclient_tls.dir/src/internal/sio_client_impl.cpp.obj] Error 1
In file included from In file included from                                                                             ent-cpp-3.1.0\src\sio_socket.cpp:3                                                                                      :
E:\libs\socket.io-client-cpp-3.1.0\src\internal/sio_client_impl.h:14:10:E:\libs\socket.io-client-cpp-3.1.0\src\internal/sio_client_impl.h:14:10:  fatal error: fatal error: websocketpp/client.hpp: No such file or directory
   14 | #include websocketpp/client.hpp: No such file or directory
   14 | #include                                                                                                              |          ^~~~~~~~~~~~~~~~~~~~~~~~
com  lat
      |          ion t   inat^~~~~~~~~~~~~~~~~~~~~~~~e .

compilation terminated.
mingw32-make.exe[2]: *** [CMakeFiles\sioclient_tls.dir\build.make:91: CMakeFiles/sioclient_tls.dir/src/sio_socket.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\sioclient.dir\build.make:91: CMakeFiles/sioclient.dir/src/sio_socket.cpp.obj] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:110: CMakeFiles/sioclient_tls.dir/all] Error 2
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:84: CMakeFiles/sioclient.dir/all] Error 2
mingw32-make.exe: *** [Makefile:135: all] Error 2
8Observer8 commented 3 days ago

The same error the mater branch socket.io-client-cpp-master. But compilation is not stopped on the error:

cmake --build dist -j4

[  1%] Building CXX object CMakeFiles/sioclient.dir/src/sio_client.cpp.obj
[  2%] [  3%] Building CXX object CMakeFiles/sioclient.dir/src/sio_socket.cpp.obj
Building CXX object CMakeFiles/sioclient_tls.dir/src/sio_client.cpp.obj
[  3%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/benchmark/catch_chronometer.cpp.obj
In file included from E:\libs\socket.io-client-cpp-master\src\sio_socket.cpp:3:
E:\libs\socket.io-client-cpp-master\src\internal/sio_client_impl.h:14:10: fatal error: websocketpp/client.hpp: No such file or directory
   14 | #include In file included from                                                                                        |          :
                                                                                                                        In file included from  c mE:\libs\socket.io-client-cpp-master\src\sio_client.cpp:8fatal error: p :
lwebsocketpp/client.hpp: No such file or directory
   14 | #include a                                                                         t                        i o
      |                         t                        e                                                                 14 | #include r
 ci<websocketpp/client.hpp>on ap
      |          tie da^~~~~~~~~~~~~~~~~~~~~~~~.t                                                                       i
oconm pitelramitniatoend .t
erminated.
mingw32-make.exe[2]: *** [CMakeFiles\sioclient.dir\build.make:91: CMakeFiles/sioclient.dir/src/sio_socket.cpp.obj] Error 1
mingw32-make.exe[2]: *** Waiting for unfinished jobs....
mingw32-make.exe[2]: *** [CMakeFiles\sioclient.dir\build.make:76: CMakeFiles/sioclient.dir/src/sio_client.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\sioclient_tls.dir\build.make:76: CMakeFiles/sioclient_tls.dir/src/sio_client.cpp.obj] Error 1
mingw32-make.exe[2]: *** Waiting for unfinished jobs....
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:891: CMakeFiles/sioclient.dir/all] Error 2
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
[  4%] Building CXX object CMakeFiles/sioclient_tls.dir/src/sio_socket.cpp.obj
[  5%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/benchmark/detail/catch_benchmark_function.cpp.obj
[  6%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/benchmark/detail/catch_run_for_at_least.cpp.obj
In file included from E:\libs\socket.io-client-cpp-master\src\sio_socket.cpp:3:
E:\libs\socket.io-client-cpp-master\src\internal/sio_client_impl.h:14:10: fatal error: websocketpp/client.hpp: No such file or directory
   14 | #include <websocketpp/client.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make.exe[2]: *** [CMakeFiles\sioclient_tls.dir\build.make:91: CMakeFiles/sioclient_tls.dir/src/sio_socket.cpp.obj] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:917: CMakeFiles/sioclient_tls.dir/all] Error 2
[  7%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/benchmark/detail/catch_stats.cpp.obj
[  8%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/generators/catch_generator_exception.cpp.obj
[  9%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/generators/catch_generators.cpp.obj
[  9%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/generators/catch_generators_random.cpp.obj
[ 10%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_automake.cpp.obj
[ 11%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_common_base.cpp.obj
[ 12%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_compact.cpp.obj
[ 13%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_console.cpp.obj
[ 14%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_cumulative_base.cpp.obj
[ 15%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_event_listener.cpp.obj
[ 15%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_helpers.cpp.obj
[ 16%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_junit.cpp.obj
[ 17%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_multi.cpp.obj
[ 18%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_registrars.cpp.obj
[ 19%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_sonarqube.cpp.obj
[ 20%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_streaming_base.cpp.obj
[ 20%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_tap.cpp.obj
[ 21%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_teamcity.cpp.obj
[ 22%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_xml.cpp.obj
[ 23%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_capture.cpp.obj
[ 24%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_config.cpp.obj
[ 25%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_exception.cpp.obj
[ 26%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_generatortracker.cpp.obj
[ 26%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_registry_hub.cpp.obj
[ 27%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_reporter.cpp.obj
[ 28%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_reporter_factory.cpp.obj
[ 29%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_reporter_registry.cpp.obj
[ 30%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/interfaces/catch_interfaces_testcase.cpp.obj
[ 31%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_approx.cpp.obj
[ 31%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_assertion_result.cpp.obj
[ 32%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_config.cpp.obj
[ 33%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_get_random_seed.cpp.obj
[ 34%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_message.cpp.obj
[ 35%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_registry_hub.cpp.obj
[ 36%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_session.cpp.obj
[ 37%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_tag_alias_autoregistrar.cpp.obj
[ 37%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_test_case_info.cpp.obj
[ 38%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_test_spec.cpp.obj
[ 39%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_timer.cpp.obj
[ 40%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_tostring.cpp.obj
[ 41%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_totals.cpp.obj
[ 42%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_version.cpp.obj
[ 42%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_assertion_handler.cpp.obj
[ 43%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_case_insensitive_comparisons.cpp.obj
[ 44%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.obj
[ 45%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_commandline.cpp.obj
[ 46%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_console_colour.cpp.obj
[ 47%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_context.cpp.obj
[ 48%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_debug_console.cpp.obj
[ 48%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_debugger.cpp.obj
[ 49%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_decomposer.cpp.obj
[ 50%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_enforce.cpp.obj
[ 51%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_enum_values_registry.cpp.obj
[ 52%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_errno_guard.cpp.obj
[ 53%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_exception_translator_registry.cpp.obj
[ 54%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_fatal_condition_handler.cpp.obj
[ 54%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_floating_point_helpers.cpp.obj
[ 55%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_getenv.cpp.obj
[ 56%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_istream.cpp.obj
[ 57%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_lazy_expr.cpp.obj
[ 58%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_leak_detector.cpp.obj
[ 59%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_list.cpp.obj
[ 59%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_message_info.cpp.obj
[ 60%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_output_redirect.cpp.obj
[ 61%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_parse_numbers.cpp.obj
[ 62%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_polyfills.cpp.obj
[ 63%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_random_number_generator.cpp.obj
[ 64%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_random_seed_generation.cpp.obj
[ 65%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_reporter_registry.cpp.obj
[ 65%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_reporter_spec_parser.cpp.obj
[ 66%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_result_type.cpp.obj
[ 67%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_reusable_string_stream.cpp.obj
[ 68%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_run_context.cpp.obj
[ 69%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_section.cpp.obj
[ 70%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_singletons.cpp.obj
[ 70%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_source_line_info.cpp.obj
[ 71%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_startup_exception_registry.cpp.obj
[ 72%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_stdstreams.cpp.obj
[ 73%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_string_manip.cpp.obj
[ 74%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_stringref.cpp.obj
[ 75%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_tag_alias_registry.cpp.obj
[ 76%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_case_info_hasher.cpp.obj
[ 76%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_case_registry_impl.cpp.obj
[ 77%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_case_tracker.cpp.obj
[ 78%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_failure_exception.cpp.obj
[ 79%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_registry.cpp.obj
[ 80%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_test_spec_parser.cpp.obj
[ 81%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_textflow.cpp.obj
[ 81%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_uncaught_exceptions.cpp.obj
[ 82%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_wildcard_pattern.cpp.obj
[ 83%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_xmlwriter.cpp.obj
[ 84%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers.cpp.obj
[ 85%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_container_properties.cpp.obj
[ 86%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_exception.cpp.obj
[ 87%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_floating_point.cpp.obj
[ 87%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_predicate.cpp.obj
[ 88%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_quantifiers.cpp.obj
[ 89%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_string.cpp.obj
[ 90%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_templated.cpp.obj
[ 91%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/internal/catch_matchers_impl.cpp.obj
[ 92%] Linking CXX static library libCatch2.a
[ 92%] Built target Catch2
mingw32-make.exe: *** [Makefile:145: all] Error 2