Hm, here's the interesting part from the strace output:
faccessat(AT_FDCWD, "/usr/lib/gcc/riscv64-linux-gnu/13riscv64-linux-gnu/13/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/gcc/riscv64-linux-gnu/13riscv64-linux-gnu/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/gcc/riscv64-linux-gnu/13crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/gcc/riscv64-linux-gnu/../../riscv64-linux-gnu/lib/riscv64-linux-gnu/13/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/gcc/riscv64-linux-gnu/../../riscv64-linux-gnu/lib/riscv64-linux-gnu/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/gcc/riscv64-linux-gnu/../../riscv64-linux-gnu/lib/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/lib64/lp64d/riscv64-linux-gnu/13/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/lib64/lp64d/riscv64-linux-gnu/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/lib64/lp64d/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib64/lp64d/riscv64-linux-gnu/13/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib64/lp64d/riscv64-linux-gnu/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib64/lp64d/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/lib/riscv64-linux-gnu/13/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/lib/riscv64-linux-gnu/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/lib/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/riscv64-linux-gnu/13/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/riscv64-linux-gnu/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
For some reason, it's trying to load crtbeginS.so from gcc-13, even though I compiled the program using gcc-12 and don't even have libgccjit-13-dev installed. I wonder why this doesn't happen in other architectures, though. I will double check.
Hm, here's the interesting part from the strace output:
faccessat(AT_FDCWD, "/usr/lib/ gcc/riscv64- linux-gnu/ 13riscv64- linux-gnu/ 13/crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) gcc/riscv64- linux-gnu/ 13riscv64- linux-gnu/ crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) gcc/riscv64- linux-gnu/ 13crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) gcc/riscv64- linux-gnu/ ../../riscv64- linux-gnu/ lib/riscv64- linux-gnu/ 13/crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) gcc/riscv64- linux-gnu/ ../../riscv64- linux-gnu/ lib/riscv64- linux-gnu/ crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) gcc/riscv64- linux-gnu/ ../../riscv64- linux-gnu/ lib/crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) lp64d/riscv64- linux-gnu/ 13/crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) lp64d/riscv64- linux-gnu/ crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) lp64d/crtbeginS .o", R_OK) = -1 ENOENT (No such file or directory) lp64d/riscv64- linux-gnu/ 13/crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) lp64d/riscv64- linux-gnu/ crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) lp64d/crtbeginS .o", R_OK) = -1 ENOENT (No such file or directory) linux-gnu/ 13/crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) linux-gnu/ crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) riscv64- linux-gnu/ 13/crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) riscv64- linux-gnu/ crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory) crtbeginS. o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/
faccessat(AT_FDCWD, "/usr/lib/
faccessat(AT_FDCWD, "/usr/lib/
faccessat(AT_FDCWD, "/usr/lib/
faccessat(AT_FDCWD, "/usr/lib/
faccessat(AT_FDCWD, "/lib64/
faccessat(AT_FDCWD, "/lib64/
faccessat(AT_FDCWD, "/lib64/
faccessat(AT_FDCWD, "/usr/lib64/
faccessat(AT_FDCWD, "/usr/lib64/
faccessat(AT_FDCWD, "/usr/lib64/
faccessat(AT_FDCWD, "/lib/riscv64-
faccessat(AT_FDCWD, "/lib/riscv64-
faccessat(AT_FDCWD, "/lib/crtbeginS.o", R_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/usr/lib/
faccessat(AT_FDCWD, "/usr/lib/
faccessat(AT_FDCWD, "/usr/lib/
For some reason, it's trying to load crtbeginS.so from gcc-13, even though I compiled the program using gcc-12 and don't even have libgccjit-13-dev installed. I wonder why this doesn't happen in other architectures, though. I will double check.