fractalclone / zephyr-riscv

Zephyr port to riscv architecture
Apache License 2.0
24 stars 10 forks source link

ERROR: glib-2.22 gthread-2.0 is required to compile QEMU #7

Closed ninode closed 7 years ago

ninode commented 7 years ago

Hello,

The configure gives the following error.


alpha@alpha-VirtualBox:~/zephyr/riscv-gnu-toolchain/riscv-qemu$ ./configure --target-list=riscv64-softmmu,riscv32-softmmu --prefix=/opt/riscv

ERROR: glib-2.22 gthread-2.0 is required to compile QEMU

I have build-essential, libc6-dev and when I install apt-get install libglib2.0-dev zlib1g-dev, I get the broken packages error. Could you please tell me what I'm missing ?

Thank you

fractalclone commented 7 years ago

Hi, this is a riscv-qemu related issue. Have you raised an issue at https://github.com/riscv/riscv-qemu?

Moreover, if your plan is only to test zephyr-riscv, I'll advice you to use the zephyr-sdk instead of trying to compile the toolchain and riscv-qemu manually. The zephyr-sdk comes with full riscv-toolchain support (including gdb) and riscv-qemu. https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.1/zephyr-sdk-0.9.1-setup.run

Follow the instructions given in the README on how to setup the zephyr-sdk to compile zephyr-riscv.

Regards.

ninode commented 7 years ago

Hi @fractalclone, I did run the zephyr SDK and still got the error. I've raised the issue in riscv-qemu.

Thank you

fractalclone commented 7 years ago

I don't understand, the zephyr-sdk is a binary that you install on your host PC, compilation is not required here. The zephyr-sdk comprises riscv toolchain binaries and riscv-qemu binaries and it has its own host tools and libraries that allows it to run independently on any linux distributions. Normally, once you have installed the zephyr-sdk you only have to do the following to compile and run a sample app (like philosophers):

$ git clone https://github.com/fractalclone/zephyr-riscv.git
$ cd zephyr-riscv
$ source zephyr-env.sh
$ export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk
$ export ZEPHYR_GCC_VARIANT=zephyr
$ cd samples/philosophers
$ make BOARD=qemu_riscv32 run

Here I assume that you have installed the zephyr-sdk at /opt/zephyr-sdk

ninode commented 7 years ago

I'm sorry I misunderstood the either or part. My bad. Thank you very much !

fractalclone commented 7 years ago

Yep, I'll update the README to avoid any confusion.