Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Oct 2022 11:53:29 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Dennis Clarke <dclarke@blastwave.org>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: Has anyone tried to build QEMU from ports lately?
Message-ID:  <CANCZdfqEKiraHF2Yq1ngW2rXU399yA=pJZEd6ipbWPVO-9_%2B4Q@mail.gmail.com>
In-Reply-To: <CANCZdfp%2BxxCdby9CtazACk3Ea2-1ZM_yDkiF=YSzvg_qU2kVvA@mail.gmail.com>
References:  <4a476b1c-74e4-9cb8-17a4-202c81b2da1d@blastwave.org> <CANCZdfp%2BxxCdby9CtazACk3Ea2-1ZM_yDkiF=YSzvg_qU2kVvA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000000b46f205eab1d741
Content-Type: text/plain; charset="UTF-8"

On Mon, Oct 10, 2022 at 10:56 AM Warner Losh <imp@bsdimp.com> wrote:

> I know what's causing this problem. I'll resolve.
>
> tl/dr: _pv_entry.h depends on sys/param.h being included before its use.
>

https://reviews.freebsd.org/D36927 fixes it by making sys/_pv_entry.h more
self-contained and less reliant on param.h pollution. The kernel includes
that
everywhere it's used, but userland is more hit or miss because
machine/pmap.h
isn't a well defined interface, but is needed for some things sometimes.

Warner


> Warner
>
> On Mon, Oct 10, 2022 at 4:38 AM Dennis Clarke <dclarke@blastwave.org>
> wrote:
>
>>
>> On :
>>
>> phobos#
>> phobos# uname -apKU
>> FreeBSD phobos 14.0-CURRENT FreeBSD 14.0-CURRENT #14
>> main-n258340-497cdf9673e: Sun Oct  2 09:51:14 GMT 2022
>> root@phobos:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 amd64 1400072
>> 1400072
>> phobos#
>>
>>
>> Seems to fail in a pretty consistent fashion :
>>
>> .
>> .
>> .
>> [5633/6772] Compiling C object libqemu-arm-bsd-user.fa.p/bsd-user_mmap.c.o
>> [5634/6772] Compiling C object
>> libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o
>> FAILED: libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o
>> cc -m64 -mcx16 -Ilibqemu-arm-bsd-user.fa.p -I. -I.. -Itarget/arm
>> -I../target/arm -I../common-user/host/x86_64 -I../bsd-user/include
>> -Ibsd-user/freebsd -I../bsd-user/freebsd -I../bsd-user/host/x86_64
>> -Ibsd-user -I../bsd-user -I../bsd-user/arm -Iqapi -Itrace -Iui
>> -Iui/shader -I/usr/local/include/capstone
>> -I/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1b165edb
>>
>> -I/usr/local/include -I/usr/local/include/glib-2.0
>> -I/usr/local/lib/glib-2.0/include -fcolor-diagnostics -Wall
>> -Winvalid-pch -std=gnu11 -O0 -g -iquote . -iquote
>> /usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1b165edb
>>
>> -iquote
>> /usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1b165edb/include
>>
>> -iquote
>> /usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1b165edb/tcg/i386
>>
>> -pthread -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-definition -Wtype-limits -Wformat-security -Wformat-y2k
>> -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs
>> -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides
>> -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int
>> -Wno-typedef-redefinition -Wno-tautological-type-limit-compare
>> -Wno-psabi -fstack-protector-strong -O2 -pipe -fstack-protector-strong
>> -fno-strict-aliasing '-DPREFIX=\""/usr/local\""' -fPIE -DNEED_CPU_H
>> '-DCONFIG_TARGET="arm-bsd-user-config-target.h"'
>> '-DCONFIG_DEVICES="arm-bsd-user-config-devices.h"' -MD -MQ
>> libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o -MF
>> libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o.d -o
>> libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o -c ../bsd-user/signal.c
>> In file included from ../bsd-user/signal.c:27:
>> In file included from ../bsd-user/host/x86_64/host-signal.h:14:
>> In file included from /usr/include/vm/pmap.h:92:
>> /usr/include/machine/pmap.h:452:2: error: fields must have a constant
>> size: 'variable length array in structure' extension will never be
>> supported
>>          PV_CHUNK_HEADER
>>          ^
>> /usr/include/machine/pmap.h:448:12: note: expanded from macro
>> 'PV_CHUNK_HEADER'
>>          uint64_t                pc_map[_NPCM];  /* bitmap; 1 = free */  \
>>                                  ^
>> /usr/include/machine/pmap.h:456:2: error: fields must have a constant
>> size: 'variable length array in structure' extension will never be
>> supported
>>          PV_CHUNK_HEADER
>>          ^
>> /usr/include/machine/pmap.h:448:12: note: expanded from macro
>> 'PV_CHUNK_HEADER'
>>          uint64_t                pc_map[_NPCM];  /* bitmap; 1 = free */  \
>>                                  ^
>> 2 errors generated.
>> ninja: build stopped: subcommand failed.
>> gmake[3]: *** [Makefile:162: run-ninja] Error 1
>> gmake[3]: Leaving directory
>>
>> '/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1b165edb/build'
>> gmake[2]: *** [GNUmakefile:11: all] Error 2
>> gmake[2]: Leaving directory
>>
>> '/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1b165edb'
>> *** Error code 2
>>
>> Stop.
>> make[1]: stopped in /usr/ports/emulators/qemu-devel
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /usr/ports/emulators/qemu-devel
>> phobos#
>> phobos# pwd
>> /usr/ports/emulators/qemu-devel
>> phobos#
>>
>> Possibly a problem with -linotify or who knows what ?
>>
>> Also see :
>>
>>    https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg01280.html
>>
>> In any case, something feels wrong here.
>>
>>
>> --
>> Dennis Clarke
>> RISC-V/SPARC/PPC/ARM/CISC
>> UNIX and Linux spoken
>> GreyBeard and suspenders optional
>>
>>

