LuaLS / LuaLS/lua-language-server
[Build] Windows ARM64 build failure: undefined symbol __longjmp_wrapper in fast_setjmp_arm64.s
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
Description:
When attempting to compile lua-language-server on Windows on Arm using the MSVC toolchain (armasm64), the build fails during the assembly phase of the bee.lua dependency.
The assembler throws an error because the file 3rd/bee.lua/3rd/lua-patch/fast_setjmp_arm64.s attempts to export a symbol that is never defined in the text area, while also failing to export fast_longjmp.
Environment:
OS: Windows 11 (Arm64)
Compiler: MSVC (Host: ARM64, Target: ARM64)
Tool: armasm64.exe
Error Logs:
[1/125] Compile ASM build/obj/source_lua/fast_setjmp_arm64.obj
FAILED: build/obj/source_lua/fast_setjmp_arm64.obj
armasm64 -nologo -o build/obj/source_lua/fast_setjmp_arm64.obj 3rd/bee.lua/3rd/lua-patch/fast_setjmp_arm64.s
C:\Code\Tools\lua-language-server\3rd\bee.lua\3rd\lua-patch\fast_setjmp_arm64.s(40) : error A2023: undefined symbol: __longjmp_wrapper
END
[6/125] Compile C build/obj/source_lua/onelua.obj
C:\Code\Tools\lua-language-server\3rd\bee.lua\3rd\lua55\ldo.c(131): warning C4013: 'fast_longjmp' undefined; assuming extern returning int
C:\Code\Tools\lua-language-server\3rd\bee.lua\3rd\lua55\ldo.c(169): warning C4013: 'fast_setjmp' undefined; assuming extern returning int
[14/125] Compile C++ build/obj/source_bee/error.obj
ninja: build stopped: subcommand failed.
Proposed Workaround / Fix:
I was able to successfully generate the executable by modifying fast_setjmp_arm64.s as follows:
- Removing the EXPORT __longjmp_wrapper line (as it has no corresponding label).
- Adding EXPORT fast_longjmp to ensure the symbol is visible to the C code in ldo.c
Modified Assembly Header:
EXPORT fast_setjmp
EXPORT fast_longjmp ; Added this
; EXPORT __longjmp_wrapper ; Removed this as it caused error A2023: undefined symbol: __longjmp_wrapper
Questions/Concerns:
While this allows the build to complete and the server to run, I am not 100% sure if:
__longjmp_wrapperwas intended to be an alias forfast_longjmpfor compatibility with specific Windows exception handling.- There is a specific reason
fast_longjmpwas omitted from the exports in the original ARM64 patch.
Could the maintainers verify if this is the correct way to align the ARM64 assembly with the Windows MSVC requirements?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
检查 3rd/bee.lua/3rd/lua-patch/fast_setjmp_arm64.s 和 3rd/bee.lua/3rd/lua55/ldo.c,重点关注导出符号及其 Windows ARM64 引用。运行 MSVC armasm64 构建,然后验证汇编阶段已完成,且生成的可执行文件能够链接并运行,同时不改变 fast_setjmp 或 fast_longjmp 的预期行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, lua
- 领域
- build-system, operating-systems
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100