Hey there! I want to compile the export templates so I can encrypt my builds. On my apple silicon machine, I’ve got it working for web, windows and mac but I can’t get it to work for linux.
nubels@ac1668b3 godot % scons platform=list
scons: Reading SConscript files ...
The following platforms are available:
ios
macos
web
windows
Please run SCons again and select a valid platform: platform=<string>.
nubels@ac1668b3 godot % PATH="$RISCV_TOOLCHAIN_PATH/bin:$PATH" \
scons arch=rv64 use_llvm=yes linker=mold lto=none target=editor \
ccflags="--sysroot=$RISCV_TOOLCHAIN_PATH/sysroot --gcc-toolchain=$RISCV_TOOLCHAIN_PATH -target riscv64-unknown-linux-gnu" \
linkflags="--sysroot=$RISCV_TOOLCHAIN_PATH/sysroot --gcc-toolchain=$RISCV_TOOLCHAIN_PATH -target riscv64-unknown-linux-gnu"
scons: Reading SConscript files ...
Automatically detected platform: macos
Auto-detected 14 CPU cores available for build parallelism. Using 13 cores by default. You can override it with the `-j` or `num_jobs` arguments.
ERROR: Unsupported CPU architecture "rv64" for macOS. Supported architectures are: x86_64, arm64.
I’ve got gcc installed but scons doesn’t list linuxbsd.
nubels@ac1668b3 godot % which gcc
/usr/bin/gcc
nubels@ac1668b3 godot % scons platform=list
scons: Reading SConscript files ...
The following platforms are available:
ios
macos
windows
Please run SCons again and select a valid platform: platform=<string>.
But on apple sillicon (arm64 architecture) your gcc should target arm64
My gcc on x86-64 linux targets x86-64
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Still, Linux also supports arm64 so I feel that it should be displayed in the list so long as you have a valid libc and linker (like mold for the correct architecture).
You will need to add platform=linuxbsd to your scons command to build for linux, that’s why your final error states you are still trying to build for macOS
ERROR: Unsupported CPU architecture "rv64" for macOS. Supported architectures are: x86_64, arm64.
Yeah I’m not sure why linuxbsd isn’t listed as an available platform, did you install a mold version for x86_64? did you install glibc for x86_64? A virtual machine sounds like a good path to have a stable linux environment.
The other platforms do not have a RISC-V section because so far linux is the only operating system that has been built for RISC-V. RISC-V is an architecture like ARM64 or x86_64, it is not a platform by itself. Cross compiling linux is not related to, nor does it require RISC-V.