Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[Build] Windows ARM64 build failure: undefined symbol __longjmp_wrapper in fast_setjmp_arm64.s

未關閉
#3,337 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
45/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
c, lua

研究方向

檢查 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 內容生成。

描述

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:

  1. Removing the EXPORT __longjmp_wrapper line (as it has no corresponding label).
  2. 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:

  1. __longjmp_wrapper was intended to be an alias for fast_longjmp for compatibility with specific Windows exception handling.
  2. There is a specific reason fast_longjmp was 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?

主要語言
Lua
星號
4.4k
分支
446
平均合併
13 天 21 小時
30 天內合併 PR
5

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

LuaLS/lua-language-server 的其他 Issue

查看 LuaLS/lua-language-server 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。