Building tools on unsupported cpu/arch
Hello!
Previously, it was possible to build qemu tools (such as qemu-img, or qemu-ga) on an unsupported cpu/architecture. In a hackish way, by specifying --enable-tcg-interpreter on the ./configure line.
Today (with 7.0), it does not work anymore, with the following error during configure:
common-user/meson.build:1:0: ERROR: Include dir host/unknown does not exist.
This is with --disable-system --disable-linux-user --disable-user.
And without --enable-tcg-interpreter, it gives:
meson.build:390:6: ERROR: Problem encountered: Unsupported CPU m68k, try --enable-tcg-interpreter
What's the way to build tools on an unsupported architecture these days?
Thanks,
/mjt
Quoted 11 lines · Michael Tokarev
Hello!
Previously, it was possible to build qemu tools (such as qemu-img, or qemu-ga) on an unsupported cpu/architecture. In a hackish way, by specifying --enable-tcg-interpreter on the ./configure line.
Today (with 7.0), it does not work anymore, with the following error during configure:
common-user/meson.build:1:0: ERROR: Include dir host/unknown does not exist.
Quoted 8 lines
This is with --disable-system --disable-linux-user --disable-user.
And without --enable-tcg-interpreter, it gives:
meson.build:390:6: ERROR: Problem encountered: Unsupported CPU m68k, try
--enable-tcg-interpreterWhat's the way to build tools on an unsupported architecture these days?
Hmm, well, there isn't a way. This seems like a bug in common-user/meson.build. We should not add this include directory if neither linux-user and bsd-user are enabled.
r~
30.04.2022 19:57, Richard Henderson wrote:
..
Quoted 4 lines
Quoted 1 line
What's the way to build tools on an unsupported architecture these days?
Hmm, well, there isn't a way. This seems like a bug in common-user/meson.build. We should not add this include directory if neither linux-user and bsd-user are enabled.
Aftr adding an if similar to linux-user/meson.build (with this condition), it fails down the line anyway:
cc -Ilibui-sdl.a.p -I. -I../.. -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/SDL2 -I/usr/include/pixman-1 -I/usr/include/glib-2.0 -I/usr/lib/hppa-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -g -isystem /home/mjt/qemu-7.0+dfsg/linux-headers -isystem linux-headers -iquote . -iquote /home/mjt/qemu-7.0+dfsg -iquote /home/mjt/qemu-7.0+dfsg/include -iquote /home/mjt/qemu-7.0+dfsg/disas/libvixl -iquote /home/mjt/qemu-7.0+dfsg/tcg/tci -pthread -U_FORTIFY_SOURCE -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -g -O2 -ffile-prefix-map=/home/mjt/qemu-7.0+dfsg=. -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_REENTRANT -Wno-undef -DBUILD_DSO -MD -MQ libui-sdl.a.p/ui_x_keymap.c.o -MF libui-sdl.a.p/ui_x_keymap.c.o.d -o libui-sdl.a.p/ui_x_keymap.c.o -c ../../ui/x_keymap.c In file included from ../../ui/x_keymap.c:15:../../ui/trace.h:1:10: fatal error: trace/trace-ui.h: No such file or directory
1 | #include "trace/trace-ui.h"
| ^~~~~~~~~~~~~~~~~~compilation terminated.
This is, again, --disable-system --disable-user --enable-tools, so it should not, I guess, compile ui-sdl. Or should it?
Thanks,
/mjt
Quoted 10 lines · Michael Tokarev
Hello!
Previously, it was possible to build qemu tools (such as qemu-img, or qemu-ga) on an unsupported cpu/architecture. In a hackish way, by specifying --enable-tcg-interpreter on the ./configure line.
Today (with 7.0), it does not work anymore, with the following error during configure:
common-user/meson.build:1:0: ERROR: Include dir host/unknown does not exist.
Did you ever send a patch for this? I something like this should do the job:
common-user/meson.build +4 -0
@@ -1,3 +1,7 @@ +if not have_user + subdir_done() +endif + common_user_inc += include_directories('host/' / host_arch) user_ss.add(files(
Quoted 8 lines
This is with --disable-system --disable-linux-user --disable-user.
And without --enable-tcg-interpreter, it gives:
meson.build:390:6: ERROR: Problem encountered: Unsupported CPU m68k, try
--enable-tcg-interpreterWhat's the way to build tools on an unsupported architecture these days?
You could try to use --disable-tcg instead of --enable-tcg-interpreter ... but I guess we should improve the logic in configure / meson.build a little bit to do that automatically...
I guess Philippe's patch from February should do the job:
https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg00894.html
Philippe, could you maybe respin that series?
Thomas
20.06.2022 13:31, Thomas Huth write:
Quoted 18 lines · Michael Tokarev
Quoted 10 lines
Hello!
Previously, it was possible to build qemu tools (such as qemu-img, or qemu-ga) on an unsupported cpu/architecture. In a hackish way, by specifying --enable-tcg-interpreter on the ./configure line.
Today (with 7.0), it does not work anymore, with the following error during configure:
common-user/meson.build:1:0: ERROR: Include dir host/unknown does not exist.
Did you ever send a patch for this? I something like this should do the job:
diff a/common-user/meson.build b/common-user/meson.build
common-user/meson.build line 4
Quoted 4 lines
common-user/meson.build +4
-0@@ -1,3 +1,7 @@ +if not have_user + subdir_done() +endif +
https://salsa.debian.org/qemu-team/qemu/-/blob/master/debian/patches/common-user-no-user.patch
I dunno which one is right - "have_user" or "have_linux_user & have_bsd_user".
Quoted 7 lines
common-user/meson.build +0
-0common_user_inc += include_directories('host/' / host_arch) user_ss.add(files(Quoted 4 lines
This is with --disable-system --disable-linux-user --disable-user.
Quoted 7 lines
Quoted 5 lines
And without --enable-tcg-interpreter, it gives:
meson.build:390:6: ERROR: Problem encountered: Unsupported CPU m68k, try --enable-tcg-interpreter
What's the way to build tools on an unsupported architecture these days?
You could try to use --disable-tcg instead of --enable-tcg-interpreter ... but I guess we should improve the logic in configure / meson.build a little bit to do that automatically...
It fails down the line when building trace files, I don't remember where exactly. It's trivial to reproduce and the failure is at the beginning of the build procedure.
Quoted 3 lines
I guess Philippe's patch from February should do the job:
https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg00894.html
Lemme give it a try...
Thanks,
/mjt
Quoted 27 lines · Michael Tokarev
20.06.2022 13:31, Thomas Huth write:
Quoted 18 lines · Michael Tokarev
Quoted 10 lines
Hello!
Previously, it was possible to build qemu tools (such as qemu-img, or qemu-ga) on an unsupported cpu/architecture. In a hackish way, by specifying --enable-tcg-interpreter on the ./configure line.
Today (with 7.0), it does not work anymore, with the following error during configure:
common-user/meson.build:1:0: ERROR: Include dir host/unknown does not exist.
Did you ever send a patch for this? I something like this should do the job:
diff a/common-user/meson.build b/common-user/meson.build
common-user/meson.build line 4
Quoted 4 lines
common-user/meson.build +4
-0@@ -1,3 +1,7 @@ +if not have_user + subdir_done() +endif +https://salsa.debian.org/qemu-team/qemu/-/blob/master/debian/patches/common-user-no-user.patch
Quoted 1 line
I dunno which one is right - "
have_user" or "have_linux_user&have_bsd_user".
Both should be fine - have_user is just a shortcut:
$ grep have_user meson.build have_user = have_linux_user or have_bsd_user ...
Could you send it as a proper patch? (otherwise I could assemble a patch, too, if you prefer that)
Thanks,
Thomas
Quoted 11 lines · Michael Tokarev
Hello!
Previously, it was possible to build qemu tools (such as qemu-img, or qemu-ga) on an unsupported cpu/architecture. In a hackish way, by specifying --enable-tcg-interpreter on the ./configure line.
Today (with 7.0), it does not work anymore, with the following error during configure:
common-user/meson.build:1:0: ERROR: Include dir host/unknown does not exist.
Quoted 8 lines
This is with --disable-system --disable-linux-user --disable-user.
And without --enable-tcg-interpreter, it gives:
meson.build:390:6: ERROR: Problem encountered: Unsupported CPU m68k, try
--enable-tcg-interpreterWhat's the way to build tools on an unsupported architecture these days?
Hi Michael,
I think all required patches should now have been merged - could you please try again whether building the tools now works again for you on unsupported CPU architectures?
Thanks,
Thomas