build: fix iOS/macOS C-linkage on HCWebSocketOptions; Android compileSdk 34; Linux WSC dl/pthread; UWP ARM64; GDK asio#985
Conversation
…libs Bundles three independent low-risk additions: Build/libHttpClient.Android/build.gradle Bumps `compileSdkVersion` from 31 to 34. Required by downstream consumers (Bumblelion) being upgraded to current AGP/Gradle. SDK bump only - no runtime API change. Samples/UWP-Http/Http.vcxproj Suppresses `TreatWarningAsError` for `Release|ARM64` to unblock ARM64 sample builds while a separate cleanup of the underlying warning is pursued. Build/libHttpClient.Linux/CMakeLists.txt Adds `\` to the `WebSocketCompressionTests.Linux` target_link_libraries so the test binary links cleanly. The WebSocket Compression support (microsoft#965) addition introduced an unresolved `dlopen`/`dlsym` reference via linked crypto in some agent configurations. This surfaced in downstream consumer pipeline PlayFab.SDKs.All TestDrop (Microsoft ADO def 137186) on 2026-05-28 after Linux clang/dpkg fixes unblocked the prior failure mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@microsoft-github-policy-service agree company="Microsoft" |
…rial-port on GDK Fixes two regressions surfaced by PlayFab.SDKs.All TestDrop run 148660743 against latest libHttpClient main (post microsoft#965 WebSocket Compression): 1) Include/httpClient/httpClient.h DEFINE_ENUM_FLAG_OPERATORS(HCWebSocketOptions) was placed inside the file-wide extern `"C"` block. The macro expands to inline operators returning HCWebSocketOptions&, which clang rejects under -Wreturn-type-c-linkage -Werror on Xcode iOS/macOS builds: error: 'operator|=' has C-linkage specified, but returns user-defined type 'HCWebSocketOptions &' which is incompatible with C Wrap only the macro call in extern `"C++"` so the operators get C++ linkage while the rest of the public surface stays C-linked. 2) Build/libHttpClient.GDK.props GDK builds compile with NOSERIALCOMM (no DCB struct), but asio (pulled in via websocketpp) tries to instantiate win_iocp_serial_port_service. Add ASIO_DISABLE_SERIAL_PORT to the GDK PreprocessorDefinitions; we never use asio's serial-port transport. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🧪 Pre-merge validation in flight Pinned this PR's tip (
Pass criteria: iOS/macOS/Linux turn green vs. baseline build 148660743. Expected to remain red (out of scope for this PR):
Will post the result here once the build finishes (~100 min). |
|
✅ Validation result: PR-scope fixes work; one infra flake, one out-of-PR-scope issue uncovered Build 148684233 completed (111 min). Compared to baseline 148660743:
Verdict on this PRAll 4 in-PR-scope fixes validated:
Newly visible follow-up (out of this PR's scope)
PR ready for review. 🚀 |
|
✅ macOS flake cleared. macOS-only re-run 148695787 — Debug + Release both green. Confirms the prior macOS Release red was transient (Git Checkout RPC reset), not a code issue. All 4 Xcode jobs green on PR tip |
|
Let's wait for the CI checks to pass before merging |
Summary
Fixes 4 build regressions and 1 latent GDK build hazard surfaced by PlayFab.SDKs.All TestDrop build 148660743. TestDrop runs with
checkoutSubmodulesAsLatestCommit: true, so it builds libHttpClient main HEAD against PlayFab.SDKs.All's iOS/macOS/Linux/GDK toolchains — exposing platform regressions that this repo's MSVC-only PR CI does not catch.Why these weren't caught upstream
libHttpClient
libHttpClient.CI.ymlbuilds primarily on MSVC/Windows. clang-Wreturn-type-c-linkage(Xcode iOS/macOS) and the LinuxWebSocketCompressionTestslink (-ldl -lpthread) never gated PR #965. Captured as follow-up: AB#62563305.Commits
8c4efc0— Android compileSdk 34 + UWP ARM64 warning + Linux WSC dl libsBuild/libHttpClient.Android/build.gradle— compileSdk → 34 — AB#62563300Build/libHttpClient.Linux/CMakeLists.txt— adddl pthreadto WSC test link — AB#61359145Samples/UWP-Http/Http.vcxproj— ARM64 -W4/-Werror suppression — AB#625633012817f2e— iOS/macOS extern C++ wrap; GDK asio serial-port disableInclude/httpClient/httpClient.h(line 1046) — wrapDEFINE_ENUM_FLAG_OPERATORS(HCWebSocketOptions)inextern "C++" { }so the C++ operator overloads aren't inside the file-wideextern "C"block (clang-Wreturn-type-c-linkage -Werrorreject) — AB#62563298Build/libHttpClient.GDK.props— addASIO_DISABLE_SERIAL_PORTto PreprocessorDefinitions; GDKNOSERIALCOMMremovesDCBwhich breaks asio'swin_iocp_serial_port_service(pulled in via websocketpp) — AB#62563299Repro (iOS/macOS)
Introduced by #965 (
b19d186) placing the macro inside the file-wideextern "C" {(opened L24, closed L1496). MSVC and gcc tolerate it; clang-Werrordoes not. Minimal fix preserves C linkage for the entire public API surface and only flips toC++for the 1-line macro expansion.Risk
extern "C++"around a macro is standard C++; supported by MSVC/clang/gcc. No ABI impact — operator overloads were never callable from C.ASIO_DISABLE_SERIAL_PORTonly removes a transport we never use. No runtime behavior change. asio config knob atExternal/asio/asio/include/asio/detail/config.hpp:1066-1080.Validation plan
After merge: re-queue PlayFab.SDKs.All TestDrop (def 137186) against main with
checkoutSubmodulesAsLatestCommit: true. Expect iOS/macOS/Linux green; GDK still red on NuGet feed gap (not patchable here); Android Copy APKs still red pending separate super-repo PR.Related ADO work items
dl/pthread(Raul)