Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#3,337 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, lua

Direzione di ricerca

Ispeziona 3rd/bee.lua/3rd/lua-patch/fast_setjmp_arm64.s insieme a 3rd/bee.lua/3rd/lua55/ldo.c, concentrandoti sui simboli esportati e sui relativi riferimenti Windows ARM64. Esegui la build MSVC armasm64, quindi verifica che la fase di assemblaggio venga completata e che l'eseguibile risultante venga collegato e funzioni senza modificare il comportamento previsto di fast_setjmp o fast_longjmp.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
Lua
Stelle
4.4k
Fork
442
Merge medio
8g 9h
PR unite (30g)
1

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LuaLS/lua-language-server

Tutte le issue di LuaLS/lua-language-server

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.