compile C code on BeagleV

Hi all
trying to compile a simple HelloWorld C program on BeagleV
gcc -Wall hello.c -o hello
and I get
/usr/lib/gcc/riscv64-oe-linux/12.2.0/…/…/…/…/riscv64-oe-linux/bin/ld: cannot find crtbeginS.o: No such file or directory
/usr/lib/gcc/riscv64-oe-linux/12.2.0/…/…/…/…/riscv64-oe-linux/bin/ld: cannot find -lgcc: No such file or directory
/usr/lib/gcc/riscv64-oe-linux/12.2.0/…/…/…/…/riscv64-oe-linux/bin/ld: cannot find -lgcc: No such file or directory

So i thought i would compile it on my Ubuntu desktop
riscv64-linux-gnu-gcc -Wall hello.c -o hello
scp it to BeagleV and change the file to executable
and i get
./hello: No such file or directory

I have no problem doing this on Beaglebone Black, arm based
so i’m assuming this has something to do with risc-V 64 bit
any help ??

uname -a
Linux BeagleV 5.10.113-yocto-standard #1 SMP PREEMPT Fri Jul 28 20:31:29 UTC 2023 riscv64 GNU/Linux

image build by xuantie-yocto

Edit #1
the Buildroot image compiles and executes the Hello World C code without any issues.
it also executes the app compiled on Ubuntu desktop.

Edit #2
it is xuantie-ubuntu image that compiles files, not Buildroot.