--0000000000000b46f205eab1d741
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, Oct 10, 2022 at 10:56 AM Warn=
er Losh &lt;<a href=3D"mailto:imp@bsdimp.com">imp@bsdimp.com</a>&gt; wrote:=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr=
">I know what&#39;s causing this problem. I&#39;ll resolve.<div><br></div><=
div>tl/dr: _pv_entry.h depends on sys/param.h being included before its use=
.</div></div></blockquote><div><br></div><div><a href=3D"https://reviews.fr=
eebsd.org/D36927">https://reviews.freebsd.org/D36927</a>; fixes it by making=
 sys/_pv_entry.h more<br></div><div>self-contained and less reliant on para=
m.h pollution. The kernel includes that</div><div>everywhere it&#39;s used,=
 but userland is more hit or miss because machine/pmap.h</div><div>isn&#39;=
t a well defined interface, but is needed for some things sometimes.</div><=
div><br></div><div>Warner</div><div>=C2=A0</div><blockquote class=3D"gmail_=
quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex"><div dir=3D"ltr"><div>Warner</div></div><br><div cla=
ss=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Oct 10, 20=
22 at 4:38 AM Dennis Clarke &lt;<a href=3D"mailto:dclarke@blastwave.org" ta=
rget=3D"_blank">dclarke@blastwave.org</a>&gt; wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex"><br>
On :<br>
<br>
phobos#<br>
phobos# uname -apKU<br>
FreeBSD phobos 14.0-CURRENT FreeBSD 14.0-CURRENT #14 <br>
main-n258340-497cdf9673e: Sun Oct=C2=A0 2 09:51:14 GMT 2022 <br>
root@phobos:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 amd64 1400072 <b=
r>
1400072<br>
phobos#<br>
<br>
<br>
Seems to fail in a pretty consistent fashion :<br>
<br>
.<br>
.<br>
.<br>
[5633/6772] Compiling C object libqemu-arm-bsd-user.fa.p/bsd-user_mmap.c.o<=
br>
[5634/6772] Compiling C object libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.=
o<br>
FAILED: libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o<br>
cc -m64 -mcx16 -Ilibqemu-arm-bsd-user.fa.p -I. -I.. -Itarget/arm <br>
-I../target/arm -I../common-user/host/x86_64 -I../bsd-user/include <br>
-Ibsd-user/freebsd -I../bsd-user/freebsd -I../bsd-user/host/x86_64 <br>
-Ibsd-user -I../bsd-user -I../bsd-user/arm -Iqapi -Itrace -Iui <br>
-Iui/shader -I/usr/local/include/capstone <br>
-I/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcd=
d1b165edb <br>
-I/usr/local/include -I/usr/local/include/glib-2.0 <br>
-I/usr/local/lib/glib-2.0/include -fcolor-diagnostics -Wall <br>
-Winvalid-pch -std=3Dgnu11 -O0 -g -iquote . -iquote <br>
/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1=
b165edb <br>
-iquote <br>
/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1=
b165edb/include <br>
-iquote <br>
/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1=
b165edb/tcg/i386 <br>
-pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE <br>
-Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings <br>
-Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv <br>
-Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k <br>
-Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs <br>
-Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides <br>
-Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int <b=
r>
-Wno-typedef-redefinition -Wno-tautological-type-limit-compare <br>
-Wno-psabi -fstack-protector-strong -O2 -pipe -fstack-protector-strong <br>
-fno-strict-aliasing &#39;-DPREFIX=3D\&quot;&quot;/usr/local\&quot;&quot;&#=
39; -fPIE -DNEED_CPU_H <br>
&#39;-DCONFIG_TARGET=3D&quot;arm-bsd-user-config-target.h&quot;&#39; <br>
&#39;-DCONFIG_DEVICES=3D&quot;arm-bsd-user-config-devices.h&quot;&#39; -MD =
-MQ <br>
libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o -MF <br>
libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o.d -o <br>
libqemu-arm-bsd-user.fa.p/bsd-user_signal.c.o -c ../bsd-user/signal.c<br>
In file included from ../bsd-user/signal.c:27:<br>
In file included from ../bsd-user/host/x86_64/host-signal.h:14:<br>
In file included from /usr/include/vm/pmap.h:92:<br>
/usr/include/machine/pmap.h:452:2: error: fields must have a constant <br>
size: &#39;variable length array in structure&#39; extension will never be =
supported<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PV_CHUNK_HEADER<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>
/usr/include/machine/pmap.h:448:12: note: expanded from macro <br>
&#39;PV_CHUNK_HEADER&#39;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 pc_map[_NPCM];=C2=A0 /* bitmap; 1 =3D free */=C2=
=A0 \<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>
/usr/include/machine/pmap.h:456:2: error: fields must have a constant <br>
size: &#39;variable length array in structure&#39; extension will never be =
supported<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PV_CHUNK_HEADER<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>
/usr/include/machine/pmap.h:448:12: note: expanded from macro <br>
&#39;PV_CHUNK_HEADER&#39;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0uint64_t=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 pc_map[_NPCM];=C2=A0 /* bitmap; 1 =3D free */=C2=
=A0 \<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<br>
2 errors generated.<br>
ninja: build stopped: subcommand failed.<br>
gmake[3]: *** [Makefile:162: run-ninja] Error 1<br>
gmake[3]: Leaving directory <br>
&#39;/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004=
dcdd1b165edb/build&#39;<br>
gmake[2]: *** [GNUmakefile:11: all] Error 2<br>
gmake[2]: Leaving directory <br>
&#39;/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004=
dcdd1b165edb&#39;<br>
*** Error code 2<br>
<br>
Stop.<br>
make[1]: stopped in /usr/ports/emulators/qemu-devel<br>
*** Error code 1<br>
<br>
Stop.<br>
make: stopped in /usr/ports/emulators/qemu-devel<br>
phobos#<br>
phobos# pwd<br>
/usr/ports/emulators/qemu-devel<br>
phobos#<br>
<br>
Possibly a problem with -linotify or who knows what ?<br>
<br>
Also see :<br>
<br>
=C2=A0 =C2=A0<a href=3D"https://lists.nongnu.org/archive/html/qemu-devel/20=
22-10/msg01280.html" rel=3D"noreferrer" target=3D"_blank">https://lists.non=
gnu.org/archive/html/qemu-devel/2022-10/msg01280.html</a><br>
<br>
In any case, something feels wrong here.<br>
<br>
<br>
-- <br>
Dennis Clarke<br>
RISC-V/SPARC/PPC/ARM/CISC<br>
UNIX and Linux spoken<br>
GreyBeard and suspenders optional<br>
<br>
</blockquote></div>
</blockquote></div></div>

--0000000000000b46f205eab1d741--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqEKiraHF2Yq1ngW2rXU399yA=pJZEd6ipbWPVO-9_%2B4Q>