firebase / firebase/firebase-cpp-sdk

[Bug] Windows Server 2016+2019 missing icu.dll

未关闭
#1,541 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
needs-triage new type: question
主要语言
C++
星标
326
派生
137
平均合并
3 天 9 小时
30 天内合并 PR
5

描述

### [REQUIRED] Please fill in the following fields:

Since https://github.com/firebase/firebase-cpp-sdk/pull/1332, support for Windows Server 2016+2019 was broken due to a new dependency on icu.dll, which is only available on Windows 10, Windows 11, and Windows Server 2022.

### [REQUIRED] Please describe the issue here:

Two symbols are now imported from icu.dll (ucal_getTimeZoneIDForWindowsID and u_errorName). The relevant code is in [app/src/locale.cc](https://github.com/firebase/firebase-cpp-sdk/blob/3fd90d5d8a98da064e847a0dd44e3dae9407e8e8/app/src/locale.cc#L150).

#### Steps to reproduce:

Build for Windows, try running on Windows Server 2016 or 2019, hit the following issue:

![image](https://github.com/firebase/firebase-cpp-sdk/assets/295841/229aa3ec-4bae-4645-be1d-76fc00892e7d)

#### Relevant Code:

The imported function is only used for time zone id mapping, the code should be modified to either use a different Windows API, or try loading icu.dll dynamically (LoadLibrary+GetProcAddress) with a proper fallback when the DLL and function is absent.

贡献指南

打开贡献指南

调研方向

从 app/src/locale.cc 中导入 ucal_getTimeZoneIDForWindowsID 和 u_errorName 的时区 ID 映射附近开始。重现 Windows Server 2016/2019 上的运行时失败,然后研究受支持的 Windows API 或带回退机制的动态加载,以便在 icu.dll 或其函数不可用时使用。完成的标准是受影响的构建能够在这些服务器版本上运行,不再出现缺少 DLL 导致的失败,同时在支持的情况下保留时区映射。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
operating-systems
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。