Skip to contentSkip to conversation

qemu upstream arm compile error failed

DISCUSSION Mao Mingy 2 participants 2 messages Jan 7, 2015

lore
Share & tools
lore

Mao Mingy

author
#0 lore raw

I tried to use the qemu upstream on xen Dom0 (arm arch) to get the PVFB, PVKBD and PVMOUSE work.

However, I got compiler error at the begin. Here are the detail steps:
1. download the source code from " git://git.qemu-project.org/qemu.git ".
2. " cd qemu "
3. configure using command "./configure --cross-prefix=arm-linux-gnueabihf- --target-list=arm-softmmu --enable-fdt"
4. " make "

However, I got the following compile error

GEN tests/test-qmp-commands.h

  GEN   tests/test-qapi-event.h
  CC    tests/qemu-iotests/socket_scm_helper.o
  LINK  tests/qemu-iotests/socket_scm_helper

/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgthread-2.0 /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lglib-2.0
collect2: error: ld returned 1 exit status
make: *** [tests/qemu-iotests/socket_scm_helper] Error 1

Looks like the build process need some libs missed in my gcc-cross/arm-linux-gnueabihf/4.8

What is the reason and solution?

Thanks & Regards,
Mao

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 2 lines · Mao Mingy

I tried to use the qemu upstream on xen Dom0 (arm arch) to get the PVFB, PVKBD and PVMOUSE work.

With Xen 4.5 qemu is automatically built for ARM, no need to do it separately AFAIK.

Also note that you need to build qemu for i386, even on ARM (since the PV backends are currently entwined with x86 for historical reasons. This doesn't matter since qemu does no CPU emulation under Xen anyway.

Lastly:

Quoted 2 lines

/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lgthread-2.0 /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lglib-2.0

I think it is pretty obvious from these error messages that you are missing some build dependencies, this isn't a Xen specific issue AFAICT. The solution is to make ARM versions of those libraries available in your cross environment.

Ian.