From nobody Mon Oct 10 17:53:29 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MmRNl5KHPz4ddx0 for ; Mon, 10 Oct 2022 17:53:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MmRNk5H64z4QQS for ; Mon, 10 Oct 2022 17:53:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ed1-x52a.google.com with SMTP id l22so16935081edj.5 for ; Mon, 10 Oct 2022 10:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Z0Ow4Zx9Hxxp0D8Fnp+VY1s22nP6Wgs195pWjI6zoH0=; b=IZrCI+p1yTQ2OK0wbsnK37m/ptFUsbBCTPppbMW3pmXpnZqjy0P6lihmLXcMO5ljsy J9hP7hlpGegYXWM02vJyU97UTs3k9zSyrEBbAEtEhavuBwi06/8+/sLf9WIO2NOyBsVr KG60oM17EVSVd9zhJO38ZhFZmqTl3/vqFW7OXKyHm9eQdN7xIcDL+BJHC7+zLFqY5JMv xx+efCWgi3hNX/vm8CD+7CBnlP1TuU60NzKZVumsPwxNEyxiWUjN5//zhLyhucIsSSpW AuEZRYwq4Kos6jYDQf2RvQcmPG4N96ueUQ60NoY+KruofrjwxiwJsf4slp1kCp8FZPXZ yJyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z0Ow4Zx9Hxxp0D8Fnp+VY1s22nP6Wgs195pWjI6zoH0=; b=jg6hNbFmgvX81cF84RhoBV2PQFwTyEKnqNaS4KPM9X57jJ+D1D6HkP4inMJUwPbvjR TMXsET05S2QP4TRalt/rytv3K1WjQd+lcjRVJT7EACHyRKjWaBlaHDT81E0VDFRmvnW+ 3buWqgJghDD+YVTNT8XlrRYbS46iO8ZHMM3jDltkWNCv5GdfHTJV3r9n7cT48LORdxa9 ZSjv7O8CKp0tSy0MLFR3fEVtFie5Wx7wexLkBfw6lWs3SIf7YZoy85cdeGm9Deiq0kW5 Cff4HpozpjyeGNvQaUs9zSEZHb3C/yPlbQ8+P64ZLOcdpi7QIIOsRlpQHtC5xlNVOh+d 5bKw== X-Gm-Message-State: ACrzQf2WtqJWZa1O4V3/xavItPRklVXyKZveE1hpfoSZp8wWAN+llNke tOrcTPU1FL9SJRh0LI14ivGY+D/BfNzf4nE2IzRdCw== X-Google-Smtp-Source: AMsMyM7kiYzqUsqKXHXWZPSgsuaEdxInGlVDwr1lpPiLbVk3QeQk5DkMajbiy9WKaEnuUPcUXDbCpOGMmjJGM7+vbpE= X-Received: by 2002:a05:6402:2696:b0:45a:9264:64d8 with SMTP id w22-20020a056402269600b0045a926464d8mr14021198edd.154.1665424421497; Mon, 10 Oct 2022 10:53:41 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <4a476b1c-74e4-9cb8-17a4-202c81b2da1d@blastwave.org> In-Reply-To: From: Warner Losh Date: Mon, 10 Oct 2022 11:53:29 -0600 Message-ID: Subject: Re: Has anyone tried to build QEMU from ports lately? To: Dennis Clarke Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000000b46f205eab1d741" X-Rspamd-Queue-Id: 4MmRNk5H64z4QQS X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=IZrCI+p1; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::52a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.00 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52a:from]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; TO_DN_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --0000000000000b46f205eab1d741 Content-Type: text/plain; charset="UTF-8" On Mon, Oct 10, 2022 at 10:56 AM Warner Losh 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 > 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


=
On Mon, Oct 10, 2022 at 10:56 AM Warn= er Losh <imp@bsdimp.com> wrote:=
I know what's causing this problem. I'll resolve.

<= div>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 para= m.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.
<= div>
Warner
=C2=A0
Warner

On Mon, Oct 10, 20= 22 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=C2=A0 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<= br> [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-09ed077d7fae5f825e18ff9a2004dcd= d1b165edb
-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=3Dgnu11 -O0 -g -iquote . -iquote
/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1= b165edb
-iquote
/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1= b165edb/include
-iquote
/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004dcdd1= b165edb/tcg/i386
-pthread -D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -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=3D\""/usr/local\""&#= 39; -fPIE -DNEED_CPU_H
'-DCONFIG_TARGET=3D"arm-bsd-user-config-target.h"'
'-DCONFIG_DEVICES=3D"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
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PV_CHUNK_HEADER
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
/usr/include/machine/pmap.h:448:12: note: expanded from macro
'PV_CHUNK_HEADER'
=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 \
=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^
/usr/include/machine/pmap.h:456:2: error: fields must have a constant
size: 'variable length array in structure' extension will never be = supported
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PV_CHUNK_HEADER
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
/usr/include/machine/pmap.h:448:12: note: expanded from macro
'PV_CHUNK_HEADER'
=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 \
=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^
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-09ed077d7fae5f825e18ff9a2004= dcdd1b165edb/build'
gmake[2]: *** [GNUmakefile:11: all] Error 2
gmake[2]: Leaving directory
'/usr/ports/emulators/qemu-devel/work/qemu-09ed077d7fae5f825e18ff9a2004= dcdd1b165edb'
*** 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 :

=C2=A0 =C2=A0https://lists.non= gnu.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--