Closed DSOE1024 closed 3 months ago
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 scons use_llvm=yes
).
You may also wish to test if export templates compile for you (scons use_llvm=yes target=template_debug
).
I made a chart of what compiles and doesn't compile for me here: https://github.com/godotengine/godot-proposals/issues/3374
我能够在官方 2024-05 映像上使用 Clang 编译 RISC-V 的主分支,并且仅调试构建(使用命令)。
scons use_llvm=yes
您可能还希望测试导出模板是否适合您编译 ()。
scons use_llvm=yes target=template_debug
我在这里为我制作了一个编译和不编译的图表: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 @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.
Hello, I will try to test it in the near future and give you the results
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.
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!
Hello @DSOE1024!
一段时间以来,我能够使用 GCC+LLVM 19.0.0git 成功地交叉编译用于 RISC-V 的 Godot(4.3.beta 和 4.2.rc)的自定义构建。所以,我想知道你是否可以测试这些简单的 2D 项目,看看是否一切正常。提前致谢。
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 --sysroot
is where the sysroot inside the toolchain is located and --gcc-toolchain
is the complete toolchain, and finally -target riscv64-unknown-linux-gnu
to force LLVM to compile code for RISC-V (again, I assume you're compiling on bare metal so you may not need it).
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. test-rv64-43.zip test-rv64-42.zip
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!
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
您好 !一段时间以来,我能够使用 GCC+LLVM 19.0.0git 成功地为 RISC-V 交叉编译我的 Godot 自定义版本(4.3.beta 和 4.2.rc)。所以,我想知道您是否可以测试这些简单的 2D 项目,看看是否一切正常。提前感谢。 test-rv64-43.zip test-rv64-42.zip
您好,很抱歉花了这么长时间才回复。由于性能原因,我更换了我的 RISC-V 设备,并将其从 JH7110 Soc 升级到 SpacemiT Key Stone K1。我已经测试了您的项目,它使用软渲染管道 OpenGL 顺利且正常地启动,这太棒了!
很高兴知道我花在设置工具链上的所有时间都是值得的!
不过哪个版本有效?4.2, 4.3?双?
Yes, they all work
In the meantime, I'm trying to compile to follow your guide and I'm verifying if it works, thanks
您好 !一段时间以来,我能够使用 GCC+LLVM 19.0.0git 成功地为 RISC-V 交叉编译我的 Godot 自定义版本(4.3.beta 和 4.2.rc)。所以,我想知道您是否可以测试这些简单的 2D 项目,看看是否一切正常。提前感谢。 test-rv64-43.zip test-rv64-42.zip
您好,很抱歉花了这么长时间才回复。由于性能原因,我更换了我的 RISC-V 设备,并将其从 JH7110 Soc 升级到 SpacemiT Key Stone K1。我已经测试了您的项目,它使用软渲染管道 OpenGL 顺利且正常地启动,这太棒了!
很高兴知道我花在设置工具链上的所有时间都是值得的!
不过哪个版本有效?4.2, 4.3?双?
Yes, they all work
In the meantime, I'm trying to compile to follow your guide and I'm verifying if it works, thanks
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 Download them here (too big to upload on GitHub)
Friendly ping @aaronfranke, could you also test these binaries and confirm if they work on your RISC-V devices, if you can?
甜!!
如果可以的话,我希望你再做一次测试,确认我的构建是否也能成为一个完全可用的 4.x 编辑器 在这里下载它们(太大了,无法上传到 GitHub)
友好的 ping ,如果可以,您能否也测试这些二进制文件并确认它们是否适用于您的 RISC-V 设备?
Wow, they can all run up, on top of my MuseBook (K1 chip)
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 Download them here (too big to upload on GitHub)
Friendly ping @aaronfranke, could you also test these binaries and confirm if they work on your RISC-V devices, if you can?
Can we fork a godot repository and create an Action for the RISC-V version?
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 Download them here (too big to upload on GitHub)
Friendly ping @aaronfranke, could you also test these binaries and confirm if they work on your RISC-V devices, if you can?
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