QEmu で ARM VExpress のエミュレーションを実行しようとしています。私のエンドプラットフォームはWindows64です。私のビルドシステムは Linux64 を実行しています。QEmu バージョン 2.3.0 と x86_64-w64-mingw32 ツールチェーンを使用しています。
ビルド中にかなり多くの問題に直面しましたが、いくつかは自力で解決しました。そのうちの 1 つは、インストール時のツール チェーンに glib ライブラリが含まれておらず、インターネットで検索して入手したものをインポートする必要があったことです。そのため、いくつかの pkg-config ファイルを追加し、この一連の glib を lib フォルダーにコピーした後、すべてをコンパイルし始めました。
今、私は新しい問題に直面しています。ツールチェーンに librt がないときに、librt をチェックしています。librt のバージョンを取得し、それをツールチェーンの lib フォルダーに追加すると、コンパイルで以下のエラーがスローされます。どのステップでも助けていただければ幸いです。
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
編集 1: LIBS および LIBS_QGA の先頭にある config-host.mak ファイルに -lole32 を追加して、上記の問題を修正しました。
しかし、現在、以下の問題に直面しています
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
これから進んだ。
gettext パッケージから libintl をダウンロードしてコンパイルし、ツールチェーンに手動でインストールしました。libiconv と libffi についても同じことを行いました。
現在、次のエラーが表示されます。
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
これを解決するために glib ライブラリをコンパイルしようとしています。助けてくれてありがとう。