* Building tools on unsupported cpu/arch
@ 2022-04-30 14:11 Michael Tokarev
2022-04-30 16:57 ` Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Michael Tokarev @ 2022-04-30 14:11 UTC (permalink / raw)
To: QEMU Developers
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building tools on unsupported cpu/arch
2022-04-30 14:11 Building tools on unsupported cpu/arch Michael Tokarev
@ 2022-04-30 16:57 ` Richard Henderson
2022-04-30 17:08 ` Michael Tokarev
2022-06-20 10:31 ` Thomas Huth
2022-07-18 7:39 ` Thomas Huth
2 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2022-04-30 16:57 UTC (permalink / raw)
To: Michael Tokarev, QEMU Developers
On 4/30/22 07:11, Michael Tokarev wrote:
> 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?
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~
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building tools on unsupported cpu/arch
2022-04-30 16:57 ` Richard Henderson
@ 2022-04-30 17:08 ` Michael Tokarev
0 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2022-04-30 17:08 UTC (permalink / raw)
To: Richard Henderson, QEMU Developers
30.04.2022 19:57, Richard Henderson wrote:
..
>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building tools on unsupported cpu/arch
2022-04-30 14:11 Building tools on unsupported cpu/arch Michael Tokarev
2022-04-30 16:57 ` Richard Henderson
@ 2022-06-20 10:31 ` Thomas Huth
2022-06-20 10:54 ` Michael Tokarev
2022-07-18 7:39 ` Thomas Huth
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2022-06-20 10:31 UTC (permalink / raw)
To: Michael Tokarev, QEMU Developers, Philippe Mathieu-Daudé
Cc: Paolo Bonzini
On 30/04/2022 16.11, Michael Tokarev wrote:
> 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
--- a/common-user/meson.build
+++ b/common-user/meson.build
@@ -1,3 +1,7 @@
+if not have_user
+ subdir_done()
+endif
+
common_user_inc += include_directories('host/' / host_arch)
user_ss.add(files(
> 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?
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building tools on unsupported cpu/arch
2022-06-20 10:31 ` Thomas Huth
@ 2022-06-20 10:54 ` Michael Tokarev
2022-06-20 12:07 ` Thomas Huth
0 siblings, 1 reply; 7+ messages in thread
From: Michael Tokarev @ 2022-06-20 10:54 UTC (permalink / raw)
To: Thomas Huth, QEMU Developers, Philippe Mathieu-Daudé; +Cc: Paolo Bonzini
20.06.2022 13:31, Thomas Huth write:
> On 30/04/2022 16.11, Michael Tokarev wrote:
>> 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
> --- a/common-user/meson.build
> +++ b/common-user/meson.build
> @@ -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".
> common_user_inc += include_directories('host/' / host_arch)
>
> user_ss.add(files(
>
>
>> 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?
>
> 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.
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building tools on unsupported cpu/arch
2022-06-20 10:54 ` Michael Tokarev
@ 2022-06-20 12:07 ` Thomas Huth
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2022-06-20 12:07 UTC (permalink / raw)
To: Michael Tokarev, QEMU Developers, Philippe Mathieu-Daudé
Cc: Paolo Bonzini
On 20/06/2022 12.54, Michael Tokarev wrote:
> 20.06.2022 13:31, Thomas Huth write:
>> On 30/04/2022 16.11, Michael Tokarev wrote:
>>> 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
>> --- a/common-user/meson.build
>> +++ b/common-user/meson.build
>> @@ -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".
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Building tools on unsupported cpu/arch
2022-04-30 14:11 Building tools on unsupported cpu/arch Michael Tokarev
2022-04-30 16:57 ` Richard Henderson
2022-06-20 10:31 ` Thomas Huth
@ 2022-07-18 7:39 ` Thomas Huth
2 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2022-07-18 7:39 UTC (permalink / raw)
To: Michael Tokarev, QEMU Developers
On 30/04/2022 16.11, Michael Tokarev wrote:
> 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?
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-07-18 7:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-30 14:11 Building tools on unsupported cpu/arch Michael Tokarev
2022-04-30 16:57 ` Richard Henderson
2022-04-30 17:08 ` Michael Tokarev
2022-06-20 10:31 ` Thomas Huth
2022-06-20 10:54 ` Michael Tokarev
2022-06-20 12:07 ` Thomas Huth
2022-07-18 7:39 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).