LuaLS / LuaLS/lua-language-server
[Build] Windows ARM64 build failure: undefined symbol __longjmp_wrapper in fast_setjmp_arm64.s
まだ誰も着手していません。
- 主要言語
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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