-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile correctly on RISC-V platform #91381
Comments
CC @aaronfranke |
Hello @DSOE1024! For some time now I was able to successfully cross-compile my custom build of Godot (4.3.beta and 4.2.rc) for RISC-V using GCC+LLVM 19.0.0git. So, I was wondering if you could test these simple 2D projects to see if everything works. Thanks in advance. |
I was able to compile the master branch for RISC-V on the official 2024-05 image, with Clang, and debug builds only (using the command You may also wish to test if export templates compile for you ( I made a chart of what compiles and doesn't compile for me here: godotengine/godot-proposals#3374 |
Hello, thank you very much for your reply. It seems that version 3.6 has been able to run, but I think version 4.x still can't run on RISC-V platform. What is the cause? P.s. : I was able to compile with GCC 13, but it didn't start properly |
Hello, I will try to test it in the near future and give you the results |
Hello, I'm sorry for taking so long to reply. Due to performance reasons, I changed my RISC-V device and upgraded it from JH7110 Soc to SpacemiT Key Stone K1. I have tested your project and it starts smoothly and normally using the soft rendering pipeline OpenGL, which is great! |
Please how did you compile it, the 4.x version currently I can only run in headless mode I built successfully with llvm17 but it doesn't work, I'm going to try llvm19 Thank you so much |
No problem! I can give you the steps I took to compile it. Keep in mind that I have to do a bit more since I'm cross-compiling, but hopefully not too bad.
clang version 19.0.0git (https://github.com/llvm/llvm-project.git 0cee89431d77d0bb0809fd9b2c9d21da2a2783aa)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
mold 2.31.0 (3ec4b1787ea412409fbb571f3b9911f23fae2325; compatible with GNU ld)
scons -j4 arch="rv64" use_llvm="yes" linker="mold" lto="none" \
target="template_debug" platform="linux" \
precision="single" module_text_server_fb_enabled="yes" \
module_theora_enabled="no" \
module_denoise_enabled="no" \
module_raycast_enabled="no" \
module_xatlas_unwrap_enabled="no" \
ccflags="--sysroot=$HOME/sysroot/riscv-unknown-linux-gnu/sysroot --gcc-toolchain=$HOME/sysroot/riscv-unknown-linux-gnu -target riscv64-unknown-linux-gnu" \
linkflags="--sysroot=$HOME/sysroot/riscv-unknown-linux-gnu/sysroot --gcc-toolchain=$HOME/sysroot/riscv-unknown-linux-gnu -target riscv64-unknown-linux-gnu" where |
Good to know that all that time I spent setting-up the toolchain was worth it! Which version worked though? 4.2, 4.3? Both? @DSOE1024 |
Yes, they all work In the meantime, I'm trying to compile to follow your guide and I'm verifying if it works, thanks |
1 similar comment
This comment was marked as duplicate.
This comment was marked as duplicate.
Sweet!! I'd like you to do one more test if you can, confirm if my builds also make a fully-usable 4.x editor Friendly ping @aaronfranke, could you also test these binaries and confirm if they work on your RISC-V devices, if you can? |
Wow, they can all run up, on top of my MuseBook (K1 chip) |
Can we fork a godot repository and create an Action for the RISC-V version? |
Hello, I verified that compiling and running Godot natively on RISC-V devices, using clang-17 under openKylin 2.0 system (I think it may be better than clang-19, more stable), gcc-13, mold 2.4 compiling Godot went very smoothly, and the GPU DDK in openKylin 2.0 is complete, so you can call IMG's GPU to start with GLES backend, which is relatively smooth. I have verified on SpacemiT K1, and I will verify the operation on the development board equipped with JH7110, SG2042, etc |
Thanks, so it sounds I've discovered the krappy-patty formula! I'm currently writing the detailed instructions in the docs, so that you can give them a look. |
Tested versions
4.2
4.1.2
System information
openKylin 2.0 riscv64 StarFive VisionFive V2
Issue description
Hi, this is the fourth system I've tried compiling Godot on a RISC-V device (I've tried Debian, Arch, Ubuntu before, I still haven't built success, all failed). I know RISC-V doesn't have the right chips to run games right now, but there's still a need to run a Godot editor, export templates, and a graphicless server.
Previously I knew that building with gcc would cause problems, this time I tried it and ran into problems again, even though I upgraded to GCC-13.
But clang can't be built this time, that is, can Godot currently compile and run on RISC-V? I don't know if anyone else has tested it.
I added in the Godot document that compiling in RISC-V should use clang, but now there seem to be some problems. First of all, I confirm that gcc13 version is required to be normal in the compilation phase, but errors will be reported in the linking phase, and clang is the same.
Here is my error log information and compiler information.
when use gcc 13 and g++ 13
when use clang
If you have a different RISC-V board (I tested VisionFive2 and MilkV Mars), you can try compiling Godot and attaching the question to this issue, thank you very much!
Love for Godot
Steps to reproduce
scons -j4
scons -j4 use_llvm=yes
The text was updated successfully, but these errors were encountered: