[aarch64] compilation error : gamebuild fails: fp_op_s and FOP_SUB undeclared in generated main_553.c
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 44/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c, zig
- Domain
- build-system
Research direction
Start by inspecting the swgen code-generation path and the generated extracted/.gamebuild/main/main_553.c around line 14756; the issue does not name the generator source files or tests. Check how this path emits declarations for fp_op_s and FOP_SUB, then reproduce the aarch64 gamebuild with zig cc if the project setup allows it. Done means the generated code compiles on the reported aarch64 environment.
Written by the indexing model from the issue text.
Description
Before you start
- I'm on the latest release, and the bug still happens there.
- I searched the existing issues and this one isn't reported yet.
Savage Wind version
0.4.1-alpha.4 (latest)
Game version
1.9.0
Your PC
konkr pocket fit snapdragon g3 gen 3
Where in the game
compilation
What happened, and how to make it happen again
Hi,
I'm reporting a build failure on aarch64 (KONKR Pocket G3, running through DroidDeck). The documentation says aarch64 is experimental and that community reports decide whether it works, so here is my report.
Environment
· Device: KONKR Pocket G3
· OS / frontend: DroidDeck (Linux environment)
· Architecture: aarch64 (ARM64)
· Savage Wind version: 0.4.0-alpha.4 (commit cb981817, tree 1b542ba2)
· GPU: Turnip Adreno (TM) 750
· Driver: Mesa 27.0.0-devel (git-b1a8996cb3), Vulkan API 1.4.366
· Generator/compiler used by gamebuild: swgen + zig cc, 8 jobs
What happened
After setting up my own game files, the game entered the gamebuild phase. It compiled for about 449 seconds, then failed while compiling the generated file extracted/.gamebuild/main/main_553.c with zig cc.
The two errors are:
extracted/.gamebuild/main/main_553.c:14756:126: error: call to undeclared function 'fp_op_s'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
14756 | { extern int rt_surf_takeoff_pending(uint64_t); if (rt_surf_takeoff_pending(c->x[21])) c->v[0] = (uint32_t)c->v[1]; else fp_op_s(c, FOP_SUB, 0, 1, 0); }
| ^
extracted/.gamebuild/main/main_553.c:14756:137: error: use of undeclared identifier 'FOP_SUB'
14756 | { extern int rt_surf_takeoff_pending(uint64_t); if (rt_surf_takeoff_pending(c->x[21])) c->v[0] = (uint32_t)c->v[1]; else fp_op_s(c, FOP_SUB, 0, 1, 0); }
| ^~~~~~~
2 errors generated.
[gamebuild] failed in 449s
[launcher] game code: the game code didn't compile
Reproduction steps
- Run Savage Wind 0.4.0-alpha.4 (aarch64) on KONKR Pocket G3 / DroidDeck.
- Point it at my own game files and let it set them up.
- Wait for the automatic gamebuild step (recompile game code from my files).
- After ~449 s, compilation fails with the errors above.
My analysis
This looks like a code-generator (swgen) issue rather than a compiler or runtime problem. The generated snippet emits a call to fp_op_s(...) with the constant FOP_SUB on the else branch, but the generated file does not declare fp_op_s or define FOP_SUB anywhere before that point. The other runtime helper in the same line (rt_surf_takeoff_pending) is declared locally via extern int rt_surf_takeoff_pending(uint64_t);, so it seems the generator emits a local declaration for one helper but not for fp_op_s, and never emits the FOP_SUB enum/constant. This may be specific to the aarch64 target's codegen path or runtime header inclusion.
Settings
No response
savagewind.log
Before sending
- This report contains no game files, keys, firmware, generated game code, save files or links to copies of the game.
- Dominant language
- C
- Stars
- 811
- Forks
- 37
- Avg merge
- 17m
- Merged PRs (30d)
- 13
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Revivedx/SavageWindRecomp
-
Surround soundOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Revivedx/SavageWindRecomp#573 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 43/100
Revivedx/SavageWindRecomp#570 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Revivedx/SavageWindRecomp#569 · 1 comment · 2 reactions ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Revivedx/SavageWindRecomp#568 ·
Maintainers usually reply within 1 day
-
Fatal:svcBreakOpenbug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Revivedx/SavageWindRecomp#567 ·
Maintainers usually reply within 1 day
All issues in Revivedx/SavageWindRecomp
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
msys2/MINGW-packages#33356 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kmod-project/kmod#492 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PecanProject/sipnet#435 · 1 comment ·
Maintainers usually reply within 2 days
-
SDL_GPU Vulkan: wrong screen orientation on OpenHarmony (preTransform set without pre-rotation)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
libsdl-org/SDL#16670 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100