Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

dev:patch_glfw_x11_ime.cmake 哈希常量与真实 GLFW 3.4 不符,bundled/fetch 路径配置期 FATAL

Closed Beginner friendly
#80 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cmake
Domain
build-system

Research direction

Start with scripts/patch_glfw_x11_ime.cmake and compare its expected_source_hash and expected_output_hash with the hashes documented in this issue. Check the bundled and FetchContent paths through 3rd/dependencies.cmake using the provided CMake configure commands; done means both GLFW paths pass configuration without a FATAL hash error.

Written by the indexing model from the issue text.

Description

问题

dev 分支新增的 scripts/patch_glfw_x11_ime.cmake(#78 修复,4691fc0 同提交加入)中 expected_source_hash / expected_output_hash 两个常量与官方 GLFW 3.4 的真实哈希均不符,导致 bundled 与 fetch 两条 GLFW 引入路径在 CMake 配置期直接 FATAL。叠加 auto 模式遇系统 GLFW 3.3 的编译问题(另见配套 issue),dev 分支在 Linux + GLFW 后端下目前三条引入路径都无法构建成功。

环境

项 值
系统 Ubuntu 24.04.5,CMake 3.28.3
EUI-NEO dev 4691fc0a5c1fde6f3e22f1ac454ed87c7a17f722

复现(bundled)

cmake -S . -B build-bundled -DEUI_DEPS_MODE=bundled -DGLFW_BUILD_WAYLAND=OFF
CMake Error at 3rd/dependencies.cmake:291 (message):
  Failed to prepare the GLFW X11 IME fix:
  CMake Error at scripts/patch_glfw_x11_ime.cmake:20 (message):
    Unsupported GLFW X11 source hash
    8CE625AA965D6DA401CE3F4992FDB53AC4ECD34BC00B22BBAEFFAB41F72B0DAE; expected
    bundled GLFW 3.4 BBCBDD40E744D3FD83E439A13E0C03F0EC6256C6C7D19A456C0BA20E1CA36C91
    or patched B1B9E54E20A687EC45E869D0D0E942220D68F087BF0727CB2091C7E9BF56ED12.

(报错里的 8CE625AA... 是当前 dev 捆绑文件——4691fc0 已把 6 行修复直接提交进 3rd/glfw/src/x11_window.c——即脚本认不出自己仓库里的文件。fetch 路径同理失败:脚本下载的正是官方 3.4 zip,其原始 x11_window.c 也不在白名单内。)

哈希取证

文件 实测 SHA256
官方 GLFW 3.4 zip(SHA256 a133ddc3...,与 3rd/dependencies.cmake FetchContent 的 URL_HASH 一致)解出的 src/x11_window.c 7C5A60A507767C5B311437A74E85E547914DF631BE4F74FA75746063762019DA
脚本 expected_source_hash(注释称"bundled GLFW 3.4") BBCBDD40... —— 与官方 3.4 真实文件不符
dev 捆绑文件 3rd/glfw/src/x11_window.c(已含 6 行修复) 8CE625AA965D6DA401CE3F4992FDB53AC4ECD34BC00B22BBAEFFAB41F72B0DAE
按脚本自身的字符串替换逻辑(KeyPress/KeyRelease 两处插入 if (filtered) return;)对官方 3.4 原始文件手工变换的产物 8CE625AA... —— 与 dev 捆绑文件逐位一致
脚本 expected_output_hash B1B9E54E... —— 不对应任何真实文件

结论:expected_output_hash 的正确值应为 8CE625AA...(即补丁变换的真实产物/dev 捆绑文件现状),两个常量目前都匹配不到任何真实文件。

期望(建议修复,任一)

  1. 更新两个哈希常量为实测值(pristine 7C5A60A5...、patched 8CE625AA...);
  2. 或改为按 KeyPress/KeyRelease 上下文匹配做幂等判断,不依赖哈希白名单(对 GLFW 升级更健壮)。

临时绕行(本地验证用)

把 expected_output_hash 改为 8CE625AA965D6DA401CE3F4992FDB53AC4ECD34BC00B22BBAEFFAB41F72B0DAE,脚本即按"已打补丁"COPYONLY 放行,构建产物与上游提交的捆绑文件逐位一致。

Dominant language
C++
Stars
2k
Forks
177
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sudoevolve/EUI-NEO

All issues in sudoevolve/EUI-NEO

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.