Hi RISC-V community,
I am trying to cross-compile RISCV-qemu to be able to use on RISC-V architecture. I am planning to cross compile qemu on my intel machine, OS: linux-ubuntu and targets will be riscv64-linux-user and riscv32-linux-user. I disabled as much library as possible for now to minimize the errors. This is my configuration setting:
./configure --cross-prefix=riscv64-unknown-linux-gnu- --target-list=riscv64-linux-user,riscv32-linux-user --static --disable-zlib-test --prefix=configure-folder/ --disable-werror --disable-debug-info --disable-debug-tcg --enable-docs --disable-tcg-interpreter --enable-attr --disable-brlapi --disable-linux-aio ... ( more disables )
Unfortunately, this returned me:
ERROR: pkg-config binary 'riscv64-unknown-linux-gnu-pkg-config' not found
I do not now why riscv64 does not have this tool while intel has, i.e. there is x86_64-linux-gnu-pkg-config on my machine.
If I set c++ and c flags instead of providing a cross-prefix, I am getting this error:
ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
You probably need to set PKG_CONFIG_LIBDIR
to point to the right pkg-config files for your
build target
This seems normal, most probably it is looking for the default pkg-config which is x86_64 and giving this error.
Last thing that I tried is to set PKG_CONFIG_LIBDIR env. variable to point of riscv pkg-config file. However I am not able to find the path of it.
I will be appreciated to hear your feedbacks about these errors. Also, I am welcome to hear any other suggestions to cross compile qemu for risc-v architecture. As far as I see, there is no support for backend side of qemu for riscv, I am planning to try --enable-tcg-interpreter option and see if it works or not.
Thanks,
Sadullah