dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.2k stars 9.94k forks source link

SignalR-Client-Cpp will not compile with gcc 13 #49784

Open mprather opened 1 year ago

mprather commented 1 year ago

Is there an existing issue for this?

Describe the bug

When using gcc 13 compiler, the compiler finds fault with 2 files and stops compilation. The errors are because the newer compiler appears to be stricter about checking #include dependencies.

Expected Behavior

The library should build when using gcc 13.

A forked version with specified changes is available at https://github.com/mprather/SignalR-Client-Cpp-gcc-13-fix for review. I manually tested these changes and was able to build the library.

Steps To Reproduce

Ensure that gcc 13 is installed and set as the default version. This way when vcpkg is called, it will use the correct compiler version.

  1. Call vcpkg install microsoft-signalr.
  2. Compilation will break due to 2 issues.
    1. In cancellation_token_source.h, an include to is needed b/c std::string is used on line 40.
    2. In signalr_value.h, an include to is needed as it appears it is no longer automatically included as a result of using cstddef.

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

mprather commented 4 months ago

Can signalr-cppp team tag the repo and update the vcpkg release? The current vcpkg release has been broken for over 10 months on distros like Alpine and Arch, which use newer compilers. The fix was accepted last Aug and it's literally unused.

mprather commented 2 weeks ago

Update for the curious. As of Aug 28, 2024, this still has not been officially incorporated within a tagged release. However, the vcpkg team has gone ahead included the commit that contains this fix as a port update. The fix is now available in vcpkg release 2024.08.23.