1

I am trying to run an emulation of ARM VExpress in QEmu. My End platform is Windows64. And my build system is running Linux64. I am using QEmu version 2.3.0 and x86_64-w64-mingw32 toolchain.

I faced quite a lot of issues during the build, but solved some on my own. One of them was the tool chain on installation doesn't contain a glib library and i had to import one i got from searching round the internet. So after adding some pkg-config files and copying this set of glib to the lib folder i got the whole thing to start compiling.

How ever now i am facing a new issue. It is checking for librt while the toolchain doesnt have a librt. I got a version of librt and added that to the toolchain lib folder and the compilation is throwing the below error. Any help at any steps is appreciated.

make  all-recursive
Making all in pixman
make[3]: Nothing to be done for 'all'.
Making all in demos
make[3]: Nothing to be done for 'all'.
Making all in test
make[3]: Nothing to be done for 'all'.
        CHK version_gen.h
  LINK  qemu-ga.exe
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(libglib_2_0_la-gutils.o):(.text+0x505): undefined reference to `__imp_CoTaskMemFree'
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(libglib_2_0_la-gutils.o):(.text+0x613): undefined reference to `__imp_CoTaskMemFree'
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(libglib_2_0_la-gutils.o):(.text+0x6a6): undefined reference to `__imp_CoTaskMemFree'
/usr/bin/x86_64-w64-mingw32-ld: /home/user/Downloads/mingw/glib/lib/libglib-2.0.a(libglib_2_0_la-gutils.o): bad reloc address 0x0 in section `.pdata'
collect2: error: ld returned 1 exit status
Makefile:288: recipe for target 'qemu-ga.exe' failed
make: *** [qemu-ga.exe] Error 1

Edit 1: Fixed the above issue by adding -lole32 to the config-host.mak file at LIBS and LIBS_QGA heads.

But now facing below issue

LINK  qemu-ga.exe
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(giowin32.o):(.text+0x14d8): undefined reference to `libintl_sprintf'
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(giowin32.o):(.text+0x1507): undefined reference to `libintl_sprintf'
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(giowin32.o):(.text+0x1536): undefined reference to `libintl_sprintf'
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(giowin32.o):(.text+0x1565): undefined reference to `libintl_sprintf'
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(giowin32.o):(.text+0x1594): undefined reference to `libintl_sprintf'
/home/user/Downloads/mingw/glib/lib/libglib-2.0.a(giowin32.o):(.text+0x15f2): more undefined references to `libintl_sprintf' follow
/usr/bin/x86_64-w64-mingw32-ld: /home/user/Downloads/mingw/glib/lib/libglib-2.0.a(giowin32.o): bad reloc address 0x0 in section `.data'
collect2: error: ld returned 1 exit status
Makefile:288: recipe for target 'qemu-ga.exe' failed
make: *** [qemu-ga.exe] Error 1

Proceeded from this.

I downloaded and compiled libintl from gettext package and manually installed it in the toolchain. Did the same for libiconv and libffi.

Right now, i am receiving the following error.

LINK  arm-softmmu/qemu-system-arm.exe
numa.o: In function `numa_node_parse':
/home/user/qemu-2.3.0/numa.c:107: undefined reference to `__imp_g_ascii_table'
hw/arm/boot.o: In function `load_image_to_fw_cfg':
/home/user/qemu-2.3.0/hw/arm/boot.c:546: undefined reference to `g_file_get_contents'
../vl.o: In function `set_memory_options':
/home/user/qemu-2.3.0/vl.c:2666: undefined reference to `__imp_g_ascii_table'
../hw/core/loader.o: In function `load_image_gzipped_buffer':
/home/user/qemu-2.3.0/hw/core/loader.c:629: undefined reference to `g_file_get_contents'
../hw/nvram/fw_cfg.o: In function `read_splashfile':
/home/user/qemu-2.3.0/hw/nvram/fw_cfg.c:97: undefined reference to `g_file_get_contents'
collect2: error: ld returned 1 exit status
Makefile:182: recipe for target 'qemu-system-arm.exe' failed
make[1]: *** [qemu-system-arm.exe] Error 1
Makefile:173: recipe for target 'subdir-arm-softmmu' failed
make: *** [subdir-arm-softmmu] Error 2

Trying to compile glib library to try resolve this. Thank you for any help.

  • [The docs](http://wiki.qemu.org/Hosts/W32) list a few other build dependencies, and also suggest you have a too-old version of glib there. – Notlikethat Sep 21 '15 at 22:11
  • I was unable to find a up to date version of glib for the toolchain(x86_64-w64-mingw32). I tried compiling my own version too. but was again stuck in resolving dependencies – pavo kristiani Sep 22 '15 at 05:02

0 Answers0