From nobody Sat Mar 18 15:50:29 2023 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 4Pf57X6LDTz3yjW0; Sat, 18 Mar 2023 15:50:48 +0000 (UTC) (envelope-from chargen@gmail.com) Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) (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 4Pf57X3YHNz3CKt; Sat, 18 Mar 2023 15:50:48 +0000 (UTC) (envelope-from chargen@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1755e639b65so8881910fac.3; Sat, 18 Mar 2023 08:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679154647; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1xsoAJM3hHUG6C7aam0t0wIIZBau6GntZ99PEqsfl/8=; b=WnUN54EVhVUSeFoDXGwNFEXCxGRB6tv0ou9j/Mr6j5wVht+SqsaFQqqth2nxgc6h2x Is6lK9iL6DJh+KFlVKKAPAVrrwW0BT94Feq+MkWeIXkSY3PZLDGYUIXSZzDSGATjb5Jz gMzBUSMtozFicqGjtju8tsCkKPQDMv3HoAb4OV+TOchu7HJRrEXkbVDj4yqpZhiIP6KV kDWEwp5BmkJOeoIIUrI8iHF/iRUZ9ZnNZQscCv9y949EQoS6pCQHeYHYbpTbpaax5SWn j3iT3KBaje3nn8Z3G6ll03kCArzGsehvypV1j/aMNs2f3i/W5EIofXxNx8Kng/oJl7Xe O90g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679154647; 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=1xsoAJM3hHUG6C7aam0t0wIIZBau6GntZ99PEqsfl/8=; b=JDtQQUvU6O7QU2tosMt+lpj1tftkxdCGShjQI2YQ2WxXylX9aKG2BF4rYeVDbkgaks BKX9k9jWVpdXwRsI0dUk6nJECuN1YHbYMdywF3YUacvy2v6C+nGRSgkoKrS5K37IG7p8 8JLvfiEK9dK7HPNWZKCLYOISiVFIuGeJ+O225u6oSh8w4KODv1Xil3xvSj73DGFoK6XC 8mYSjbm1e3xnhwv6ZUFAciZ7NMB28pIxMuBns0Q/cgxdfv/Yw0Gh+Sy/l9N1de5Ns9q2 f9Sthlt+PsIq2oY/HCE51ZGjVh6b1+n2VmG8Q3Rfv3e0WY8V2kxhwadn3Jq+XIkx7Poj KqTQ== X-Gm-Message-State: AO0yUKW5nkDVpbBb6ShAHPyqzYBWELA5sEHCSoaz3nH9O9pPCIO+1ke8 loi/4Nchp8IO2T0BK8OflipFwcJ6vaEXqhXl9a9V9UqXydcrmg== X-Google-Smtp-Source: AK7set/cmyIrfD1yGzZK2rHlA2lE6eH0IZ1pOpHiD+vN3Hr2wkQMohE2Q0mwjznxPn+CMTZD+27GGHnxDDtUP4yduiY= X-Received: by 2002:a05:6870:13d1:b0:17a:d3d2:dc75 with SMTP id 17-20020a05687013d100b0017ad3d2dc75mr503106oat.3.1679154647410; Sat, 18 Mar 2023 08:50:47 -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: <2cf7d953-2493-9673-5ea3-fba22c694015@freebsd.org> <20230317181547.4d75e897@hal.tijl.coosemans.org> In-Reply-To: From: Chargen Date: Sat, 18 Mar 2023 16:50:29 +0100 Message-ID: Subject: Re: I just updated to main-n261544-cee09bda03c8 based (via source) and now /etc/machine-id and /var/db/machine-id disagree ; more To: Mark Millard Cc: Colin Percival , =?UTF-8?Q?T=C4=B3l_Coosemans?= , Current FreeBSD , FreeBSD-STABLE Mailing List , Baptiste Daroussin Content-Type: multipart/alternative; boundary="000000000000482b7205f72ea882" X-Rspamd-Queue-Id: 4Pf57X3YHNz3CKt X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000482b7205f72ea882 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable oh, just timekeeping && tell me that uniqueid is oracled with /dev/random Well it's not that there are Great many things depending on synchronizing Jit, wit,NTP cloudcovered Just in case, anything can happen to stratum0 and however unlikely it seems, there is a future imagined for it, that has a protocollair White Rabbit node to node PTP for QKD whatever, I don't use the Q-word that often until the anticipated phenomena is witnessed. Till then none time progressing in any base will not leave this orbit from a QKD critical node topology. At least Not that wabbit, if it's to me. In the future, satellite nodes will have a passive addressing modes, it's covered in a transform, so many grants, ip Thanks, _ _ (_)(_) (,,) =3D()=3D ((__)\ _|L\_______/ Save The Math Lab Rats On Sat, Mar 18, 2023 at 2:25=E2=80=AFAM Mark Millard wr= ote: > The 13.1-RELEASE (snapshot) to 13.2-RC3 freebsd-update's > upgrade sequence did not go well relative to my being > prompted to do the right thing to establish /etc/machine-id . > After the last reboot (kernel upgrade, presumably) it had me > continue with. . . > > # /usr/sbin/freebsd-update install > src component not installed, skipped > ZFS filesystem version: 5 > ZFS storage pool version: features support (5000) > Installing updates... > install: ///var/db/etcupdate/current/etc/rc.d/growfs_fstab: No such file > or directory > install: ///var/db/etcupdate/current/etc/rc.d/var_run: No such file or > directory > install: ///var/db/etcupdate/current/etc/rc.d/zpoolreguid: No such file o= r > directory > Scanning //usr/share/certs/blacklisted for certificates... > Scanning //usr/share/certs/trusted for certificates... > rmdir: ///usr/tests/usr.bin/timeout: Directory not empty > done. > root@generic:~ # cat /etc/hostid /etc/mach* > cat: No match. > > It did not indicate the need for another reboot to > end up with a /etc/machine-id file. > > I tried "shutdown -r now" anyway. It did establish > an /etc/machine-id file during the reboot: > > # ls -Tld /etc/hostid /etc/machine-id > -rw-r--r-- 1 root wheel 37 May 12 08:46:21 2022 /etc/hostid > -rw-r--r-- 1 root wheel 33 May 13 09:46:56 2022 /etc/machine-id > > So the basic implementation is operational but just > lacks an indication of the need to reboot again. > > The date/time is because it is a RPi4B context (no > time of its own) and time is not automatically being > established via ntp, apparently. (I did not make such > adjustments to the snapshot before starting the > upgrade.) > > I do not know if any of the "install: ///var/db/etcupdate/ . . . " > lines or the rmdir line are important. > > It earlier indicated 5708 patches were fetched and that 377 > files were as well. > > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > > > --000000000000482b7205f72ea882 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
oh, just = timekeeping && tell me that uniqueid is oracled with /dev/random Well it's not that there are Great many things depending on synchroni= zing=C2=A0Jit, wit,NTP cloudcovered=C2=A0Just in case, anything can happen = to stratum0 and however unlikely it seems, there is a future imagined for i= t, that has a=C2=A0protocollair=C2=A0White Rabbit =C2=A0node= to node PTP for QKD whatever, I don't use the Q-word that often until = the anticipated phenomena is witnessed. Till then none time = progressing in any base will not leave this orbit from a QKD critical node = topology. At least Not that wabbit, if it's to me.=C2=A0 In the future,= satellite nodes will have a passive addressing modes, it's covered=C2= =A0in a transform, so many grants, ip=C2=A0

Thanks,
=C2=A0 =C2=A0_=C2=A0 = _
=C2=A0 (_)(_)
=C2=A0 =C2=A0(,= ,)
=C2=A0 =C2=A0=3D()=3D
=C2=A0= ((__)\
=C2=A0 =C2=A0_|L\_______/
Save The Math Lab Rats


On = Sat, Mar 18, 2023 at 2:25=E2=80=AFAM Mark Millard <marklmi@yahoo.com> wrote:
The 13.1-RELEASE (snapshot) to 13.2-RC3 fr= eebsd-update's
upgrade sequence did not go well relative to my being
prompted to do the right thing to establish /etc/machine-id .
After the last reboot (kernel upgrade, presumably) it had me
continue with. . .

# /usr/sbin/freebsd-update install
src component not installed, skipped
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Installing updates...
install: ///var/db/etcupdate/current/etc/rc.d/growfs_fstab: No such file or= directory
install: ///var/db/etcupdate/current/etc/rc.d/var_run: No such file or dire= ctory
install: ///var/db/etcupdate/current/etc/rc.d/zpoolreguid: No such file or = directory
Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
rmdir: ///usr/tests/usr.bin/timeout: Directory not empty
=C2=A0done.
root@generic:~ # cat /etc/hostid /etc/mach*
cat: No match.

It did not indicate the need for another reboot to
end up with a /etc/machine-id file.

I tried "shutdown -r now" anyway. It did establish
an /etc/machine-id file during the reboot:

# ls=C2=A0 -Tld /etc/hostid /etc/machine-id
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 37 May 12 08:46:21 2022 /etc/host= id
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 33 May 13 09:46:56 2022 /etc/mach= ine-id

So the basic implementation is operational but just
lacks an indication of the need to reboot again.

The date/time is because it is a RPi4B context (no
time of its own) and time is not automatically being
established via ntp, apparently. (I did not make such
adjustments to the snapshot before starting the
upgrade.)

I do not know if any of the "install: ///var/db/etcupdate/ . . . "= ;
lines or the rmdir line are important.

It earlier indicated 5708 patches were fetched and that 377
files were as well.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com


--000000000000482b7205f72ea882-- From nobody Sun Mar 19 11:14:04 2023 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 4PfZxy1ghnz405vP for ; Sun, 19 Mar 2023 11:14:14 +0000 (UTC) (envelope-from meka@tilda.center) Received: from c3po.tilda.center (c3po.tilda.center [108.61.164.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PfZxw4zFTz42Qk for ; Sun, 19 Mar 2023 11:14:12 +0000 (UTC) (envelope-from meka@tilda.center) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tilda.center header.s=c3po header.b=elHVzvsk; spf=pass (mx1.freebsd.org: domain of meka@tilda.center designates 108.61.164.129 as permitted sender) smtp.mailfrom=meka@tilda.center; dmarc=pass (policy=reject) header.from=tilda.center Received: from tilda.center (meka.rs [109.93.255.137]) by c3po.tilda.center (Postfix) with ESMTPSA id 330D410053 for ; Sun, 19 Mar 2023 12:12:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tilda.center; s=c3po; t=1679224377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=CktD2x5Crd0bnYKAj7FX6rQGfU3WH6HUFrcU38VCHIY=; b=elHVzvskj79CTfnebkJ9E/EH3nboWtaAmnk5W3W/VQuT2OKH2KOL5rsGeidXneoCyn2h/a MZT3IlYdHRblWtW5706KkxzoADWAnX7xlPodIHC4i7PCYRSKETDlwNL88SadDUYapNs3cE mJ+MzXKFJzTrmgyJVhNaPe0ZN4H/LCw= Date: Sun, 19 Mar 2023 12:14:04 +0100 From: Goran =?utf-8?B?TWVracSH?= To: freebsd-current@FreeBSD.org Subject: Infinite loop with d_write_t Message-ID: <20230319111404.a6ac2w44u4trtedy@tilda.center> 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 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jeef5soifo62kmrh" Content-Disposition: inline X-Spamd-Result: default: False [-5.27 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_MIXED_CHARSET(0.83)[subject]; DMARC_POLICY_ALLOW(-0.50)[tilda.center,reject]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[tilda.center:s=c3po]; ASN(0.00)[asn:20473, ipnet:108.61.164.0/22, country:US]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@FreeBSD.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DKIM_TRACE(0.00)[tilda.center:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PfZxw4zFTz42Qk X-Spamd-Bar: ----- X-ThisMailContainsUnwantedMimeParts: N --jeef5soifo62kmrh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hello, I'm trying to assemble a minimal kernel module and user space program as a skeleton, and no matter what I do I get infinite loop. The code for kernel is https://github.com/mekanix/freebsd-project/blob/master/kernel/main.c. The way to test: # make # sudo kldload ./hello.ko # echo "something" >/dev/hello Write done. Write done. ... What am I doing wrong and where does that infinite loop comes from? Regards, meka --jeef5soifo62kmrh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAmQW7nkACgkQWj1Tknov rLaaqRAAlmGhACuRspncletbMqW3nQF1/hVzbvlXg+Jcp5Z0jHJFyO8vVPPVnruE 4tzA1RI+GNrA5N1dUbOUpBpFjo65b3KHFus/tZN1zm4MyTB4NWdJZXW4k9AIh8EX F1/yeeh/9uUtd5gFVyFuEBM9Lv84mk2+OIADjW6ArmL9tEouTJw/rs53U5AMWCYj fFA+uTb2uUmZyAp6BOzwNpGND1Qede3ca/4xWoAMzIlIIMt/e6qisIUPElXYyb2l vXk5yNpgWANNonEeBoxWI0vgn5XCJkJI1e+mF5iTfnHEYqZeSvRVPbiy5G/t/Xu6 RkGq26s2bsqgo1jFsDQ5PnDkrhdJ9pTl9AKr7GvWQPE1zJpROQzqhcRa35Foh1BJ 7MRyjX5IR5I+zjh9qtmkQWtWCHd3ESZcq/FXO8DWu/AvnE+gGgcK9Gtn9oA0ukd5 pSOi2wKFaQ3xbZiQ1wJLrQNJAjgJrizsz4F3OwSgUDBJnffQ7QenXnsvyOcVkhQD Bgf8DLZF6ruey/gfBwsUS2Ps4wDPg1Cix6grx+plnd2PJ/EzDZSsntJKwJIx+uP7 QkhlYyWxkcZU1c/eETo6LmWRgz8Ewy3cZCtjP6Y2PY5WU6q/UEoJTPWdXOtxKRJT d+hRR56xYkbYwrvp0cLH1DmTb4Hr+BEszPlt5U+vAHO3yLjqEfQ= =2Kdr -----END PGP SIGNATURE----- --jeef5soifo62kmrh-- From nobody Sun Mar 19 11:32:53 2023 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 4PfbMb4JC9z406lY for ; Sun, 19 Mar 2023 11:32:59 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PfbMb2Rthz441s for ; Sun, 19 Mar 2023 11:32:59 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; none Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id A44C7320029B; Sun, 19 Mar 2023 07:32:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 19 Mar 2023 07:32:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1679225576; x=1679311976; bh=ylTgP9q+Wdcr6/57jIc38kqCCH2TjbUePBe sLaHeIts=; b=P991I52wflf/z6Ok4j40Gj8Hkc70Wz3AurXp71B8opGB0xQMF8l oCPMWg5nCM/Xg5KuPl3F78CvySQ4uwxpWH2D3igwNdXwfbPk2fvJ1utBGW6+fWQq 0mtZFfH1pRyZdnOvv1FhQ837vQz9+nZG/mB2CK16faw+sIbgARzPTgVroBEirCE3 1jIskX29OqOA6Dw+0sHvr24bMPxBtomN+AWy3UHW+lX1eFi8pYxazp0LI+275wQk jkeqW4P8XPTnVdsirXQgmWKK5MO+ZOxwq/sOaJNHM90S6QopkgGO+41YR1YBQ+h1 iA/k7aXC0+66vgKWi/nWspPPysUTmd/KxjQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1679225576; x= 1679311976; bh=ylTgP9q+Wdcr6/57jIc38kqCCH2TjbUePBesLaHeIts=; b=a xXdg7aEX0nkDmKdAuu7f0JsfORngi1x1cPQdXQdT7rnT3dGPgenTi47YTcVn9IIj pnhuYRPcSn3WCO5JVLDxk3WswQH00d5bolW4EW4adWtzAOpjmUgQedHgiNDv9A7e kN4wgpiMatDKfdtjF6HL6iUy7ROOoqgtqUx2junxntjc5o4orf+D4O1QXfYLhfFx FcLstn+9np2HxxT3c8PDJR6s3GC01NOc1qWWONirGU0B6rgeoICT0CQSLZY6wh/1 8pHlXcwji5BydeVQTVblM3uHUhLv/uCsRolqTYVZmINVkc/PLbZlcj8EEDKJf97Q VheE4V2x65GVTxzMyKzPg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefiedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeen ucggtffrrghtthgvrhhnpedtveevuddtgfelvdeukeekudetgffhjeefvdevlefhteelue etffdtueeludevueenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhfrhgvvggsshgu rdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh ephihurhhisegrvghtvghrnhdrohhrgh X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Mar 2023 07:32:55 -0400 (EDT) Message-ID: Date: Sun, 19 Mar 2023 12:32:53 +0100 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 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: Infinite loop with d_write_t To: =?UTF-8?Q?Goran_Meki=c4=87?= , freebsd-current@FreeBSD.org References: <20230319111404.a6ac2w44u4trtedy@tilda.center> Content-Language: en-US From: Yuri In-Reply-To: <20230319111404.a6ac2w44u4trtedy@tilda.center> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4PfbMb2Rthz441s X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Goran Mekić wrote: > Hello, > > I'm trying to assemble a minimal kernel module and user space program as > a skeleton, and no matter what I do I get infinite loop. The code for > kernel is https://github.com/mekanix/freebsd-project/blob/master/kernel/main.c. > The way to test: > # make > # sudo kldload ./hello.ko > # echo "something" >/dev/hello > Write done. > Write done. > ... > > What am I doing wrong and where does that infinite loop comes from? Why are you using copyin() and not uiomove() in d_write entry? There's an example that looks like you are trying to do: https://docs.freebsd.org/en/books/arch-handbook/driverbasics/#driverbasics-char From nobody Sun Mar 19 15:34:21 2023 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 4PfhkJ4wbCz40LJ8 for ; Sun, 19 Mar 2023 15:34:32 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PfhkJ4Tg3z4Mbm for ; Sun, 19 Mar 2023 15:34:32 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679240072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+kRA5PSF89Tu1a2svZedhKHy8MrYwMY7rDx89hYCTG0=; b=auKarkCV6WKwCsolRcykNksdkWYOW0/jKoBWu97p3fAy953CXC9arhxTrzACv8Jifma/WW AZ+ybWcWhkd0cfavTRX7IfH6t2YeaLur6ibvVjGM8wov1L6dZlhD+NgqmjKwqvdf/IPbnj 6eEeWey+YUvowF+cFQoDGAH7VGPSqWvCL/qEHiDHhyKk4NDsp/OIlZzQ06SuD+dZfdoqOl MB2LNoQDVFa5tBqvJprwoyLH02/L+jxWMzzgLQZsi2S/T8Sn6gh1dwGVO1NN4R9Gnz3p+E t+Npv6ekqQInkwuvu4Bti2YOaJMdyHLWoUsXVgN9A23bJfJsIgnnVQyaUJzbAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679240072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+kRA5PSF89Tu1a2svZedhKHy8MrYwMY7rDx89hYCTG0=; b=w+V6A/O89iagObLZKEJX1gh1ro9mOC/C1n56epf3usrkTqERAuW/ncocnZ9EzNpKToLXGI icGQwOyskhW2/DaZC0cC4FwwpdPvwnurV9eLqpi3BiuP9e1elo1GCQtlAYseqtw2yloYn0 tm29XWk1iMsEn0AD3zrEe2ur6Le9P4CB6PY8bvjO9J1JWmdHu7ol/3dGb9QOsvLhwh8nta bws+DKyimJWmZxyWPAmckgTVFJZ7W5bw5Iw5xj5iGgmxv9i6oAYDJm6VMUBg/84dfGozVt 51vW6KryYGOaeE3MIPU7sJZVVruSqozn4DchiBt6Qdoj7TBEez5X6TkymarVhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679240072; a=rsa-sha256; cv=none; b=giDRCfwqxseyavrTBwVTi6X9BA6QjuWEiG0kuWw9VvqRnsZoQzxVgMLelRYKin2RpNkrqc S9rBHOzdfKSSNblwZ4bReZ9VZUQNhZ9n2qkOQ20zRKC0VOdn5v8ITY09R0BbwgJw7ScMp1 cm4TwauGHa5Xe2C3yFaKSttPcfzyQ3vAvxxBB6VmpZtiap8FQLcQN4GTHHH2Lzdz53eyIS M1ankcsLSGVAyEhxxLRGZECPRHLP2CpmozSKEGMWtQCRhRDCZLNw9ryYLpnCg8YDvN3lFx LI3GgKlJtVAhsDHEAmgB5nMQ9PaSmKAe9fR4IXvyL2xktqi8Z90iguPrVEFgtw== Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PfhkJ3PY5z10XM for ; Sun, 19 Mar 2023 15:34:32 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f179.google.com with SMTP id x1so10578611qtr.7 for ; Sun, 19 Mar 2023 08:34:32 -0700 (PDT) X-Gm-Message-State: AO0yUKWt9T427KHnYQboRhN2dUKgu+15YWsyYyff4PCoXppInzsH5Em+ Z6NIsigbtbjncK4+VRn7DHZ5PseMRAnTbb0dO/Y= X-Google-Smtp-Source: AK7set+6/0OfZZdK6WDLdJeqiNX7yflSlcqF+BRbkzhrTNnOz14UxdIBhP13+rj2dGVOizRLmn2ck/TNjjxNDbQLo1o= X-Received: by 2002:a05:622a:1a95:b0:3d7:9d03:75b0 with SMTP id s21-20020a05622a1a9500b003d79d0375b0mr3797706qtc.13.1679240071975; Sun, 19 Mar 2023 08:34:31 -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: <20230319111404.a6ac2w44u4trtedy@tilda.center> In-Reply-To: From: Kyle Evans Date: Sun, 19 Mar 2023 10:34:21 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Infinite loop with d_write_t To: Yuri Cc: =?UTF-8?B?R29yYW4gTWVracSH?= , freebsd-current@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Sun, Mar 19, 2023 at 6:33=E2=80=AFAM Yuri wrote: > > Goran Meki=C4=87 wrote: > > Hello, > > > > I'm trying to assemble a minimal kernel module and user space program a= s > > a skeleton, and no matter what I do I get infinite loop. The code for > > kernel is https://github.com/mekanix/freebsd-project/blob/master/kernel= /main.c. > > The way to test: > > # make > > # sudo kldload ./hello.ko > > # echo "something" >/dev/hello > > Write done. > > Write done. > > ... > > > > What am I doing wrong and where does that infinite loop comes from? > > Why are you using copyin() and not uiomove() in d_write entry? > > There's an example that looks like you are trying to do: > > https://docs.freebsd.org/en/books/arch-handbook/driverbasics/#driverbasic= s-char > This... d_write/d_read need the uio accounting updated to reflect how much data was written/read, it doesn't want to assume you were able to do everything in a single call. Thanks, Kyle Evans From nobody Mon Mar 20 06:08:24 2023 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 4Pg46h05CSz40GsY for ; Mon, 20 Mar 2023 06:08:28 +0000 (UTC) (envelope-from meka@tilda.center) Received: from c3po.tilda.center (c3po.tilda.center [108.61.164.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pg46g55vBz3sh5 for ; Mon, 20 Mar 2023 06:08:27 +0000 (UTC) (envelope-from meka@tilda.center) Authentication-Results: mx1.freebsd.org; none Received: from tilda.center (meka.rs [109.93.255.137]) by c3po.tilda.center (Postfix) with ESMTPSA id 0E85B10EF1; Mon, 20 Mar 2023 07:07:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tilda.center; s=c3po; t=1679292437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=D9lR1RoHdL623WtMJR0/7pZwLsdvYAGtiot7lbSSATA=; b=SeZAFDLu3WB1Ue/yktDWGSdqaN5NelotvKw0Kw3H7MjB9DXPWFIK8WuCsnLCfuePNRkgH3 jlYHIV/dAX35GlHbULmTEU1s2AjWbwRHMQ5W1O2Anz6IDeo5hkA3RI10xT79nk5M0rjDkZ FF2uQEDeQnb8BmNk28XMt89omAlr2yA= Date: Mon, 20 Mar 2023 07:08:24 +0100 From: Goran =?utf-8?B?TWVracSH?= To: Yuri Cc: freebsd-current@FreeBSD.org Subject: Re: Infinite loop with d_write_t Message-ID: <20230320060824.s7rjwetrolqgd7xa@tilda.center> References: <20230319111404.a6ac2w44u4trtedy@tilda.center> 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 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oeomwchyocmwncml" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Pg46g55vBz3sh5 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:108.61.164.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --oeomwchyocmwncml Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 19, 2023 at 12:32:53PM +0100, Yuri wrote: > Why are you using copyin() and not uiomove() in d_write entry? In short, I was following the book. > There's an example that looks like you are trying to do: >=20 > https://docs.freebsd.org/en/books/arch-handbook/driverbasics/#driverbasic= s-char It works perfectly, thank you! I didn't even know we have Driver Basics chapter. Regards, meka --oeomwchyocmwncml Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAmQX+FQACgkQWj1Tknov rLY47RAAm3gQ61egJAvwO3iFqfr9cWY5AuIGtWDpPR2OukgFmjhdxhn4Vm4KgglF vU41WpTkp9oCKvOc6/ndAl7MJED6ooE/OwhCi58a5Ytk75Fy++HTugHpK2oVUTUn xFCP115cHQFr+851k64Y7MFebE0ohKYQKroswwzD1xIAWnIA2l/54ZHw4Jpja0Sv wF8BvgBblo5ic2lrMDQCqoj/XfWGvS4TCaGhzxhEkLrY1XpJt9IMUNLd/SK+SeVz JzUXwPMCDa7j0inkbVpjqOydCLo6Jl9FJuy1UbJH6HSKDqtgzT1TzvUY/GF9KfHm IxsXmPDEmJy2h+6txU7uwiVDtBk8pHG1ToCkRXeEDudm0GjIRw0MoY92E7rV47DV cEV0oDDiGxW7W8+EKxG7DkrIwo5bZXaEUgAbBJDc7gZhRBsnBTB9sa4+NRq7W4+Q 9l2ONHCw1wURs7+OGC1SuKVAInwJ9QLuiPPq5gEf1BK7kBnCxb6CL6JtlpGPVNp5 eTswY0hb3zposf2cSNolPqZlxRtLAua0mhRuZfoPNZPLI2eM5W70EhDsa7CYb4FL AeZkugKcG8XyhRviP7MIhwe+6USFq0ktRz7zi2j9Yzr+NSkMJthGyf7e/r970Yu9 Qz6q1URcvbJfeHFTf0nhR51Gc1QtdAKSVAPxjsaltEqfgYQzY40= =JRmP -----END PGP SIGNATURE----- --oeomwchyocmwncml-- From nobody Tue Mar 21 22:39:11 2023 X-Original-To: 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 4Ph63Q4rwFz40wHV for ; Tue, 21 Mar 2023 22:39:14 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ph63Q0Zhzz4Dx9 for ; Tue, 21 Mar 2023 22:39:14 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm1 header.b=cbpJk3H8; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=eMJ0n9GD; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 66.111.4.25 as permitted sender) smtp.mailfrom=yuri@aetern.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 78B685C01AC for ; Tue, 21 Mar 2023 18:39:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 21 Mar 2023 18:39:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm1; t=1679438353; x=1679524753; bh=md yydFRGz5gA7X78nswUvHVaPk7Yr6J9OpFvleA53zs=; b=cbpJk3H890GeOxOkfH 0bMezKZIRRnSlK9oWzwx0Qkt0FcFgGaLg0PWdSzrML00RmYpnKDAP9DunkmllE5L taD82BSV6fTKA0z6bKM7izsTwclOLxsy93XNTnh4hIrIVhwL9ky7uCGlV69TgjCk /lP1SzQwnKE9Yj5XrEeWEEmaf0LJt16pLr6ArkqAKjGsQyA0c/p/3RlzXcFZNAty X7IvK3ClUBFP1mYKXukspKroJzzL3j1sILD7klrv5YA+qWjKF2zfa1xYOeSZZ7K1 FrlfULsZis4k42wYumqfyhMSG+tUqWZP/eyg4FPzlzl+rRqUzSHfi9QUBQW+BHTy tAzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1679438353; x=1679524753; bh=mdyydFRGz5gA7 X78nswUvHVaPk7Yr6J9OpFvleA53zs=; b=eMJ0n9GDl22KHke7G2/zeXlpXVEI5 OEmrgSbMqMXORBZPTSOvYtzPoe+xBe9C55iWoQ1B0ZLOCVPaMWbAFq9GrWnrfY9t DV3wU8vz7Squ1UL/epV3NFXDqJ4rVs7nCqo6VqYSExMU2WdPiRifu/ZihdkwALyC jNioRcftFZBfUUCb37/bshJIY4S5xDsamPpgEeFuDHRb1wkUBu3Rgu6G9AN/1Jc+ jYW52PXa5Jw/ODHByKU2jLq4issQfeP7mprJjC24mjGUPfF+S2kLxOcCwrvkGX9+ EmfNQdEiBc/lAfR1ssqW74uaEPAST08EG8NLZaxlXwZ9wOmm3/JVab0sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeguddgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfvhffutgfgsehtjeertd dtfeejnecuhfhrohhmpegjuhhrihcuoeihuhhrihesrggvthgvrhhnrdhorhhgqeenucgg tffrrghtthgvrhhnpeffvefffefgteeuudekhfefvdfhjeetgfejffffieetvdfhfeejff ekleegjefftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpeihuhhrihesrggvthgvrhhnrdhorhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 21 Mar 2023 18:39:12 -0400 (EDT) Message-ID: <3e8f96c9-70dc-23ce-cb10-8fb9e32242ca@aetern.org> Date: Tue, 21 Mar 2023 23:39:11 +0100 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 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US To: current@freebsd.org From: Yuri Subject: dangling symlinks in openzfs import Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Ph63Q0Zhzz4Dx9 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.40 / 15.00]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm1,messagingengine.com:s=fm2]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.25]; PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org]; local_wl_from(0.00)[yuri@aetern.org]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_from X-ThisMailContainsUnwantedMimeParts: N These have been in there for quite some time now, and every time I try to grep something I see this (I know about -s option, but it's there in opengrok and other tools output as well): grep: sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key.init: No such file or directory grep: sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-mount.init: No such file or directory grep: sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-import.init: No such file or directory grep: sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-share.init: No such file or directory grep: sys/contrib/openzfs/contrib/debian/openzfs-zfs-zed.zfs-zed.init: No such file or directory Given that these files are completely unrelated to FreeBSD, is it possible to exclude them from merging with upstream (and delete), or would it break something? From nobody Thu Mar 23 06:22:41 2023 X-Original-To: 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 4PhwHj3tKGz40v9Y for ; Thu, 23 Mar 2023 06:22:41 +0000 (UTC) (envelope-from obrien@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PhwHj33jkz3Pmy; Thu, 23 Mar 2023 06:22:41 +0000 (UTC) (envelope-from obrien@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679552561; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=NBtR25Y5CSz6atO0myQswOkXR4Wfg4GgtPIWlcdweg4=; b=eo6l27EqIw8IIb+vD0PHkPYXWipPLLyEDQC9XFrt+D2BGsCcJbRKsFB1jUFxOECQeVGRNn KsD0Z7YpGp1b6mBLm7c5cWN5i8yz92kxDN8PhH9CBmPq+tdPkGR4IS+y7QZt8QFJ3JsuG3 8aGvL4WGkLGAaYCbIyMR6c3jskpyk7swSNKfOLjirxZ7SKgPbr+7UtIPJzY5ofDSuReY7G BJQDnmcBdomVAnehAG4WsgFP3t0M1zgAh6W3cefgL98XGv7fWS2ulnCqDzxo6+xdQUjowt D4K6LnPR2sDfCsNVmwFIvlxlz9aRlN+HcWgCipPFUYwNZdiVGw+19YUdZKn/5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679552561; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=NBtR25Y5CSz6atO0myQswOkXR4Wfg4GgtPIWlcdweg4=; b=jjuBS7maONBNoSKSZoTJZtgsL6qcEulI/T0aLNDBW5eMmPGV8S7k0foTzrko5MjCfQHHJO l80B4FX/eVYYYjd6u9qGZfO6F5nxWWu5966Q1P/eRYFazK0plYYYxZsrgwvP5Z3EGU/9tq 1nONoolvHfTo6NCDHAqgbvXX+K+d76MNJKziq+PAzSm9RmgnVVK4O+gAKARPLUUBJwveuA 8Yj+WJAf70tlZc3Jm9FNgjDn1K3iZQE/MOIn9XA4BgAuppXsZnn2RsojFFC6LSIOYMZqHZ RrlL7w0Xdzq+Va/6WNUZYL+6DKvAr4VsbE3e7UNMz6/GX3ogekWsUBuhQcDo5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679552561; a=rsa-sha256; cv=none; b=D1T+k6qc+FzAHOfxR4VATorHEC8b67LkzYFPMpHeK4bwP7Txbr5G4/DeZVn/cL284vKL6m opdP8T2ESXFzNbMnS4AT8uoDwR+ijq8+axZaOdkoL3GqHkl6cVSGZ2U8IoNFEpZY/6MUUH jyeoCyjpEc652k7TeVwuGPOaVXOKpPTyh2zgfAlHjF+f2H+0jYx4FUt9MIt/tWFvoWvjZV RuPho7N7sky2gbgacq/CQTvvy3YAYK9lPkFYPnrVCHH+QeVaN9IR04JjMtLfPKNskycbsv ene9Zx/fK8KPHHUkzO1sMn30/eafeyJbLyZ0I7Z6fmscCeVNyqZrtNLQlmtV6A== Received: by freefall.freebsd.org (Postfix, from userid 664) id 506C01087D; Thu, 23 Mar 2023 06:22:41 +0000 (UTC) Date: Thu, 23 Mar 2023 06:22:41 +0000 From: David O'Brien To: Yuri , Martin Matuska Cc: current@freebsd.org Subject: Re: dangling symlinks in openzfs import Message-ID: Reply-To: obrien@freebsd.org References: <3e8f96c9-70dc-23ce-cb10-8fb9e32242ca@aetern.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e8f96c9-70dc-23ce-cb10-8fb9e32242ca@aetern.org> X-Operating-System: FreeBSD 14.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 X-ThisMailContainsUnwantedMimeParts: N On Tue, Mar 21, 2023 at 11:39:11PM +0100, Yuri wrote: > These have been in there for quite some time now, and every time I > try to grep something I see this (I know about -s option, but it's > there in opengrok and other tools output as well): > grep: sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key.init: > No such file or directory Yes! Please someone delete them, or tell me the vendor workflow approved way of doing the task myself. I'd have fixed them myself if we were still using Subversion, but I don't know the correct way to handle them in the vendor branching within Git. -- -- David (obrien@FreeBSD.org) From nobody Thu Mar 23 06:42:31 2023 X-Original-To: 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 4Phwkq6kljz40wkH for ; Thu, 23 Mar 2023 06:42:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 4Phwkq4tD9z3k9L for ; Thu, 23 Mar 2023 06:42:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id x3so82202319edb.10 for ; Wed, 22 Mar 2023 23:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679553762; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=i+05g7voF77ttUlrvoFSyi27GFz1wrwuaZ+2Msw1fbA=; b=BZiAUGSQna26TOiuy2o7gvI9PIPwpP6rJ9QZqbanIegRus0TKZd32a37stf3BQQ+qI O+8+X4oXyIWjvFoZPzuMW9w34jj4bi0vbo52F5et/SIurRWGeh9K4veAH3YAoAtexEMK UNfAh7P6eukIT3occuCYe5De625GYXyt/mpl9BEOXqykU9+Kmyf39np1bTP+/PUKWNtu 01HqBy5VpTGluHfKHacP/45x+KAt906IDbhkbUi/fQAmYSfSBJ0eE1iZPQqKpbR88bRb 50Bl3GcAEa70g330PZSj9/jlbVlcgDTRKPDs4tBengWjtoaApcjJOQBQC9PBc6dhlVJq avzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679553762; 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=i+05g7voF77ttUlrvoFSyi27GFz1wrwuaZ+2Msw1fbA=; b=qiYvbZeWPvOkbdNuA3lXy9Dtc+LoLk2NUuc/rhXLXVLMatfiQ1Dz1Juu0T70MHh3uQ Oz6lrL1voFkDlxhQ4gU9jo3WnAz8VrTLdxTJm8xOTpQEC2iKitIlasWaTQwU4ejvhfgk eQamDlYBtn1u7bVs7QWrXtmnMIRfKmCwjNmocx3NWK1IfqnTH9xBXK6QzLK75oPa5mWr MTdFWTdCcP25X2zLqAMyf70i1ovvj818NzVa+wBQ+luRMtC/V5S7fghHdc1dNimzJ0Zk w5xyWUkDOSUec4YCCCut05bS9EPG9dssM2lLgw1x+xWAiv32jP+6yIkrZp8HNiJxl7Je jXfA== X-Gm-Message-State: AO0yUKUewHBFWZAUoXwNPMVouD7W+5K+/V/GqaS1LiGCJNGy0jUs19Vf 9xi6Y2LczEkEykdPzny9rvTtX8RtvfTvgEnoPxd77Q== X-Google-Smtp-Source: AK7set+a+xHdhs/NFQpr7cziwP2tP6cJPsaJlMrXRlYvPeXyD6Z8Q5LWyuNSE4DWlaIHdrASUtjhFKp1H7H4BhtqRsE= X-Received: by 2002:a05:6402:278e:b0:501:dfd8:67c5 with SMTP id b14-20020a056402278e00b00501dfd867c5mr3568215ede.3.1679553762175; Wed, 22 Mar 2023 23:42:42 -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: <3e8f96c9-70dc-23ce-cb10-8fb9e32242ca@aetern.org> In-Reply-To: From: Warner Losh Date: Thu, 23 Mar 2023 00:42:31 -0600 Message-ID: Subject: Re: dangling symlinks in openzfs import To: obrien@freebsd.org Cc: Yuri , Martin Matuska , current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000603ef705f78b95ca" X-Rspamd-Queue-Id: 4Phwkq4tD9z3k9L X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000603ef705f78b95ca Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 23, 2023 at 12:22=E2=80=AFAM David O'Brien = wrote: > On Tue, Mar 21, 2023 at 11:39:11PM +0100, Yuri wrote: > > These have been in there for quite some time now, and every time I > > try to grep something I see this (I know about -s option, but it's > > there in opengrok and other tools output as well): > > grep: > sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key.init: > > No such file or directory > > Yes! Please someone delete them, or tell me the vendor workflow > approved way of doing the task myself. > > I'd have fixed them myself if we were still using Subversion, but I > don't know the correct way to handle them in the vendor branching > within Git. > Going rogue and stepping on the OpenZFS maintainer is rather antisocial. Good thing you can't be bothered to read the current documentation on vendor branches. All sarcasm aside, that's really not a productive attitude. Warner --000000000000603ef705f78b95ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Mar 23, 2023 at 12:22=E2=80= =AFAM David O'Brien <obrien@fr= eebsd.org> wrote:
On Tue, Mar 21, 2023 at 11:39:11PM +0100, Yuri wrote:
> These have been in there for quite some time now, and every time I
> try to grep something I see this (I know about -s option, but it's=
> there in opengrok and other tools output as well):
> grep: sys/contrib/openzfs/contrib/debian/openzfs-zfsutils.zfs-load-key= .init:
> No such file or directory

Yes!=C2=A0 Please someone delete them, or tell me the vendor workflow
approved way of doing the task myself.

I'd have fixed them myself if we were still using Subversion, but I
don't know the correct way to handle them in the vendor branching
within Git.

Going rogue and stepping on= the=C2=A0OpenZFS maintainer is rather antisocial.
Good thing you= can't be bothered to read the current documentation on
vendo= r branches.

All sarcasm aside, that's really n= ot a productive attitude.

Warner
--000000000000603ef705f78b95ca-- From nobody Fri Mar 24 00:00:19 2023 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 4PjMm40x6fz40WB0; Fri, 24 Mar 2023 00:00:20 +0000 (UTC) (envelope-from salvadore@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PjMm36j2Yz3H80; Fri, 24 Mar 2023 00:00:19 +0000 (UTC) (envelope-from salvadore@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679616020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=KQAxqWMqZrB0jEKZuxIumU+/mMEYEEoy0MRQtp125bE=; b=p1rzsxvDY2mGkxKxSK0OLwvwA20u+e6feLgYzDoVLvBR3JgAPP0n9E98im8h5CBccQBmWs RfGwzRjShl/tu9X5tcamFrjnCxzlsbEYUeziRDy1GVfzMlYNiKammf9KuPTQwV/T+STx6c 1wjuz2ZRnYLpTWA3JA4TjT0N3/Ncfw8myMJ877jUk2kWFabb8yTCMIbWt0OAOBWPiRvVqE seFXBVkxmInNDcDkmmxpIvA/4CWW1QgLsC+XKH9+yQi2VoDmVAqOdyDi1k3JkKwSnN08Oq 6+TLkbCbEb+ovCD6d7DWPKIjYTIdRb1mw9Hz/wl3Y11uwuvcYHe7T0jt5MDQzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679616020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=KQAxqWMqZrB0jEKZuxIumU+/mMEYEEoy0MRQtp125bE=; b=TLUZ9gOZJgXGdr1nvRLc9n/ZMX83wUPgG4d2Wd2hXIum0T+YwJDv7zmTUGizO984j6ozxj A9gvPehGPGhGN7tEojQOhtFCP3zqfc2/v9RZXXy/6lq+6z6DoDc3jEA7Z+X0bKrAe3AF2o E9ys/LZW4SWVJOIH3cKALLeyA7vt9l0lNxvtjEqQ5IYF2vNI1Zcy4bhnWi3j1NxPnCKfCE JImq19y/vYVPbdHwlIDv9te753gsO7q4qnyEbnEc0hi66DCSzzv+z9R96XcIrDe9zXqU7x qgKHAQwF2MCuRVaLBblpSJXwKCir/4BBMacG1VYBYy1zAGmC2N9xaSzTi1dKKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679616020; a=rsa-sha256; cv=none; b=U0TBAjrS8PCVKgCF8Kzj4OFZBUDI+FGFWEjwdtmNBlV1rm5u7r8tHaVTNcGfYaOOfAGwKP 3Ta5oTIpjBHQQnwcr218cZNa9rWKdPd40EwG82EaPLzOL114ceuvSoxSXqGlitvYiePRbz FuF+rUSql0Q8JxfZmQH8DzjZfb9i624Vp00n5kZ/Mttuta/2YcKUA2mq27jYvs93Q7PQuD 3PS1pDEY4ABq+hJ4fjibmkz/eKCSoqWUJuYcojG+f4KckzfMtM2mezT3xXiwnyA86FOwtP ErNNA8zgd4zc91EmDuyT3/geaODwa47usvRQKweVrzg3kposd5mBi87SVBk4PQ== Received: by freefall.freebsd.org (Postfix, from userid 1472) id CF6F112A47; Fri, 24 Mar 2023 00:00:19 +0000 (UTC) To: freebsd-status-calls@FreeBSD.org Subject: [LAST OFFICIAL REMINDER] Call for 2023Q1 status reports Cc: freebsd-current@FreeBSD.org,freebsd-hackers@FreeBSD.org,devsummit@FreeBSD.org,secretary@asiabsdcon.org Message-Id: <20230324000019.CF6F112A47@freefall.freebsd.org> Date: Fri, 24 Mar 2023 00:00:19 +0000 (UTC) From: Lorenzo Salvadore X-ThisMailContainsUnwantedMimeParts: N 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 Dear FreeBSD Community, The deadline for the next FreeBSD Status Report update is March, 31st 2023 for work done since the last round of quarterly reports: January 2023 - March 2023. I would like to remind you that reports are published on a quarterly basis and are usually collected during the last month of each quarter, You are also welcome to submit them even earlier if you want, and the earlier you submit them, the more time we have for reviewing. Status report submissions do not need to be very long. They may be about anything happening in the FreeBSD project and community, and they provide a great way to inform FreeBSD users and developers about work that is underway or has been completed. Report submissions are not limited to committers; anyone doing anything interesting and FreeBSD related can -- and should -- write one! The following methods are available to submit your reports: * submit a review on Phabricator and add the group "status" to the reviewers list. You should put your reports in the directory doc/website/content/en/status/report-2023-01-2023-03/ (create it if it is missing); * submit a pull request at https://github.com/freebsd/freebsd-doc . You should put your reports in the directory doc/website/content/en/status/report-2023-01-2023-03/ (create it if it is missing); * send an email to status-submissions@FreeBSD.org including your report. An AsciiDoctor template is available at https://www.FreeBSD.org/status/report-sample.adoc . We look forward to seeing your 2023Q1 reports! Thanks, Lorenzo Salvadore (on behalf of status@) From nobody Fri Mar 24 08:23:27 2023 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 4PjZwq6djyz41GQj; Fri, 24 Mar 2023 08:23:39 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PjZwq66TBz4L1j; Fri, 24 Mar 2023 08:23:39 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679646219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zXni5iDZotpH6RKwZJICErjbsSejDqqag1U/yIckAzs=; b=MbpBPWraEW1Xc4XLO+Fr5sqOX0p1C+YSoPHTlR4DWdLr4NRgHjNDuFZEU4RvqInAQOd7Ru 4OtkqahMLaOZeTMICLOEqqTsGpQynf9WAGR1+rm1NsGx2FDkCMLxFt3J72xx+tYPbqlupL Wsum83bkSodNQMJb71HanSzebVOEdo4pT7YeuAMLwxVLZpc/6ELt33fJ8URtPp35SCsr+n FvXRa0ZF8INth0xgdN1nUwIpWzDZmagxQR/4wbJrMeIlB58ZaoVfYAfsRDLp6+hqEuFLxh 8fzJCQ+Q+W9GKqSV9cElSv+TA1fL1h/9p08hZLCVuUP1RPD1SdXsYpvH7/MdxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679646219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zXni5iDZotpH6RKwZJICErjbsSejDqqag1U/yIckAzs=; b=EBiwl5+umpLTdXgeqU3cLOSwpLw8WKfJEoFis8pJXlaLsx2w4+5h+SlUrhKyvnO5DZ3pgg Y2awALGzVxrkrmLsePdHkMGwR73dAno15J9DzmVQEkM+x7orjvzjLy/BWflNLgg1qfBa/+ 1m6cTk+w6zlmB4Lp8W8+o5s4qCNrAwijjszLuKCeLFbCM2zx/nUIhEw4j1Qrsb/MHTrjEH gJeniCTcaeuxnspz8jJ+CV9RtZ94wYk9AHfc+9B3P0DVEhBY99ViUha5lwqPI/ipmruebA J+EWFL/E2YIS+Y8YzkNfjiQ0Acpf9+7yn0RSQjAcRgN8nyyr/CKy4vo46ATBYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679646219; a=rsa-sha256; cv=none; b=L1QxW/wTke98G1sKsjEVzBn8cMLoKFTm7IlW2djSQRB4MaUhABwrb55cUDHLCN7Ju7ebWQ 9wBS7HJe38WYXunYucnS3Txp2ZN1vGtTMAzgUqEUQRLvxBUVuu1naxJfqGS0SjUz/4mKgR p9auoFu2lqogcrcqYIlwI+musDZYHh9YC9qOwl37G5jLa+9Ida16VvXDUxPJnR11IHL/gD 20l+K+925Xl0YpuDlnUqGx125ynq/WH9fHEjqlJVzkKhaamEjwbbMs/wcgP6TRnuYE3N7M OlTV/5CEdII/OqjjXe/xNObZH6xbJDYi5QUO2nKWCWjVz7vmkeB2MaMFBSQvsQ== Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PjZwq59HWzxB5; Fri, 24 Mar 2023 08:23:39 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vs1-f52.google.com with SMTP id c10so906205vsh.12; Fri, 24 Mar 2023 01:23:39 -0700 (PDT) X-Gm-Message-State: AAQBX9cvQ0usdvmDgJZuPfVZJnA9EsI59c8qMc1GBXWJGaANFsHeuYsV UjwpDHxviyWP4On+Wpv8aLfj7Du69EbcBB4qFMk= X-Google-Smtp-Source: AKy350aczOKyh/VOQfnFD0GrzT9gRY97QLOQZbNOUqZQgz/LGosa0nGA9XQXwNOwC7HSXeHFfQPERa2M12xATOQvl3A= X-Received: by 2002:a67:c089:0:b0:426:7bc6:4cb2 with SMTP id x9-20020a67c089000000b004267bc64cb2mr230977vsi.7.1679646219158; Fri, 24 Mar 2023 01:23:39 -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 From: Nuno Teixeira Date: Fri, 24 Mar 2023 08:23:27 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: byteswap.h not found on 12 and 13 To: FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="0000000000003dccc805f7a11c08" X-ThisMailContainsUnwantedMimeParts: N --0000000000003dccc805f7a11c08 Content-Type: text/plain; charset="UTF-8" Hello all, I'm getting a file not found on 12 and 13 compiling net/sflowtool latest update: It compile fine on 14. I've searched 14 src and found: --- ./include/byteswap.h ./contrib/ofed/include/byteswap.h ./contrib/llvm-project/libcxx/include/__bit/byteswap.h --- Any clues? Thanks, --- ===> Building for sflowtool-6.01 --- all --- /usr/bin/make all-recursive --- all-recursive --- Making all in src --- sflowtool.o --- cc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -MT sflowtool.o -MD -MP -MF .deps/sflowtool.Tpo -c -o sflowtool.o sflowtool.c sflowtool.c:32:10: fatal error: 'byteswap.h' file not found #include ^~~~~~~~~~~~ 1 error generated. *** [sflowtool.o] Error code 1 --- -- Nuno Teixeira FreeBSD Committer (ports) --0000000000003dccc805f7a11c08 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello all,

I'm getting a= file not found on 12 and 13 compiling net/sflowtool latest update:
It compile fine on 14.

I've searched 14= src and found:
---
./include/byteswap.h
./contrib/o= fed/include/byteswap.h
./contrib/llvm-project/libcxx/include/__bit/bytes= wap.h
---
Any clues?

Thanks,

---
=3D=3D=3D> =C2=A0Building for = sflowtool-6.01
--- all ---
/usr/bin/make =C2=A0all-recursive
--- a= ll-recursive ---
Making all in src
--- sflowtool.o ---
cc -DHAVE_C= ONFIG_H -I. -I.. =C2=A0 =C2=A0 =C2=A0-O2 -pipe =C2=A0-fstack-protector-stro= ng -fno-strict-aliasing -MT sflowtool.o -MD -MP -MF .deps/sflowtool.Tpo -c = -o sflowtool.o sflowtool.c
sflowtool.c:32:10: fatal error: 'byteswap= .h' file not found
#include <byteswap.h>
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0^~~~~~~~~~~~
1 error generated.
*** [sflowtool.o] Er= ror code 1
---


--
Nuno Teixeira
FreeBSD Committer (ports)
--0000000000003dccc805f7a11c08-- From nobody Fri Mar 24 08:30:24 2023 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 4Pjb4s3KYMz41Gmm for ; Fri, 24 Mar 2023 08:30:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 4Pjb4s139Lz4MlQ for ; Fri, 24 Mar 2023 08:30:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52f.google.com with SMTP id b20so4870544edd.1 for ; Fri, 24 Mar 2023 01:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679646635; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ReGANFiUQBaIIrBiqY6D7AEmqUouLK80OgtlV4Z5hdo=; b=f3tDbxWrb+oY/CV7bpaox9GB7BKryfzPqhQn5zXdXfdjw0DWYtrFx3InxtLr55Fk3r stwy9sCgYTIUFGlcMJmkWmmmEYKNfy1U8/itRWhyC7NNy2uzi1sIkWLtjU2b0C1PSjxB YMNE0rOIE/xhnTum83exIfwkuT+nePdPJRueQob/lYwMLheEVUUomlH0oQq7WRmEviGV 6IH1VS5a9s9h5oh4H8RevjouSFe/U1Rm6ckL3ow173V0s3Nt0WsASUZQph/62UleV8sO r5QMKRvrnygPH1pkvCZIsak9WLTBEMXR43cDY6TlU3Hevf9r4C1hK73HW1Q74HtHMaHK 55yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679646635; 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=ReGANFiUQBaIIrBiqY6D7AEmqUouLK80OgtlV4Z5hdo=; b=tORE4UxBEhu3Er1zngtQq2cOQZHRBkxkhRyVcf0mC5usQB55vqLA/YUWUbQVQN27jm A+hYK1A3sUEF0bro47KQmQYNFnt9IHQ+yk7JcYblCwS6zpj/upu1ueRpG/US19j7dH4y sp2jo3sQzg3O+hrsgptr6bHkiK4O7775NF0KXLk2BBteXoADmWRwpsOuLsSWNvKxxjmD /3Jre/nMeLzS/Vr/hUPjKA91ZQ0AzjZLgjBNZtFhnoNlRe9bWi1EEYcLBddEgHkoMwRw 11z9C2ZjVi9W5jmpmvDmQQGWV9X3A+vJzd1JsBRQZL8iNUnqVhQvQZ3/CixNu2sUVptP bzwA== X-Gm-Message-State: AAQBX9fRUzTWgkYwzhaCmGa1lAPaFWT4I6ggsI1bD+Qdhg5DXaK8+bIv n6WchBlsgQDG5kH0GmIxy1dWBjxyWgbyOx14UJg61w== X-Google-Smtp-Source: AKy350bb/l0cMpSUtcWoxSuC8owSK85k1w28b6CJj3zFNBMwk5xTLytLn1/A47ygkdeu0hUagwZo/ppR64uZcjQhzro= X-Received: by 2002:a17:907:6b86:b0:931:f8b1:4474 with SMTP id rg6-20020a1709076b8600b00931f8b14474mr1030723ejc.2.1679646635153; Fri, 24 Mar 2023 01:30:35 -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: In-Reply-To: From: Warner Losh Date: Fri, 24 Mar 2023 09:30:24 +0100 Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Nuno Teixeira Cc: FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000096c0a05f7a1351b" X-Rspamd-Queue-Id: 4Pjb4s139Lz4MlQ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000096c0a05f7a1351b Content-Type: text/plain; charset="UTF-8" On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira wrote: > Hello all, > > I'm getting a file not found on 12 and 13 compiling net/sflowtool latest > update: > It compile fine on 14. > > I've searched 14 src and found: > --- > ./include/byteswap.h > ./contrib/ofed/include/byteswap.h > ./contrib/llvm-project/libcxx/include/__bit/byteswap.h > --- > Any clues? > I added it a short time ago. I thought I mfc'd it to 13 but not 12. How recent a 13? It's a non standard glibc extension that may be in the next posix standard though. I've not looked at the draft for it yet to see if it complies or not. Warner Thanks, > > --- > ===> Building for sflowtool-6.01 > --- all --- > /usr/bin/make all-recursive > --- all-recursive --- > Making all in src > --- sflowtool.o --- > cc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe -fstack-protector-strong > -fno-strict-aliasing -MT sflowtool.o -MD -MP -MF .deps/sflowtool.Tpo -c -o > sflowtool.o sflowtool.c > sflowtool.c:32:10: fatal error: 'byteswap.h' file not found > #include > ^~~~~~~~~~~~ > 1 error generated. > *** [sflowtool.o] Error code 1 > --- > > > -- > Nuno Teixeira > FreeBSD Committer (ports) > --000000000000096c0a05f7a1351b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira <eduardo@freebsd.org> wrote:
Hello all,

I'm getting a file not found on 12 and 13 compiling net= /sflowtool latest update:
It compile fine on 14.
I've searched 14 src and found:
---
./= include/byteswap.h
./contrib/ofed/include/byteswap.h
./contrib/llvm-p= roject/libcxx/include/__bit/byteswap.h
---
Any clues?


I added it a short time ago. I thought I = mfc'd it to 13 but not 12. How recent a 13? It's a non standard gli= bc extension that may be in the next posix standard though. I've not lo= oked at the draft for it yet to see if it complies or not.

Warner

=
Thanks,

---
= =3D=3D=3D> =C2=A0Building for sflowtool-6.01
--- all ---
/usr/bin/= make =C2=A0all-recursive
--- all-recursive ---
Making all in src
-= -- sflowtool.o ---
cc -DHAVE_CONFIG_H -I. -I.. =C2=A0 =C2=A0 =C2=A0-O2 -= pipe =C2=A0-fstack-protector-strong -fno-strict-aliasing -MT sflowtool.o -M= D -MP -MF .deps/sflowtool.Tpo -c -o sflowtool.o sflowtool.c
sflowtool.c:= 32:10: fatal error: 'byteswap.h' file not found
#include <byt= eswap.h>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^~~~~~~~~~~~
1 error ge= nerated.
*** [sflowtool.o] Error code 1
---

=

--
Nuno Teixeir= a
FreeBSD Committer (ports)
--000000000000096c0a05f7a1351b-- From nobody Fri Mar 24 08:40:57 2023 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 4PjbK1455Gz41HB2; Fri, 24 Mar 2023 08:41:09 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PjbK13XgXz4Q6l; Fri, 24 Mar 2023 08:41:09 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679647269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IrcJ66wOo7O7B/BtD3DNrsS4mnubDQ7fXmW+826cvG0=; b=iWGzc04GaICEEDHZ/blTgHBnIVui9cSBf1UXbMAv2nPxbfVKQjTWRkCc3cE2rWiRrQTf8i Xis03yLad/WRVuboPNpfSzgrDwhAaYPySZcA9nKjtGiM8gvCNqR7/X2Tm3FApV9tTY53QF CGdkZEkO6EgPhyIta39MZTx3fYQQCkur91ZCH8RL8W7QgWYJHEdeS5hQ9gyZX2z+0Q6wpS ehXNOCxsetqgwMk19EEu8nq3+pG0YvqwMIU1a6OTC+gDpdWS6K06PuSe0ZuIh4SPiR1ud9 /oZBzapOYjVQ/Sxcr5nlngglEd36b9R3AnR/b0w40jz1u9VGAz756fvpBuDVsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679647269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IrcJ66wOo7O7B/BtD3DNrsS4mnubDQ7fXmW+826cvG0=; b=L61WZQwOJmWpFgOTtZ1ImTBr8U9bbZ0utU+I14L/ss1+M2BPqFJTPd39/hcHfLhdLakB1n hRjMB4SzKnsfigcOpDPkU+qPfvcrWnO5Ti7Fl12z1KDdPBcl+y5UVLK2mErRfcQbjstKWs WyIxe84ZM7PzeJ9OclLOjnYsajUK76R/QmJaziploubcdWgNHws9iCMHaXMiDCjE3hesKc 8XP+ON2yw8Q4CSrLJkO8s7iBORiJBvleDMha0VtaOdmy3nmIzsb+BJvGs9Qt5k/Cc2dtsm 31EpZJWxS0JYGBJsI0o4VNnM3O1wHtd5bWHkB1yUuZHjT8juBkuqYPdwky0Q+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679647269; a=rsa-sha256; cv=none; b=Oy9ZmSz2b3ct4hmlsXicj69fLgsoVJ5r8r3KqDb16KfpvJKp5ygKRnee4pi5YHBRJGGGX3 A6gXuab1KPa25EtUunUhhfLqzWgZUErUgItjAiBZQUxxLzZnthxXfZ3DZ5ONXrRBNrKUNe MrDGOY4kqpOVf0wO5rHLfJs3quJlsHRKibP3NyjsEpsH9zqlyhI9rRein//j+vP250cig9 NNAUUTJnZvUSGkcZxj22yZYV7oKgJlm9AF5mA6+GNRfjqvjJGqCzRVFSMiIBoPf2eF3ZWd JtXpEWKD2sD/N5ddSZvFGI7SnmqkQ7gbcAD2G5zN+g0gCBv2lyquD2K7OrnteQ== Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PjbK12Zynzvlm; Fri, 24 Mar 2023 08:41:09 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-ua1-f44.google.com with SMTP id i22so899109uat.8; Fri, 24 Mar 2023 01:41:09 -0700 (PDT) X-Gm-Message-State: AAQBX9cuzcarAD7O2XjGwDmcnPPo6Hkh5PhGPwMgrKGxJ33LIPxcog0G ryF4HjKviTz2YvEvI81uLHSPTqORBAsMud64MZA= X-Google-Smtp-Source: AKy350Zs2RCVZ2+hggQY5e0sD/yEQj4KWlPVvhUX+2wyiWzKhfzl+LXBxfhvRW7ZOX+obQS1UFIim+j/ydcxiwWSV2Q= X-Received: by 2002:a1f:28c5:0:b0:401:184:339c with SMTP id o188-20020a1f28c5000000b004010184339cmr1252334vko.3.1679647268873; Fri, 24 Mar 2023 01:41:08 -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: In-Reply-To: From: Nuno Teixeira Date: Fri, 24 Mar 2023 08:40:57 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Warner Losh Cc: FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000cf2c3105f7a15ac5" X-ThisMailContainsUnwantedMimeParts: N --000000000000cf2c3105f7a15ac5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Warner, My poudriere jails: --- 124amd64 12.4-RELEASE-p2 amd64 http 2023-03-17 08:04:15 /usr/local/poudriere/jails/124amd64 124i386 12.4-RELEASE-p2 i386 http 2023-03-17 08:04:38 /usr/local/poudriere/jails/124i386 131amd64 13.1-RELEASE-p7 amd64 http 2023-03-17 08:05:03 /usr/local/poudriere/jails/131amd64 --- The strange thing is that 5.08 (old version) have #include too and compiles fine: https://github.com/sflow/sflowtool/issues/41 Thanks, Warner Losh escreveu no dia sexta, 24/03/2023 =C3=A0(s) 08= :30: > > > On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira wrote: > >> Hello all, >> >> I'm getting a file not found on 12 and 13 compiling net/sflowtool latest >> update: >> It compile fine on 14. >> >> I've searched 14 src and found: >> --- >> ./include/byteswap.h >> ./contrib/ofed/include/byteswap.h >> ./contrib/llvm-project/libcxx/include/__bit/byteswap.h >> --- >> Any clues? >> > > > I added it a short time ago. I thought I mfc'd it to 13 but not 12. How > recent a 13? It's a non standard glibc extension that may be in the next > posix standard though. I've not looked at the draft for it yet to see if = it > complies or not. > > Warner > > Thanks, >> >> --- >> =3D=3D=3D> Building for sflowtool-6.01 >> --- all --- >> /usr/bin/make all-recursive >> --- all-recursive --- >> Making all in src >> --- sflowtool.o --- >> cc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe -fstack-protector-strong >> -fno-strict-aliasing -MT sflowtool.o -MD -MP -MF .deps/sflowtool.Tpo -c = -o >> sflowtool.o sflowtool.c >> sflowtool.c:32:10: fatal error: 'byteswap.h' file not found >> #include >> ^~~~~~~~~~~~ >> 1 error generated. >> *** [sflowtool.o] Error code 1 >> --- >> >> >> -- >> Nuno Teixeira >> FreeBSD Committer (ports) >> > --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000cf2c3105f7a15ac5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Warner,

My poudrie= re jails:
---
124amd64 =C2=A0 12.4-RELEASE-p2 = =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 = =C2=A0 =C2=A0 2023-03-17 08:04:15 /usr/local/poudriere/jails/124amd64
= 124i386 =C2=A0 =C2=A012.4-RELEASE-p2 =C2=A0 =C2=A0 =C2=A0i386 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17 08:04:38 /= usr/local/poudriere/jails/124i386
131amd64 =C2=A0 13.1-RELEASE-p7 = =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 = =C2=A0 =C2=A0 2023-03-17 08:05:03 /usr/local/poudriere/jails/131amd64
=
---

The strange thing is that 5.08 (old versi= on) have #include <byteswap.h> too and compiles fine:

=
Warner Losh <imp@bsdimp.com> escreveu no dia sexta, 24/03/2023 =C3= =A0(s) 08:30:


On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira <eduardo@freebsd.org&g= t; wrote:
Hello all,

I'm getting a file = not found on 12 and 13 compiling net/sflowtool latest update:
It = compile fine on 14.

I've searched 14 src a= nd found:
---
./include/byteswap.h
./contrib/ofed/in= clude/byteswap.h
./contrib/llvm-project/libcxx/include/__bit/byteswap.h<= /div>
---
Any clues?


I add= ed it a short time ago. I thought I mfc'd it to 13 but not 12. How rece= nt a 13? It's a non standard glibc extension that may be in the next po= six standard though. I've not looked at the draft for it yet to see if = it complies or not.

Warn= er

Thanks,

---
=3D=3D=3D> =C2=A0B= uilding for sflowtool-6.01
--- all ---
/usr/bin/make =C2=A0all-recurs= ive
--- all-recursive ---
Making all in src
--- sflowtool.o ---cc -DHAVE_CONFIG_H -I. -I.. =C2=A0 =C2=A0 =C2=A0-O2 -pipe =C2=A0-fstack-pr= otector-strong -fno-strict-aliasing -MT sflowtool.o -MD -MP -MF .deps/sflow= tool.Tpo -c -o sflowtool.o sflowtool.c
sflowtool.c:32:10: fatal error: &= #39;byteswap.h' file not found
#include <byteswap.h>
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0^~~~~~~~~~~~
1 error generated.
*** [sflo= wtool.o] Error code 1
---


--
Nuno Teixeira
FreeBSD Committer (ports)


--
Nuno Teixeira
FreeBSD Committ= er (ports)
--000000000000cf2c3105f7a15ac5-- From nobody Fri Mar 24 08:48:10 2023 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 4PjbTD1FS8z41Hm9; Fri, 24 Mar 2023 08:48:16 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PjbTC5zGNz3Csk; Fri, 24 Mar 2023 08:48:15 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; none Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id C4A393200344; Fri, 24 Mar 2023 04:48:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 24 Mar 2023 04:48:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1679647693; x=1679734093; bh=amgdKYma9F9IfoUPzRZ1yfeZl7lNPCWW9A8 l76CNOtk=; b=JNOZ7qvZaVkJnCVqMnARD1W8BOdO6/LacoPgw23jacFbvQp6c8z o2M1egXjnwHunD/uG6Xd3Df3ivMq1pUXcRPe+MKCl6yWuaPwWkiRjm2FFD/Sw4d7 +6pUa51anvN50/CbTPH7kJ5zlWneODVKJWRC3atMGhCKtWUeFWEBht65IV0zS1C2 7mQMBhi77em7fGtYg7aqZBrXCgnP6c+b2rQ8Do6Ju+wUFoQ+pkBnhKiXwG3IKjbN HOpH7dQNnyq98bi/BOnTYQXGQwrtnPOWYuwYJ2HirnFi8aBxTRH8foDy+1iDB3YG qNW2huZlf0v5rrO83mrl7wD0Du52pwr+l/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1679647693; x=1679734093; bh=amgdKYma9F9IfoUPzRZ1yfeZl7lNPCWW9A8 l76CNOtk=; b=gvNq8T19yceTVG5ClQmDdzdWow2oD/9CD+x6KJiuH9Y9lghqgLM d3tueBIBd95Y1SWqSSXmfIEEaNYD5hnJ/y1BVwlD1mzWzFkPmRING1JfVCiWQA8Q LosUKXYfvP6SSDeK0mBv51GkgYAvvxPu/8kwbRKsgC9Eec54Uj4Y3IX8C/krGceE GwpiDZ7Z2BtHS4gG/0yeiTEMaFFwVJ5Lm26pA+3gSGa1bxKyrcGypQJo60ChyT0i 6eMWmurdz43SLjSYyA7NI/W7e/ukV9Q0E/somuatMCmxwjJsqcofB56WycFv+qYQ gtp+F6tJtXDZAWDEnHSiSl8MbpNZ/0Nsk3w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeghedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomhepjghu rhhiuceohihurhhisegrvghtvghrnhdrohhrgheqnecuggftrfgrthhtvghrnhepkeeiff evvedvfeelgfekteegkedutdejkefhudffieeutdfgtdduiedtkeeivdffnecuffhomhgr ihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpeihuhhrihesrggvthgvrhhnrdhorhhg X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Mar 2023 04:48:12 -0400 (EDT) Message-ID: Date: Fri, 24 Mar 2023 09:48:10 +0100 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 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: byteswap.h not found on 12 and 13 Content-Language: en-US To: Nuno Teixeira , Warner Losh Cc: FreeBSD CURRENT , FreeBSD Mailing List References: From: Yuri In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4PjbTC5zGNz3Csk X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Nuno Teixeira wrote: > Hello Warner, > > My poudriere jails: > --- > 124amd64   12.4-RELEASE-p2      amd64         http         2023-03-17 > 08:04:15 /usr/local/poudriere/jails/124amd64 > 124i386    12.4-RELEASE-p2      i386          http         2023-03-17 > 08:04:38 /usr/local/poudriere/jails/124i386 > 131amd64   13.1-RELEASE-p7      amd64         http         2023-03-17 > 08:05:03 /usr/local/poudriere/jails/131amd64 > --- > > The strange thing is that 5.08 (old version) have #include > too and compiles fine|: > | > https://github.com/sflow/sflowtool/issues/41 > 5.08 seems to have it commented out: sflowtool-5.08/src/sflowtool.c: /* #ifdef DARWIN #include #define bswap_16(x) NXSwapShort(x) #define bswap_32(x) NXSwapInt(x) #else #include #endif */ > Warner Losh > escreveu no dia > sexta, 24/03/2023 à(s) 08:30: > > > > On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira > wrote: > > Hello all, > > I'm getting a file not found on 12 and 13 compiling > net/sflowtool latest update: > It compile fine on 14. > > I've searched 14 src and found: > --- > ./include/byteswap.h > ./contrib/ofed/include/byteswap.h > ./contrib/llvm-project/libcxx/include/__bit/byteswap.h > --- > Any clues? > > > > I added it a short time ago. I thought I mfc'd it to 13 but not 12. > How recent a 13? It's a non standard glibc extension that may be in > the next posix standard though. I've not looked at the draft for it > yet to see if it complies or not. > > Warner > > Thanks, > > --- > ===>  Building for sflowtool-6.01 > --- all --- > /usr/bin/make  all-recursive > --- all-recursive --- > Making all in src > --- sflowtool.o --- > cc -DHAVE_CONFIG_H -I. -I..      -O2 -pipe >  -fstack-protector-strong -fno-strict-aliasing -MT sflowtool.o > -MD -MP -MF .deps/sflowtool.Tpo -c -o sflowtool.o sflowtool.c > sflowtool.c:32:10: fatal error: 'byteswap.h' file not found > #include >          ^~~~~~~~~~~~ > 1 error generated. > *** [sflowtool.o] Error code 1 > --- > > > -- > Nuno Teixeira > FreeBSD Committer (ports) > > > > -- > Nuno Teixeira > FreeBSD Committer (ports) From nobody Fri Mar 24 08:57:43 2023 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 4PjbhN2ZCGz41JCQ for ; Fri, 24 Mar 2023 08:57:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 4PjbhM6PLmz3FW0 for ; Fri, 24 Mar 2023 08:57:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x529.google.com with SMTP id eh3so4916168edb.11 for ; Fri, 24 Mar 2023 01:57:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679648274; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MN3sIn3TUu2zB79IvKJr8CtATgsUnWB9rm3RfMubNLw=; b=SdzHLUc/u+XC+KfcdN8zSMw5ijTRJElqjVgrzHyvqNc9LNMBMP8XBRoBU+JohqKq+r b3bjOmHhezbKZD0coD42oUQWLXUSAFg0kQY08POKvYqq548s9s8aA7/9Oe0lV3Ujbt/Z gtlG9w9T6gRmKq5f8HiEcgKxGrvrrmAz7CGzzXZaBer3wQNPHmumX0fgMnFDDq6jCSqo oTUK8ZxLX5/lvIHrc9QbaffsrCY88tyUbPOlEyIyzYW6bEqBnKJqLaRF4bhOoRf6Y5xR azQYdbNWQjNQGufxGwutNNgfAAegGwzOqxCRAJJG007uWc3uczlyFG7ds7MQ1Cy+0Klb /18Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679648274; 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=MN3sIn3TUu2zB79IvKJr8CtATgsUnWB9rm3RfMubNLw=; b=kZ1j6scR8zCtJp8Yr8CDZGS/w1X1PS1cpQVPLpqEZgfUHH59dzOSeg8nsXmQca2rUS ijYhHEZGkD9SGOFZTUscqa3keaJaHjiTuVLIlq3v5KBM/xk0sxRYeb8wANev6L3dwEEu 9rPD5RrXDwHMObr/O3DVndp7kJtSlFz525nGyUXtgOCrmQwu1RTs/NmhQLWPaqFgnE5f T210Ap4TF94k5aHADvLKhcUgL7pdoTOCHkKs60vHuIY6Wqwyu1IJGaMik3SirXVmUKKw VP0DGnRu3CwzEprQyDJanxaJyfePv8qOq95cSBvEyp5mo6VZrYeR4Mg6RXcwgWsYM3Mw J5xA== X-Gm-Message-State: AAQBX9eGCj444QDTdIjFJ3vJCwHUQt6StmBYq9NXKlze1Q+NvcKxhHWT i8iy5cb2iOWbNjtTIgnq1FwvTKF6IbIT4p8mcS+j6P0tctqZfnX/qTkihdu0 X-Google-Smtp-Source: AKy350ZBd6/gE212zijV0xVBIRY+voDmfDYQ9nnXB+1NO2hBKx4tBwInCylxicHnvCAAJG1RhMhZOcKiapCyYP5XWz4= X-Received: by 2002:a50:9b5c:0:b0:4fa:e5e0:9466 with SMTP id a28-20020a509b5c000000b004fae5e09466mr1088706edj.7.1679648274405; Fri, 24 Mar 2023 01:57:54 -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: In-Reply-To: From: Warner Losh Date: Fri, 24 Mar 2023 02:57:43 -0600 Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Yuri Cc: Nuno Teixeira , FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000be69db05f7a1969a" X-Rspamd-Queue-Id: 4PjbhM6PLmz3FW0 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000be69db05f7a1969a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yea, I just committed this commit 1761b09bf42d2842e82c1ac614c23d31c4d4c0dc Author: Warner Losh Date: Fri Jan 20 16:33:37 2023 -0700 byteswap.h: Add a glibc/linux compatible byteswap.h For endian.h to work instead of sys/endian.h, some software needs byteswap.h available. It must define {__,}byteswap_{16,32,64}. Included sys/_endian.h to get an appropriate __byteswap16, etc and defines the new macros in terms of them. Enhance _endian.h to allow it to be included from here too. Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D32051 which I MFC'd to 13, but after 13.1R and this isn't a good EN candidate. I've not bothered with stable/12 because I'm lame and have stopped MFCing stuff to it except critical fixes. Long term: this will make life better. Short term, it's less good since we have to still do old-school compatibility. I likely should write a man page for endian.h and byteswap.h Warner On Fri, Mar 24, 2023 at 2:48=E2=80=AFAM Yuri wrote: > Nuno Teixeira wrote: > > Hello Warner, > > > > My poudriere jails: > > --- > > 124amd64 12.4-RELEASE-p2 amd64 http 2023-03-17 > > 08:04:15 /usr/local/poudriere/jails/124amd64 > > 124i386 12.4-RELEASE-p2 i386 http 2023-03-17 > > 08:04:38 /usr/local/poudriere/jails/124i386 > > 131amd64 13.1-RELEASE-p7 amd64 http 2023-03-17 > > 08:05:03 /usr/local/poudriere/jails/131amd64 > > --- > > > > The strange thing is that 5.08 (old version) have #include > > too and compiles fine|: > > | > > https://github.com/sflow/sflowtool/issues/41 > > > > 5.08 seems to have it commented out: > > sflowtool-5.08/src/sflowtool.c: > > /* > #ifdef DARWIN > #include > #define bswap_16(x) NXSwapShort(x) > #define bswap_32(x) NXSwapInt(x) > #else > #include > #endif > */ > > > > Warner Losh > escreveu no dia > > sexta, 24/03/2023 =C3=A0(s) 08:30: > > > > > > > > On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira > > wrote: > > > > Hello all, > > > > I'm getting a file not found on 12 and 13 compiling > > net/sflowtool latest update: > > It compile fine on 14. > > > > I've searched 14 src and found: > > --- > > ./include/byteswap.h > > ./contrib/ofed/include/byteswap.h > > ./contrib/llvm-project/libcxx/include/__bit/byteswap.h > > --- > > Any clues? > > > > > > > > I added it a short time ago. I thought I mfc'd it to 13 but not 12. > > How recent a 13? It's a non standard glibc extension that may be in > > the next posix standard though. I've not looked at the draft for it > > yet to see if it complies or not. > > > > Warner > > > > Thanks, > > > > --- > > =3D=3D=3D> Building for sflowtool-6.01 > > --- all --- > > /usr/bin/make all-recursive > > --- all-recursive --- > > Making all in src > > --- sflowtool.o --- > > cc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe > > -fstack-protector-strong -fno-strict-aliasing -MT sflowtool.o > > -MD -MP -MF .deps/sflowtool.Tpo -c -o sflowtool.o sflowtool.c > > sflowtool.c:32:10: fatal error: 'byteswap.h' file not found > > #include > > ^~~~~~~~~~~~ > > 1 error generated. > > *** [sflowtool.o] Error code 1 > > --- > > > > > > -- > > Nuno Teixeira > > FreeBSD Committer (ports) > > > > > > > > -- > > Nuno Teixeira > > FreeBSD Committer (ports) > > --000000000000be69db05f7a1969a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yea, I just committed this

commit 1761b= 09bf42d2842e82c1ac614c23d31c4d4c0dc
Author: Warner Losh <imp@FreeBSD.= org>
Date: =C2=A0 Fri Jan 20 16:33:37 2023 -0700

=C2=A0 =C2=A0= byteswap.h: Add a glibc/linux compatible byteswap.h

=C2=A0 =C2=A0 F= or endian.h to work instead of sys/endian.h, some software needs
=C2=A0 = =C2=A0 byteswap.h available. It must define {__,}byteswap_{16,32,64}.
= =C2=A0 =C2=A0 Included sys/_endian.h to get an appropriate __byteswap16, et= c
=C2=A0 =C2=A0 and defines the new macros in terms of them. Enhance _en= dian.h
=C2=A0 =C2=A0 to allow it to be included from here too.

= =C2=A0 =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Netflix
= =C2=A0 =C2=A0 Reviewed by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0markj=C2=A0 =C2=A0 Differential Revision: =C2=A0https://reviews.freebsd.org/D32051

<= /div>
which I MFC'd to 13, but after 13.1R and this isn't a goo= d EN candidate. I've not bothered with stable/12 because I'm lame a= nd have stopped MFCing stuff to it except critical fixes.

Long term: this will make life better. Short term, it's less go= od since we have to still do old-school compatibility.

=
I likely should write a man page for endian.h and byteswap.h

Warner

On Fri, Mar 24, 2023 at 2:48=E2=80=AFAM Yuri = <yuri@aetern.org> wrote:
Nuno Teixeira wrote:<= br> > Hello Warner,
>
> My poudriere jails:
> ---
> 124amd64 =C2=A0 12.4-RELEASE-p2 =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:04:15 /usr/local/poudriere/jails/124amd64
> 124i386 =C2=A0 =C2=A012.4-RELEASE-p2 =C2=A0 =C2=A0 =C2=A0i386 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:04:38 /usr/local/poudriere/jails/124i386
> 131amd64 =C2=A0 13.1-RELEASE-p7 =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:05:03 /usr/local/poudriere/jails/131amd64
> ---
>
> The strange thing is that 5.08 (old version) have #include <byteswa= p.h>
> too and compiles fine|:
> |
> https://github.com/sflow/sflowtool/issues/41 > <https://github.com/sflow/sflowtool/issues/41>

5.08 seems to have it commented out:

sflowtool-5.08/src/sflowtool.c:

/*
#ifdef DARWIN
#include <architecture/byte_order.h>
#define bswap_16(x) NXSwapShort(x)
#define bswap_32(x) NXSwapInt(x)
#else
#include <byteswap.h>
#endif
*/


> Warner Losh <
im= p@bsdimp.com <mailto:imp@bsdimp.com>> escreveu no dia
> sexta, 24/03/2023 =C3=A0(s) 08:30:
>
>
>
>=C2=A0 =C2=A0 =C2=A0On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira <eduardo@freebsd.org
>=C2=A0 =C2=A0 =C2=A0<mailto:
eduardo@freebsd.org>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Hello all,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I'm getting a file not found on 1= 2 and 13 compiling
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0net/sflowtool latest update:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0It compile fine on 14.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I've searched 14 src and found: >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./include/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./contrib/ofed/include/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./contrib/llvm-project/libcxx/include= /__bit/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Any clues?
>
>
>
>=C2=A0 =C2=A0 =C2=A0I added it a short time ago. I thought I mfc'd = it to 13 but not 12.
>=C2=A0 =C2=A0 =C2=A0How recent a 13? It's a non standard glibc exte= nsion that may be in
>=C2=A0 =C2=A0 =C2=A0the next posix standard though. I've not looked= at the draft for it
>=C2=A0 =C2=A0 =C2=A0yet to see if it complies or not.
>
>=C2=A0 =C2=A0 =C2=A0Warner
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Thanks,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D=3D=3D> =C2=A0Building for sflo= wtool-6.01
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- all ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/bin/make =C2=A0all-recursive
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- all-recursive ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Making all in src
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- sflowtool.o ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cc -DHAVE_CONFIG_H -I. -I.. =C2=A0 = =C2=A0 =C2=A0-O2 -pipe
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0-fstack-protector-strong -fno-s= trict-aliasing -MT sflowtool.o
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-MD -MP -MF .deps/sflowtool.Tpo -c -o= sflowtool.o sflowtool.c
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sflowtool.c:32:10: fatal error: '= byteswap.h' file not found
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#include <byteswap.h>
>=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=A01 error generated.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*** [sflowtool.o] Error code 1
>=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=A0Nuno Teixeira
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBSD Committer (ports)
>
>
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)

--000000000000be69db05f7a1969a-- From nobody Fri Mar 24 09:01:43 2023 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 4Pjbn10fLXz41JsS for ; Fri, 24 Mar 2023 09:01:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 4Pjbn03RNRz3HkT for ; Fri, 24 Mar 2023 09:01:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=LuPg08C1; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::52b) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-ed1-x52b.google.com with SMTP id o12so4996917edb.9 for ; Fri, 24 Mar 2023 02:01:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679648514; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IaGAAxhV145zLoSeCPyzJCzYEy/FlVQRhBVPSTn90J0=; b=LuPg08C1HZd4DQMB3nLd+07VdCAhwtwdKzFUvxOvl65X6gDP/p+wC6AR39XQAS2FkC PSGha+RKCvrWsqo1GKavzOYuO2IucJ7Eeq8B8dxTKEyGHF7UuoWDNOmmkYBRiMEyRy2U rvenZof78jEJ+80oq2JRLqSef4+eTX1SJWJq+wyPGCX9Koij4f5PpWcYNtMFSCY0E5LM f0/ztulKKDYsHNzcJFGEovjT+Orrmv3YqFhA7kVQyxI134fHOCRCfXPKpXfshi0q2NJu aG4H/5JOecZ3ajDBgDfz/4aJgBo4KLW7UP+Pclv/so8vb8CKwCcLl70b4yqbN23U3ISE wODA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679648514; 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=IaGAAxhV145zLoSeCPyzJCzYEy/FlVQRhBVPSTn90J0=; b=4JpNlmogTNIknTQb9mTjC/ftGdwyOpgc9v4wenBtkS9cwJXesjc1X9NebzQtr1q27N geq/9kKO+KaLEZ/Fd5ItBg2vZPD1NZGa4T1i5saqarl9uJObHXQpNz446abdrJ5/j3lq ti3FljQzJtNImBFhB6tbBvPdIBJOb80+TNmJQ1fz7UrHbeR43DGXKhcbeyG6dAYKtSHO /ONmP/3djCTjswdLrvxUaOSusXw01RQnvQOdlcqWHfLkoGnjA7NEkTa09CRap88mC0hf xePV3ZXWcyVdl3XsUlWi8LIucdiR8EpiD81GAL7iDYlLkfJXq6BAYjPWHpVhuJ9b6Cop vfmA== X-Gm-Message-State: AAQBX9e7fwxhQkeZkFCvTRlnKWHmRpRFKuD/t+GKEpfplJcRGxFfVspv b2mIZZqlgjQTCTHEXljReRT1Ft2/p8cH75CyFaBOgA== X-Google-Smtp-Source: AKy350YbtedZLODO44F0GevOguqARjKUNjkpyGS5/CqqilB4pKxfTEH7w+5RzdGHxDm/iA/RcFdUBMvf7zeqqSZN2ro= X-Received: by 2002:a17:906:d54d:b0:932:da0d:9375 with SMTP id cr13-20020a170906d54d00b00932da0d9375mr1275867ejc.4.1679648514195; Fri, 24 Mar 2023 02:01:54 -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: In-Reply-To: From: Warner Losh Date: Fri, 24 Mar 2023 03:01:43 -0600 Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Yuri Cc: Nuno Teixeira , FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="0000000000000956f505f7a1a5a3" X-Spamd-Result: default: False [-2.97 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.966]; 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]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52b:from]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4Pjbn03RNRz3HkT X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N --0000000000000956f505f7a1a5a3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable And I just looked it up... unlike endian.h, byteswap.h is not in the draft I have of issue 8 posix (due out this year or next, give or take). Warner On Fri, Mar 24, 2023 at 2:57=E2=80=AFAM Warner Losh wrote: > Yea, I just committed this > > commit 1761b09bf42d2842e82c1ac614c23d31c4d4c0dc > Author: Warner Losh > Date: Fri Jan 20 16:33:37 2023 -0700 > > byteswap.h: Add a glibc/linux compatible byteswap.h > > For endian.h to work instead of sys/endian.h, some software needs > byteswap.h available. It must define {__,}byteswap_{16,32,64}. > Included sys/_endian.h to get an appropriate __byteswap16, etc > and defines the new macros in terms of them. Enhance _endian.h > to allow it to be included from here too. > > Sponsored by: Netflix > Reviewed by: markj > Differential Revision: https://reviews.freebsd.org/D32051 > > which I MFC'd to 13, but after 13.1R and this isn't a good EN candidate. > I've not bothered with stable/12 because I'm lame and have stopped MFCing > stuff to it except critical fixes. > > Long term: this will make life better. Short term, it's less good since w= e > have to still do old-school compatibility. > > I likely should write a man page for endian.h and byteswap.h > > Warner > > On Fri, Mar 24, 2023 at 2:48=E2=80=AFAM Yuri wrote: > >> Nuno Teixeira wrote: >> > Hello Warner, >> > >> > My poudriere jails: >> > --- >> > 124amd64 12.4-RELEASE-p2 amd64 http 2023-03-17 >> > 08:04:15 /usr/local/poudriere/jails/124amd64 >> > 124i386 12.4-RELEASE-p2 i386 http 2023-03-17 >> > 08:04:38 /usr/local/poudriere/jails/124i386 >> > 131amd64 13.1-RELEASE-p7 amd64 http 2023-03-17 >> > 08:05:03 /usr/local/poudriere/jails/131amd64 >> > --- >> > >> > The strange thing is that 5.08 (old version) have #include >> > too and compiles fine|: >> > | >> > https://github.com/sflow/sflowtool/issues/41 >> > >> >> 5.08 seems to have it commented out: >> >> sflowtool-5.08/src/sflowtool.c: >> >> /* >> #ifdef DARWIN >> #include >> #define bswap_16(x) NXSwapShort(x) >> #define bswap_32(x) NXSwapInt(x) >> #else >> #include >> #endif >> */ >> >> >> > Warner Losh > escreveu no dia >> > sexta, 24/03/2023 =C3=A0(s) 08:30: >> > >> > >> > >> > On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira > > > wrote: >> > >> > Hello all, >> > >> > I'm getting a file not found on 12 and 13 compiling >> > net/sflowtool latest update: >> > It compile fine on 14. >> > >> > I've searched 14 src and found: >> > --- >> > ./include/byteswap.h >> > ./contrib/ofed/include/byteswap.h >> > ./contrib/llvm-project/libcxx/include/__bit/byteswap.h >> > --- >> > Any clues? >> > >> > >> > >> > I added it a short time ago. I thought I mfc'd it to 13 but not 12= . >> > How recent a 13? It's a non standard glibc extension that may be i= n >> > the next posix standard though. I've not looked at the draft for i= t >> > yet to see if it complies or not. >> > >> > Warner >> > >> > Thanks, >> > >> > --- >> > =3D=3D=3D> Building for sflowtool-6.01 >> > --- all --- >> > /usr/bin/make all-recursive >> > --- all-recursive --- >> > Making all in src >> > --- sflowtool.o --- >> > cc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe >> > -fstack-protector-strong -fno-strict-aliasing -MT sflowtool.o >> > -MD -MP -MF .deps/sflowtool.Tpo -c -o sflowtool.o sflowtool.c >> > sflowtool.c:32:10: fatal error: 'byteswap.h' file not found >> > #include >> > ^~~~~~~~~~~~ >> > 1 error generated. >> > *** [sflowtool.o] Error code 1 >> > --- >> > >> > >> > -- >> > Nuno Teixeira >> > FreeBSD Committer (ports) >> > >> > >> > >> > -- >> > Nuno Teixeira >> > FreeBSD Committer (ports) >> >> --0000000000000956f505f7a1a5a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
And I just looked it up... unlike endian.h, byteswap.= h is not in the draft I have of issue 8 posix (due out this year or next, g= ive or take).

Warner

On Fri, Mar 24, 2023 at 2:57= =E2=80=AFAM Warner Losh <imp@bsdimp.co= m> wrote:
Yea, I just committed this

commit 1761= b09bf42d2842e82c1ac614c23d31c4d4c0dc
Author: Warner Losh <imp@FreeBSD= .org>
Date: =C2=A0 Fri Jan 20 16:33:37 2023 -0700

=C2=A0 =C2= =A0 byteswap.h: Add a glibc/linux compatible byteswap.h

=C2=A0 =C2= =A0 For endian.h to work instead of sys/endian.h, some software needs
= =C2=A0 =C2=A0 byteswap.h available. It must define {__,}byteswap_{16,32,64}= .
=C2=A0 =C2=A0 Included sys/_endian.h to get an appropriate __byteswap1= 6, etc
=C2=A0 =C2=A0 and defines the new macros in terms of them. Enhanc= e _endian.h
=C2=A0 =C2=A0 to allow it to be included from here too.
<= br>=C2=A0 =C2=A0 Sponsored by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Netflix=C2=A0 =C2=A0 Reviewed by: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0markj=
=C2=A0 =C2=A0 Differential Revision: =C2=A0https://reviews.freebsd.org/D32051=

which I MFC'd to 13, but after 13.1R and = this isn't a good EN candidate. I've not bothered with stable/12 be= cause I'm lame and have stopped MFCing stuff to it except critical fixe= s.

Long term: this will make life better. Short te= rm, it's less good since we have to still do old-school compatibility.<= /div>

I likely should write a man page for endian.h and = byteswap.h

Warner

On Fri, Mar 24, 2023 at 2:4= 8=E2=80=AFAM Yuri <= yuri@aetern.org> wrote:
Nuno Teixeira wrote:
> Hello Warner,
>
> My poudriere jails:
> ---
> 124amd64 =C2=A0 12.4-RELEASE-p2 =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:04:15 /usr/local/poudriere/jails/124amd64
> 124i386 =C2=A0 =C2=A012.4-RELEASE-p2 =C2=A0 =C2=A0 =C2=A0i386 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:04:38 /usr/local/poudriere/jails/124i386
> 131amd64 =C2=A0 13.1-RELEASE-p7 =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:05:03 /usr/local/poudriere/jails/131amd64
> ---
>
> The strange thing is that 5.08 (old version) have #include <byteswa= p.h>
> too and compiles fine|:
> |
> https://github.com/sflow/sflowtool/issues/41 > <https://github.com/sflow/sflowtool/issues/41>

5.08 seems to have it commented out:

sflowtool-5.08/src/sflowtool.c:

/*
#ifdef DARWIN
#include <architecture/byte_order.h>
#define bswap_16(x) NXSwapShort(x)
#define bswap_32(x) NXSwapInt(x)
#else
#include <byteswap.h>
#endif
*/


> Warner Losh <
im= p@bsdimp.com <mailto:imp@bsdimp.com>> escreveu no dia
> sexta, 24/03/2023 =C3=A0(s) 08:30:
>
>
>
>=C2=A0 =C2=A0 =C2=A0On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira <eduardo@freebsd.org
>=C2=A0 =C2=A0 =C2=A0<mailto:
eduardo@freebsd.org>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Hello all,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I'm getting a file not found on 1= 2 and 13 compiling
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0net/sflowtool latest update:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0It compile fine on 14.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I've searched 14 src and found: >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./include/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./contrib/ofed/include/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./contrib/llvm-project/libcxx/include= /__bit/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Any clues?
>
>
>
>=C2=A0 =C2=A0 =C2=A0I added it a short time ago. I thought I mfc'd = it to 13 but not 12.
>=C2=A0 =C2=A0 =C2=A0How recent a 13? It's a non standard glibc exte= nsion that may be in
>=C2=A0 =C2=A0 =C2=A0the next posix standard though. I've not looked= at the draft for it
>=C2=A0 =C2=A0 =C2=A0yet to see if it complies or not.
>
>=C2=A0 =C2=A0 =C2=A0Warner
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Thanks,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D=3D=3D> =C2=A0Building for sflo= wtool-6.01
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- all ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/bin/make =C2=A0all-recursive
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- all-recursive ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Making all in src
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- sflowtool.o ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cc -DHAVE_CONFIG_H -I. -I.. =C2=A0 = =C2=A0 =C2=A0-O2 -pipe
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0-fstack-protector-strong -fno-s= trict-aliasing -MT sflowtool.o
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-MD -MP -MF .deps/sflowtool.Tpo -c -o= sflowtool.o sflowtool.c
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sflowtool.c:32:10: fatal error: '= byteswap.h' file not found
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#include <byteswap.h>
>=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=A01 error generated.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*** [sflowtool.o] Error code 1
>=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=A0Nuno Teixeira
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBSD Committer (ports)
>
>
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)

--0000000000000956f505f7a1a5a3-- From nobody Fri Mar 24 09:09:58 2023 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 4PjbyW209Bz41Jtt for ; Fri, 24 Mar 2023 09:10:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 4PjbyV3ghyz3KGf for ; Fri, 24 Mar 2023 09:10:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=s3zPQ3Sz; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2a00:1450:4864:20::529) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-ed1-x529.google.com with SMTP id eg48so4996543edb.13 for ; Fri, 24 Mar 2023 02:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679649009; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FFEQVFOm3GWtnJZbONPXk7luISVslfdyp5R3Au6W8Yc=; b=s3zPQ3Szz1xytA95m6U9macIbeg9EqIdN5ALCWe9AsGGToXIjgrqw904t0eaE1BuXI lD9k/+KlC+7T93jcEylaFzDPP7a8OjrEHt1apwvmnR1mhqRUGnnCzTlDMjByoFUviTkk tuvFg/K0l20GiAWh82ASuEG3+raJY3o1isuCu/t65UCOF1cy6W3SkdSnSU4pmgBZaPnN STPgiOJp8g3MuDp5MF85fvDHdmWgJzP+d6hU/DfTnm9xvPIYM1n7lCJwhON5ia7KsjxC E135qKQfzQEYBkkGw0OMhOg+5EwWmb07FtQjx6nBtNG0lbiNGL8k/wlkM0ADJ1WoigoA AtdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679649009; 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=FFEQVFOm3GWtnJZbONPXk7luISVslfdyp5R3Au6W8Yc=; b=TCZstIE5fWKtt99LOU3XJAHPbHabH+jkWhZVs0rqGAF+CdZ/sovug7i37BI3xGiRdf rlkqI3XXkrOCVxOUetuJ8d/RFihRkqSViK0sx/vqJrOqW3rDd0v9ZAhDrLUlaIJeAie4 jUOVg6SYk9ASZ1CtVHVxbnY3gaORrZZw6kReX2m/nLQKvMzSxgGycCqr2SVnHdIjn7cP kVb+YmzRnCIfOzKEkpxcemnp5nggX3cQwQxtYYnZ3/YQ/Xciy87nhvieE0GjaUY3U1GB dxvy9AlWsu0KZtud9Y25m+3ASPTI3uxPaH8tigJ7ZAVn92X6yt6aj5rdYMzxaYy9A84P 4O3w== X-Gm-Message-State: AAQBX9c3h3Fg/dPecH6f/TN6O+u/z14MGwPjQgPWd9G1nmqAaRdXOfFw bFDDbHrH2aCmy5Zhg1sEXV1FtVPS+tbQpG+iWE4j1ovrGVNVIsb1k9nOp3KE X-Google-Smtp-Source: AKy350YaUfP7XURPSTPxB3KsSW/r8T8g5bvnW476Yb/HEfE+TPQI1qTy8FVNF7Wbw9nsNRrdh085R3h9wf7eKuHhx/U= X-Received: by 2002:a17:906:5fca:b0:930:310:abcf with SMTP id k10-20020a1709065fca00b009300310abcfmr1045648ejv.2.1679649009467; Fri, 24 Mar 2023 02:10:09 -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: In-Reply-To: From: Warner Losh Date: Fri, 24 Mar 2023 03:09:58 -0600 Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Yuri Cc: Nuno Teixeira , FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="0000000000008e93e405f7a1c264" X-Spamd-Result: default: False [-2.97 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.967]; 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]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::529:from]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4PjbyV3ghyz3KGf X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N --0000000000008e93e405f7a1c264 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable one last reply, if this is for a port, then byteswap.h can usually be implemented as #include #define __bswap_16(x) __bswap16(x) #define __bswap_32(x) __bswap32(x) #define __bswap_64(x) __bswap64(x) #define bswap_16(x) __bswap16(x) #define bswap_32(x) __bswap32(x) #define bswap_64(x) __bswap64(x) in older versions of FreeBSD, but some tricky software will hate the bswap16 (no underscore) etc defines. You could likely put that into the port. Warner On Fri, Mar 24, 2023 at 3:01=E2=80=AFAM Warner Losh wrote: > And I just looked it up... unlike endian.h, byteswap.h is not in the draf= t > I have of issue 8 posix (due out this year or next, give or take). > > Warner > > On Fri, Mar 24, 2023 at 2:57=E2=80=AFAM Warner Losh wrot= e: > >> Yea, I just committed this >> >> commit 1761b09bf42d2842e82c1ac614c23d31c4d4c0dc >> Author: Warner Losh >> Date: Fri Jan 20 16:33:37 2023 -0700 >> >> byteswap.h: Add a glibc/linux compatible byteswap.h >> >> For endian.h to work instead of sys/endian.h, some software needs >> byteswap.h available. It must define {__,}byteswap_{16,32,64}. >> Included sys/_endian.h to get an appropriate __byteswap16, etc >> and defines the new macros in terms of them. Enhance _endian.h >> to allow it to be included from here too. >> >> Sponsored by: Netflix >> Reviewed by: markj >> Differential Revision: https://reviews.freebsd.org/D32051 >> >> which I MFC'd to 13, but after 13.1R and this isn't a good EN candidate. >> I've not bothered with stable/12 because I'm lame and have stopped MFCin= g >> stuff to it except critical fixes. >> >> Long term: this will make life better. Short term, it's less good since >> we have to still do old-school compatibility. >> >> I likely should write a man page for endian.h and byteswap.h >> >> Warner >> >> On Fri, Mar 24, 2023 at 2:48=E2=80=AFAM Yuri wrote: >> >>> Nuno Teixeira wrote: >>> > Hello Warner, >>> > >>> > My poudriere jails: >>> > --- >>> > 124amd64 12.4-RELEASE-p2 amd64 http 2023-03-17 >>> > 08:04:15 /usr/local/poudriere/jails/124amd64 >>> > 124i386 12.4-RELEASE-p2 i386 http 2023-03-17 >>> > 08:04:38 /usr/local/poudriere/jails/124i386 >>> > 131amd64 13.1-RELEASE-p7 amd64 http 2023-03-17 >>> > 08:05:03 /usr/local/poudriere/jails/131amd64 >>> > --- >>> > >>> > The strange thing is that 5.08 (old version) have #include >>> > too and compiles fine|: >>> > | >>> > https://github.com/sflow/sflowtool/issues/41 >>> > >>> >>> 5.08 seems to have it commented out: >>> >>> sflowtool-5.08/src/sflowtool.c: >>> >>> /* >>> #ifdef DARWIN >>> #include >>> #define bswap_16(x) NXSwapShort(x) >>> #define bswap_32(x) NXSwapInt(x) >>> #else >>> #include >>> #endif >>> */ >>> >>> >>> > Warner Losh > escreveu no dia >>> > sexta, 24/03/2023 =C3=A0(s) 08:30: >>> > >>> > >>> > >>> > On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira >> > > wrote: >>> > >>> > Hello all, >>> > >>> > I'm getting a file not found on 12 and 13 compiling >>> > net/sflowtool latest update: >>> > It compile fine on 14. >>> > >>> > I've searched 14 src and found: >>> > --- >>> > ./include/byteswap.h >>> > ./contrib/ofed/include/byteswap.h >>> > ./contrib/llvm-project/libcxx/include/__bit/byteswap.h >>> > --- >>> > Any clues? >>> > >>> > >>> > >>> > I added it a short time ago. I thought I mfc'd it to 13 but not 1= 2. >>> > How recent a 13? It's a non standard glibc extension that may be = in >>> > the next posix standard though. I've not looked at the draft for = it >>> > yet to see if it complies or not. >>> > >>> > Warner >>> > >>> > Thanks, >>> > >>> > --- >>> > =3D=3D=3D> Building for sflowtool-6.01 >>> > --- all --- >>> > /usr/bin/make all-recursive >>> > --- all-recursive --- >>> > Making all in src >>> > --- sflowtool.o --- >>> > cc -DHAVE_CONFIG_H -I. -I.. -O2 -pipe >>> > -fstack-protector-strong -fno-strict-aliasing -MT sflowtool.= o >>> > -MD -MP -MF .deps/sflowtool.Tpo -c -o sflowtool.o sflowtool.c >>> > sflowtool.c:32:10: fatal error: 'byteswap.h' file not found >>> > #include >>> > ^~~~~~~~~~~~ >>> > 1 error generated. >>> > *** [sflowtool.o] Error code 1 >>> > --- >>> > >>> > >>> > -- >>> > Nuno Teixeira >>> > FreeBSD Committer (ports) >>> > >>> > >>> > >>> > -- >>> > Nuno Teixeira >>> > FreeBSD Committer (ports) >>> >>> --0000000000008e93e405f7a1c264 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
one last reply, if this is for a port, then byteswap.h can= usually be implemented as

#include <sys/endian.h>=
#define __bswap_16(x) __bswap16(x)
#define __bswap_32(x) __bs= wap32(x)
#define __bswap_64(x) __bswap64(x)

#define bswap_16(x) _= _bswap16(x)
#define bswap_32(x) __bswap32(x)
#define bswap_64(x) __bs= wap64(x)

in older versions of FreeBSD, but som= e tricky software will hate the bswap16 (no underscore) etc defines. You co= uld likely put that into the port.

Warner

On = Fri, Mar 24, 2023 at 3:01=E2=80=AFAM Warner Losh <imp@bsdimp.com> wrote:
And I just looked it up... = unlike endian.h, byteswap.h is not in the draft I have of issue 8 posix (du= e out this year or next, give or take).

Warner
On F= ri, Mar 24, 2023 at 2:57=E2=80=AFAM Warner Losh <imp@bsdimp.com> wrote:
Yea, I just com= mitted this

commit 1761b09bf42d2842e82c1ac614c23d31c4d4c= 0dc
Author: Warner Losh <imp@FreeBSD.org>
Date: =C2=A0 Fri Jan = 20 16:33:37 2023 -0700

=C2=A0 =C2=A0 byteswap.h: Add a glibc/linux c= ompatible byteswap.h

=C2=A0 =C2=A0 For endian.h to work instead of s= ys/endian.h, some software needs
=C2=A0 =C2=A0 byteswap.h available. It = must define {__,}byteswap_{16,32,64}.
=C2=A0 =C2=A0 Included sys/_endian= .h to get an appropriate __byteswap16, etc
=C2=A0 =C2=A0 and defines the= new macros in terms of them. Enhance _endian.h
=C2=A0 =C2=A0 to allow i= t to be included from here too.

=C2=A0 =C2=A0 Sponsored by: =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 Netflix
=C2=A0 =C2=A0 Reviewed by: =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0markj
=C2=A0 =C2=A0 Differential Revis= ion: =C2=A0https://reviews.freebsd.org/D32051

which = I MFC'd to 13, but after 13.1R and this isn't a good EN candidate. = I've not bothered with stable/12 because I'm lame and have stopped = MFCing stuff to it except critical fixes.

Long ter= m: this will make life better. Short term, it's less good since we have= to still do old-school compatibility.

I likely sh= ould write a man page for endian.h and byteswap.h

= Warner

On Fri, Mar 24, 2023 at 2:48=E2=80=AFAM Yuri <yuri@aetern.org> wrote:
Nuno Teixeira wrote:<= br> > Hello Warner,
>
> My poudriere jails:
> ---
> 124amd64 =C2=A0 12.4-RELEASE-p2 =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:04:15 /usr/local/poudriere/jails/124amd64
> 124i386 =C2=A0 =C2=A012.4-RELEASE-p2 =C2=A0 =C2=A0 =C2=A0i386 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:04:38 /usr/local/poudriere/jails/124i386
> 131amd64 =C2=A0 13.1-RELEASE-p7 =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 http =C2=A0 =C2=A0 =C2=A0 =C2=A0 2023-03-17
> 08:05:03 /usr/local/poudriere/jails/131amd64
> ---
>
> The strange thing is that 5.08 (old version) have #include <byteswa= p.h>
> too and compiles fine|:
> |
> https://github.com/sflow/sflowtool/issues/41 > <https://github.com/sflow/sflowtool/issues/41>

5.08 seems to have it commented out:

sflowtool-5.08/src/sflowtool.c:

/*
#ifdef DARWIN
#include <architecture/byte_order.h>
#define bswap_16(x) NXSwapShort(x)
#define bswap_32(x) NXSwapInt(x)
#else
#include <byteswap.h>
#endif
*/


> Warner Losh <
im= p@bsdimp.com <mailto:imp@bsdimp.com>> escreveu no dia
> sexta, 24/03/2023 =C3=A0(s) 08:30:
>
>
>
>=C2=A0 =C2=A0 =C2=A0On Fri, Mar 24, 2023, 9:23 AM Nuno Teixeira <eduardo@freebsd.org
>=C2=A0 =C2=A0 =C2=A0<mailto:
eduardo@freebsd.org>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Hello all,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I'm getting a file not found on 1= 2 and 13 compiling
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0net/sflowtool latest update:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0It compile fine on 14.
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0I've searched 14 src and found: >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./include/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./contrib/ofed/include/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0./contrib/llvm-project/libcxx/include= /__bit/byteswap.h
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Any clues?
>
>
>
>=C2=A0 =C2=A0 =C2=A0I added it a short time ago. I thought I mfc'd = it to 13 but not 12.
>=C2=A0 =C2=A0 =C2=A0How recent a 13? It's a non standard glibc exte= nsion that may be in
>=C2=A0 =C2=A0 =C2=A0the next posix standard though. I've not looked= at the draft for it
>=C2=A0 =C2=A0 =C2=A0yet to see if it complies or not.
>
>=C2=A0 =C2=A0 =C2=A0Warner
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Thanks,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D=3D=3D> =C2=A0Building for sflo= wtool-6.01
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- all ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/usr/bin/make =C2=A0all-recursive
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- all-recursive ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Making all in src
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0--- sflowtool.o ---
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cc -DHAVE_CONFIG_H -I. -I.. =C2=A0 = =C2=A0 =C2=A0-O2 -pipe
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0-fstack-protector-strong -fno-s= trict-aliasing -MT sflowtool.o
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-MD -MP -MF .deps/sflowtool.Tpo -c -o= sflowtool.o sflowtool.c
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sflowtool.c:32:10: fatal error: '= byteswap.h' file not found
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#include <byteswap.h>
>=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=A01 error generated.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*** [sflowtool.o] Error code 1
>=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=A0Nuno Teixeira
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FreeBSD Committer (ports)
>
>
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)

--0000000000008e93e405f7a1c264-- From nobody Fri Mar 24 09:13:24 2023 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 4Pjc2L4d65z41KVM; Fri, 24 Mar 2023 09:13:30 +0000 (UTC) (envelope-from otis@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pjc2L45p0z3MKh; Fri, 24 Mar 2023 09:13:30 +0000 (UTC) (envelope-from otis@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679649210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sbuFxWviZECGkjKvn2/EUY6bTlPeXpnXdF+P4npNjHM=; b=ibf4WJkd2ZNWY6g8CgxuKj/Fva1F1QnSVCOZ6uDc7exKAiFb+0G41WGLr0Ur/JsFeYce+k L+mWM9CJ4yhcgIHkAHlDiJp1gqdAFlki7Q5zQSqu/GJKu38SWX8b8pcwO9eCFulBAmScHl HwtP2I20/j4qA7VDgDk6Zh+/z71xG8cmnd8mS7UvZs756ieN4njZVEUysTjwEHkxjVXgyA 0ckv0qqtWKK50IfUlh3QAWmIosi3ZEmU1R+jPAkH3dVVqqFu8eEOoDTVyNqvsWn9nnt5mR 3iJhxp919xbR3CEUOyigx8cmXKgLYWsNMk2ESEpgM+EnV94Uc7bZKB2NuKo/gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679649210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sbuFxWviZECGkjKvn2/EUY6bTlPeXpnXdF+P4npNjHM=; b=HKMl6e93QqTH6IRcJVZVQ+HBA4bglCdTi6j7cWSKXNcZ8YowN9HUdCggHBTYrX/VsHgJYE UrA6lml2CcOy2tmBrDSkUY0VcJdNfjedsxgzcL95LRGLI398McI2opoOOBGKE21EzDo0PR VWrUw1J6UlPYZl2GSLeUv3EYY5Bl2l7LUZqHC2i/+hmZaG2pRRcuhvwrRpofKfMnW3ChnK MdS3FWFST8ybvTpaCEciBorT0OMGMK1S0sQDWKtoilE6r45KchYXk1ffAzoPwvHwZAo1MS 9C1rAnyi1Opd/XuksPK8F5K50jrku1yiXNVzHP3BDR52Kdv0TLUDG789Db5kHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679649210; a=rsa-sha256; cv=none; b=k3oNc22Bf2mvQxg7RcM/Qp7wSqrNEifXqU4/knQjwgP0E/SsE2GnD58eVscTBkyi+JE6xh iIlxN8Hi2RohbBaKBlq702F3YS7u7jAHjKfmeV8ov1b+xp4e/OJJp6bm3GbMftF6+VbGCv jJ/UWb7F9oZmgocjh3wVeZzGBSzqF8YPMHe8rmfYtXzfRVqPoca206PxAgLt76kWrTSjDT h4o53eSdRwP98UxbxAINu5PKcxMp2gYOddyFMEJtp2Ww/gP+vrdqbRZpRg18v3MRZcExg3 hIjGj7uHnSGz9Sq/QOxpP9dO53nE6g1TW4qMCH7yC3F/j+m/YWxBBZz99E1Bmg== Received: from ns2.wilbury.net (ns2.wilbury.net [IPv6:2a01:b200:0:1:f816:3eff:fecd:13e6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "svc.wilbury.net", Issuer "R3" (verified OK)) (Authenticated sender: otis) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Pjc2L2TZfzy9w; Fri, 24 Mar 2023 09:13:30 +0000 (UTC) (envelope-from otis@FreeBSD.org) Received: from smtpclient.apple (unknown [217.73.28.193]) (Authenticated sender: juraj@lutter.sk) by svc.wilbury.net (Postfix) with ESMTPSA id CBB8745CFA6; Fri, 24 Mar 2023 10:13:25 +0100 (CET) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3696.120.41.1.2\)) Subject: Re: byteswap.h not found on 12 and 13 From: Juraj Lutter In-Reply-To: Date: Fri, 24 Mar 2023 10:13:24 +0100 Cc: Yuri , Nuno Teixeira , FreeBSD CURRENT , FreeBSD Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> References: To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.2) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on ns2.wilbury.net X-ThisMailContainsUnwantedMimeParts: N > On 24 Mar 2023, at 10:09, Warner Losh wrote: >=20 > one last reply, if this is for a port, then byteswap.h can usually be = implemented as >=20 > #include > #define __bswap_16(x) __bswap16(x) > #define __bswap_32(x) __bswap32(x) > #define __bswap_64(x) __bswap64(x) >=20 > #define bswap_16(x) __bswap16(x) > #define bswap_32(x) __bswap32(x) > #define bswap_64(x) __bswap64(x) >=20 > in older versions of FreeBSD, but some tricky software will hate the = bswap16 (no underscore) etc defines. You could likely put that into the = port. In releng/13 there is also infiniband/byteswap.h that does: #include #include #define bswap_16 bswap16 #define bswap_32 bswap32 #define bswap_64 bswap64 otis =E2=80=94 Juraj Lutter otis@FreeBSD.org From nobody Fri Mar 24 09:22:50 2023 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 4PjcFB14Srz41Kbn for ; Fri, 24 Mar 2023 09:22:54 +0000 (UTC) (envelope-from paulf2718@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 4PjcF91nCxz3Nml for ; Fri, 24 Mar 2023 09:22:53 +0000 (UTC) (envelope-from paulf2718@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=Smcpxo8t; spf=pass (mx1.freebsd.org: domain of paulf2718@gmail.com designates 2a00:1450:4864:20::32f as permitted sender) smtp.mailfrom=paulf2718@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-wm1-x32f.google.com with SMTP id s13so690247wmr.4 for ; Fri, 24 Mar 2023 02:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679649772; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=+KeesYCPdjqyn27yWIBK4h3RhKvd9q1m4J+mtV5rsLw=; b=Smcpxo8tA9VYaBsphwTZgtNRKLVMh04V8DYIWQN0FXeXhxmAm+xVcKvUWOjjLdZUwI wS+h+2rPDy+4Aapss+ppZyfRUZDkcABrJdaDjCxj5DS+nqfdaIfVyBBNYPmU1x7sJQws LFK7oC2KHiMu1LjR7Vqe8X9dRluREYDmvWJxcNv1G3ZAX9aGN+V8gmlmZQgqzS9gdk6k L0DayO7qjX9wYKdk5MHXQMDuUl+usjDkD3kXtPctgIApCorTFwo98R2tTyslBencD+5q fv1c+UYIzUlaNwXKwCMGVCYVed/9m4fAcRXAgRqcOJYQDE/htMLHsC0JznvRdm/My24R T+IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679649772; h=content-transfer-encoding:in-reply-to:from:references:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+KeesYCPdjqyn27yWIBK4h3RhKvd9q1m4J+mtV5rsLw=; b=ZGp+wTX+CYsdEdru7x3A+j53N4xcH/9PXv4eb0Mxmz/8v5h2Y7rHE0AVQP5b13LyCG wAWkdp7mbPwfRKu2qrgXy3cxdP3E5LFmJfd3mlIxmoiIGaS41XIjvGYpVXd6sCSn9CHX CKbdETaWxlbD8zDo3/SOuu3c71G+CkuNTA8niQTMcbcjWk63jw1gir1IyzNZjK0UU45U 7JLBt9hg3paN3bB4xKOJh5pSMo9gk+A77uhsM9c28FNcYset7C4HENKuTS9al84cZItu qLWOcNYR99nMXXBxCbWfTsRWin+8KSrTNey7FU89WdlnlONqK8Uj1e9c7ewDMHLW29iv D2jA== X-Gm-Message-State: AO0yUKV/P7oLrA28t36e3J4A63eYRt/2t4Pr/Osqv72LLmYQp4bzvvAX xJuWmAc9Mk2KO4ZOHEj5QaqUErYUoLkSPw== X-Google-Smtp-Source: AK7set/WKNSb4uevFTl8tC93lYkk0w2O/R3G3pwQ0vH2/87lH46nw+X8sXXyUvXHuA3BJgJuyGmUpA== X-Received: by 2002:a7b:c850:0:b0:3ee:93c8:4a6f with SMTP id c16-20020a7bc850000000b003ee93c84a6fmr1779336wml.32.1679649771996; Fri, 24 Mar 2023 02:22:51 -0700 (PDT) Received: from [137.202.253.23] (nat-ies.mentorg.com. [192.94.31.2]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b003edc4788fa0sm4577990wmq.2.2023.03.24.02.22.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Mar 2023 02:22:51 -0700 (PDT) Message-ID: <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com> Date: Fri, 24 Mar 2023 10:22:50 +0100 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 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: byteswap.h not found on 12 and 13 To: freebsd-current@freebsd.org References: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> From: "Floyd, Paul" In-Reply-To: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.86 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.86)[-0.864]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32f:from]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org] X-Rspamd-Queue-Id: 4PjcF91nCxz3Nml X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N A modern and standard solution is std::byteswap. https://en.cppreference.com/w/cpp/numeric/byteswap According to this https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B23_library_features you will need llvm 14 for that. A+ Paul From nobody Fri Mar 24 09:34:57 2023 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 4PjcWK6gmQz41L2y for ; Fri, 24 Mar 2023 09:35:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (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 4PjcWK3qgMz3QQL for ; Fri, 24 Mar 2023 09:35:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x532.google.com with SMTP id eh3so5254095edb.11 for ; Fri, 24 Mar 2023 02:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679650508; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tkhucASE4pV5x/ixbG9QTIBVjRLkfuBNsbmNXlMoM+4=; b=G5S4YSqQ5gYhwVziMp/Tbnf09nlsDVoP7lT+csdLGewHlkTDEOmtrB3BvxOq5328hg JjnvxGjMjMjagqhCRtPcXJdM+dkIQU9/zGoVgiiohvDHCITl62uWcIAyGikTYw5JBC9Q jA2CQDkQXZdFegmAMiCbUEh2SttOJ+Yw+CB+4GacoRyxtihsb56lcntschKWp8yoOJFJ KgEz+tk/xc2T8Vv+5aHFC0UPnB6T8TG8umPN7xIALH/F9hJpWif0pMXpLIj0lg2To2jN iYNtXIar+Vtay7XsL5SvkvknVoppsrZ0hfx6rWFlv2WyAq5iibh8OFoZHnB0IAc3sN0o YXPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679650508; 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=tkhucASE4pV5x/ixbG9QTIBVjRLkfuBNsbmNXlMoM+4=; b=1Q2fqrDm3Er/8Kjki4Sr5I525WgNF68doGhQQSBAKKFyg9nLLKg/ROuHZmRyNBlFwN ch/cohvwgRqERzmHllKFlh2tkS6TUWmu/bvEb4XjwQhg0+LhLQzUZ3J+huw6dlQGCfU8 8ApaYQekRqLAO3c5+e34KG/GvGPfGRURqTRdhssLlhpEPO6976SqB/WNEnE1+UQg1fw0 kwbriTfezdG7hRN6HJEnsV2BijdJ/fjoE0fbZDhLxZNB8AF6INts73Kuea5mZ7jAW99B s12Jp294jeu0bWDEEkjgPUaGOc0UPTGyEgZU1pva8JBxEg/hgF6G9bmSMJ3EdLddiPvS H9mw== X-Gm-Message-State: AAQBX9cndYOfAPiYY8Eda2aFZTpGOue79qlvAlfsQjGS2vVgOe22U+T2 1d07pG1/AZmK20SEYWloJ3cuqSheffzYGX2WxJOjFA== X-Google-Smtp-Source: AKy350akp5a2atJXSTeZ+N2ElM4JUhrx8G6bOTEoHNZWI2l39BAO29aGdxtMiwETAnOHGrEq8VW0ViklsRF56dnAQXg= X-Received: by 2002:a17:906:9f0b:b0:8b1:38d6:9853 with SMTP id fy11-20020a1709069f0b00b008b138d69853mr990138ejc.2.1679650508106; Fri, 24 Mar 2023 02:35:08 -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: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> In-Reply-To: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> From: Warner Losh Date: Fri, 24 Mar 2023 03:34:57 -0600 Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Juraj Lutter Cc: Yuri , Nuno Teixeira , FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000e1ffa305f7a21b2c" X-Rspamd-Queue-Id: 4PjcWK3qgMz3QQL X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000e1ffa305f7a21b2c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 24, 2023 at 3:13=E2=80=AFAM Juraj Lutter wro= te: > > > > On 24 Mar 2023, at 10:09, Warner Losh wrote: > > > > one last reply, if this is for a port, then byteswap.h can usually be > implemented as > #include #if __FreeBSD_version < 1301500 > > #include > > #define __bswap_16(x) __bswap16(x) > > #define __bswap_32(x) __bswap32(x) > > #define __bswap_64(x) __bswap64(x) > > > > #define bswap_16(x) __bswap16(x) > > #define bswap_32(x) __bswap32(x) > > #define bswap_64(x) __bswap64(x) #else #include_next #endif might make it a complete file. > > > > in older versions of FreeBSD, but some tricky software will hate the > bswap16 (no underscore) etc defines. You could likely put that into the > port. > > In releng/13 there is also infiniband/byteswap.h that does: > > #include > #include > > #define bswap_16 bswap16 > #define bswap_32 bswap32 > #define bswap_64 bswap64 > That works too. The reason I suggested what I did is that it also lets you do #undef bswap16, etc if your software needs it. Warner --000000000000e1ffa305f7a21b2c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Mar 24, 2023 at 3:13=E2=80=AF= AM Juraj Lutter <otis@freebsd.org> wrote:

> On 24 Mar 2023, at 10:09, Warner Losh <
imp@bsdimp.com> wrote:
>
> one last reply, if this is for a port, then byteswap.h can usually be = implemented as

#include <sys/param.h= >
#if __FreeBSD_version < 1301500
=C2=A0
> #include <sys/endian.h>
> #define __bswap_16(x) __bswap16(x)
> #define __bswap_32(x) __bswap32(x)
> #define __bswap_64(x) __bswap64(x)
>
> #define bswap_16(x) __bswap16(x)
> #define bswap_32(x) __bswap32(x)
> #define bswap_64(x) __bswap64(x)
#else
#inc= lude_next <byteswap.h>
#endif

migh= t make it a complete file.
=C2=A0
>
> in older versions of FreeBSD, but some tricky software will hate the b= swap16 (no underscore) etc defines. You could likely put that into the port= .

In releng/13 there is also infiniband/byteswap.h that does:

#include <sys/types.h>
#include <sys/endian.h>

#define bswap_16=C2=A0 =C2=A0 =C2=A0 =C2=A0 bswap16
#define bswap_32=C2=A0 =C2=A0 =C2=A0 =C2=A0 bswap32
#define bswap_64=C2=A0 =C2=A0 =C2=A0 =C2=A0 bswap64
That works too. The reason I suggested what I did is that it a= lso lets you do #undef bswap16, etc if your software needs it.
Warner
--000000000000e1ffa305f7a21b2c-- From nobody Fri Mar 24 09:36:31 2023 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 4PjcY72pRMz41LWM; Fri, 24 Mar 2023 09:36:43 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PjcY71pGhz3hh1; Fri, 24 Mar 2023 09:36:43 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679650603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hbp3zeVbwa9sdFGDQ112UoSKJ3h4WypWNiapw8q+kyU=; b=ky170rrkUm7DCBs0naKcyuWRi5G8t1Fn5uzLQTxCGeTTJzWNXfjDMaNKqlbckzpsS4hXwD qSy5FHbPjj9sWEB/FYW7znVo7BCgLXpGsqs95e+s01DswQDOHjP3LKlWSK6Iac+GY8Icvt lPaZSiNxYkpXPr0iuSV+sq3xDvXMEAD9aMIeVafMvB6f8fadk0jJqr1IVQUOBQV0RI1fwx 4OR8xUSVE3oMsEF29/GlYiMVy7YetCYppXZzg93I3MnbYpdpHLFn/K9qd9yK4nE/ehrpGm GZWw437djF0q0NrQkYO+UjdbQdDq2gxHkaXSEKvyqPP+NY/IthXBoHlPl/fk8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679650603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hbp3zeVbwa9sdFGDQ112UoSKJ3h4WypWNiapw8q+kyU=; b=OuvIQIEBYMf4m2vh1u1HmgG4DpLKoGk9wnas7rcQvw+kXqO3KD3MUp7u7xxjJKZ7Xpa8Lx Zn2C6jGKmq40orP017qpqu+V6TGmrD9uvtkTtmsVECA7t4BMhTS/2ZbUAOGBP4mnt2OsJA d26L6/lLVQtdlkCu0h/D5NQ0lgtM+x5TpjeA9AU/kDEOR8bxINAST4WGjYaBDMZlsgLy2H MmQ3msahmIWP2yKD0nfsccY4oPO+E3lwAinTlzGZ9hN1xutoGBcP9xylN5t8l3puo9xrQz KOeA5iizaPKuF2LZ4h8AUYOuBHtPB6hq4vtt9wf7pxB1ZztUvaNAxblVIAKqog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679650603; a=rsa-sha256; cv=none; b=OoTRs00i7G4DWRbrZYJ6ZyVJc7YwBgVp+YvFrl64QL1XxRKWiZZv5vE71eHuJ15+s/JldS kPVOxLtfpJslelHmjRyC1OkPRM/rsCE2FxHIZ5OzMIQ+fdakq9Zlho/hoHJJycRIyTY5B1 ROzZ+mlgY+6uoRgoyLpAnQX2D/DYULtxivlyhJVWah0huCGSfwLjAqAM+c9gLVzp13MiSA ib97ONWX9ikXm3eS4UNuXeVQ05cThUDDqAHjWilkuGZLU2srEuvl1QNi9Fsy6NEu04Bq4q E46DNQSscXcYdCUMRamuXtsMsTuoVxQsduEIqHrbh81p2iFpThqA5hLgnoQ3Hw== Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4PjcY70llMzyQh; Fri, 24 Mar 2023 09:36:43 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-ua1-f44.google.com with SMTP id g9so973039uam.9; Fri, 24 Mar 2023 02:36:43 -0700 (PDT) X-Gm-Message-State: AAQBX9dUel0N2FBstw8Mh85Du7eRhnSIJkl0oXAX0UmbNlcoSQaQyAgq X2PBIJY5cttYReV3eV1eGuMln1SxVnfFjykBEbQ= X-Google-Smtp-Source: AKy350Z9YxvjknzFhBWC5a0c2MMW3wYN5fxY9vCV7zbqzW4GEIQNKmBTeRYejEsvg30jP/vVUZTOdt3Yu7BvJ9XkGrM= X-Received: by 2002:a1f:1d15:0:b0:435:56e:154e with SMTP id d21-20020a1f1d15000000b00435056e154emr1133230vkd.1.1679650602721; Fri, 24 Mar 2023 02:36:42 -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: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> In-Reply-To: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> From: Nuno Teixeira Date: Fri, 24 Mar 2023 09:36:31 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Juraj Lutter Cc: Warner Losh , Yuri , FreeBSD CURRENT , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="00000000000085a8cf05f7a22185" X-ThisMailContainsUnwantedMimeParts: N --00000000000085a8cf05f7a22185 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Juraj, --- --- src/sflowtool.c.orig 2023-03-24 09:29:58 UTC +++ src/sflowtool.c @@ -29,13 +29,18 @@ extern "C" { #include #include #include -#include +#include #include #include "sflow.h" /* sFlow v5 */ #include "sflow_v2v4.h" /* sFlow v2/4 */ #include "assert.h" #include "sflow_xdr.h" /* sFlow encode */ + +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 #define SPOOFSOURCE 1 #define YES 1 --- Compiles fine! Juraj Lutter escreveu no dia sexta, 24/03/2023 =C3=A0(s) 09:13: > > > > On 24 Mar 2023, at 10:09, Warner Losh wrote: > > > > one last reply, if this is for a port, then byteswap.h can usually be > implemented as > > > > #include > > #define __bswap_16(x) __bswap16(x) > > #define __bswap_32(x) __bswap32(x) > > #define __bswap_64(x) __bswap64(x) > > > > #define bswap_16(x) __bswap16(x) > > #define bswap_32(x) __bswap32(x) > > #define bswap_64(x) __bswap64(x) > > > > in older versions of FreeBSD, but some tricky software will hate the > bswap16 (no underscore) etc defines. You could likely put that into the > port. > > In releng/13 there is also infiniband/byteswap.h that does: > > #include > #include > > #define bswap_16 bswap16 > #define bswap_32 bswap32 > #define bswap_64 bswap64 > > otis > > =E2=80=94 > Juraj Lutter > otis@FreeBSD.org > > --=20 Nuno Teixeira FreeBSD Committer (ports) --00000000000085a8cf05f7a22185 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Juraj,

---
--- src/sflowtool.c.orig =C2=A0 =C2=A0 =C2=A0 =C2=A02023-03-24 09:29:58 = UTC
+++ src/sflowtool.c
@@ -29,13 +29,18 @@ extern "C" {=C2=A0#include <inttypes.h>
=C2=A0#include <arpa/inet.h>=C2=A0#include <netdb.h>
-#include <byteswap.h>
+#includ= e <sys/endian.h>
=C2=A0#include <getopt.h>

=C2=A0#inc= lude "sflow.h" /* sFlow v5 */
=C2=A0#include "sflow_v2v4.= h" /* sFlow v2/4 */
=C2=A0#include "assert.h"
=C2=A0#i= nclude "sflow_xdr.h" /* sFlow encode */
+
+#define bswap_16= bswap16
+#define bswap_32 bswap32
+#define bswap_64 bswap64

= =C2=A0#define SPOOFSOURCE 1
=C2=A0#define YES 1
---
=
Compiles fine!

Juraj Lutter <otis@freebsd.org> escreveu no dia sexta, 24/03/2023= =C3=A0(s) 09:13:
imp@bsdimp.com> wrote:
>
> one last reply, if this is for a port, then byteswap.h can usually be = implemented as
>
> #include <sys/endian.h>
> #define __bswap_16(x) __bswap16(x)
> #define __bswap_32(x) __bswap32(x)
> #define __bswap_64(x) __bswap64(x)
>
> #define bswap_16(x) __bswap16(x)
> #define bswap_32(x) __bswap32(x)
> #define bswap_64(x) __bswap64(x)
>
> in older versions of FreeBSD, but some tricky software will hate the b= swap16 (no underscore) etc defines. You could likely put that into the port= .

In releng/13 there is also infiniband/byteswap.h that does:

#include <sys/types.h>
#include <sys/endian.h>

#define bswap_16=C2=A0 =C2=A0 =C2=A0 =C2=A0 bswap16
#define bswap_32=C2=A0 =C2=A0 =C2=A0 =C2=A0 bswap32
#define bswap_64=C2=A0 =C2=A0 =C2=A0 =C2=A0 bswap64

otis

=E2=80=94
Juraj Lutter
otis@FreeBSD.org



--
Nuno Teixeira
FreeBSD Committ= er (ports)
--00000000000085a8cf05f7a22185-- From nobody Fri Mar 24 09:36:50 2023 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 4PjcYV2VL5z41LWV for ; Fri, 24 Mar 2023 09:37:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 4PjcYV237fz3k18 for ; Fri, 24 Mar 2023 09:37:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id ek18so5382223edb.6 for ; Fri, 24 Mar 2023 02:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; t=1679650621; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8xdELVLFr2/sDQe3WqIhsfgCK5AK7vP6ZJTXAlbSvIw=; b=qcBDrzUmaN+z2Sy/okx3ULbNq0fFDod+bGBQLJogeCNcFuM6kEJ3Yz4f4TilCFWM2x IbfV+N4vVqCr7SUtiKukreZADNiEIjNtqobSJK+uoUFzD44Q80WUW3MKv+KcLfIadAe5 zjV4wdzMmqiKLi8cII3KBxNttA17xPIzv6iaRzvcjPWHo/RHHyEKKscbENq9R8w6ckBd 8DpBxxTzBjb2Qb3v5PHV9Fwq01xUXAl/z+ZcoK6n+99cy8hhCy1G5wbHW8nSowFPmM50 q5WMmwhkZ1q/OirHb6vyGmv1nk1W9F71cWVZ5JNLmSEolK8wvFC3lpibEcFBt/ZI7i3d LJOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679650621; 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=8xdELVLFr2/sDQe3WqIhsfgCK5AK7vP6ZJTXAlbSvIw=; b=N1ejFZPMu6cAmfvIM86LcHTjr84zBhoZHeeVFgnh8VDr6VbbYUgAk06y+/vfc838z1 VOyf101T/9CZ6CQnfu8PmgkErGVJUJVuZm0JypAZfnha75H7i356uTjvOevK+wOxgn2S sMu/TCQirCrFs3l+CIQN64Tw06OjS3yFCyBkF4zhSagXyohm//Labhqr++0WHGfG/gsq 0WjaLYoIZQFXuM9BsAEt5kokl6LFSWrhxK7nU68s9BS40LcqyJiWOKXGolW5KPgIYMqi tY7X8grPDN6bLPJWx/Gi1pBcTj9gdNxaINrJ0HT/HXnbmCNlsBEXofK8umBpi+cccOD2 pNmw== X-Gm-Message-State: AAQBX9flPqNhJKQKvC6LqSzRzPn/ccZKSd+mqGIXyl/E8HtkO/AOQMlf 7J0wqn07VlFdGUs/Cm2w8BcZCKvm3/8NuoeHsi76Gg== X-Google-Smtp-Source: AKy350awv6LypTZhbgnfW8+Ww3gYKXyyIGwIPWsn6n6un/T4lpROgf3EJiw67d5MGew8xedbdSbmVSyN5cwKRRm5yfw= X-Received: by 2002:a50:bac7:0:b0:4ad:6052:ee90 with SMTP id x65-20020a50bac7000000b004ad6052ee90mr1124769ede.7.1679650620950; Fri, 24 Mar 2023 02:37:00 -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: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com> In-Reply-To: <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com> From: Warner Losh Date: Fri, 24 Mar 2023 03:36:50 -0600 Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: "Floyd, Paul" Cc: freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="0000000000009bdbc205f7a22221" X-Rspamd-Queue-Id: 4PjcYV237fz3k18 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000009bdbc205f7a22221 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 24, 2023 at 3:23=E2=80=AFAM Floyd, Paul w= rote: > > A modern and standard solution is std::byteswap. > > https://en.cppreference.com/w/cpp/numeric/byteswap > > According to this > > https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B23_library_feat= ures > > you will need llvm 14 for that. > Which doesn't help OP since they needed 12 and 13 support for existing software. Also, that's C++ only, which I don't think helps either. I'm glad to see some articulated standards here because when I did endian.h and byteswap.h, it was a minefield of what can or can't be defined in the face of existing use. Warner > A+ > > Paul > > > > > --0000000000009bdbc205f7a22221 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Mar 24, 2023 at 3:23=E2=80=AF= AM Floyd, Paul <paulf2718@gmail.c= om> wrote:
https://en.cppreference.com/w/cpp/numeric/byteswap=

According to this
https://en.cppreference= .com/w/cpp/compiler_support#C.2B.2B23_library_features

you will need llvm 14 for that.

Which d= oesn't help OP since they needed 12 and 13 support for existing softwar= e.
Also, that's C++ only, which I don't think helps eithe= r.

I'm glad to see some articulated standards = here because when I did endian.h
and byteswap.h, it was a minefie= ld of what can or can't be defined in the face
of existing us= e.

Warner
=C2=A0
A+

Paul




--0000000000009bdbc205f7a22221-- From nobody Fri Mar 24 11:15:54 2023 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 4Pjfln4l46z41RRq for ; Fri, 24 Mar 2023 11:16:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pjfln45ctz3rlV for ; Fri, 24 Mar 2023 11:16:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679656565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kCsU2CYmpyk3VJnhSm8q93vmW0woSJGudM8Y8kNCIuU=; b=YOIag/5VL+tWr/FlZP29nPoF1aFkt7Kw5XylPHqMWX9n/n73M57JNph1klIF4TXQIGDLWN 0GauZLWXKZULhnu1FExMwYRCFxXeibV7g3R8pNHUcqJDvm9Kyg5GcGhrK1kSfDs7XH2gzr E3bwwgefatGQtcaxKnH8hkwn1jWq+Cw1eCSSKEXy8qUf0RkLbbE3gPiumfX2s+KOPLwiEe 6cpisky9NghZf6BxVlLhew/3MHAjKnLs4dxiGlIbFJEAVaPYTeaxgarVy81BS++X/wRItb Kuw9uztuYVXPoBzINrValD7hLAAZrt5xtb3vV47DIdUc6yepmIXjEKenZz50+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679656565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kCsU2CYmpyk3VJnhSm8q93vmW0woSJGudM8Y8kNCIuU=; b=KZboZ7tkkzk6Yf2XMJMqL9jtoSqCdAAL+qrQK/hGTV/e8K6EKmo10JjbwA/QztR8kh3FZF dPJz4LXmKRd8ggyUriu54dESN5KMk3yOsl1Hyio1hlAUrt101V6ocDYt/7HxgPBJP7EloI sRRezTPCXfacJilC7nWciL8PEiGEB8o8pfQQpE1vbwnwzffobPwOoCPy00RxgTMZd8H+Fw IYBDrwzVtet0+IWMLbFB+J7BYOgUtKKlb7ZQPcTJ/V+2QmqvAcDuySi6cEy2n0QDFuwBuB t+23/NTUgYwY2TASRYtlMkTB55UMJi9SsvntVf5HQjXNCLSgXR9D/VHdLyP7Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679656565; a=rsa-sha256; cv=none; b=cyGE1eqDtoldmqpPRGcllwksllS3wMVgVkBqH5u3PAhUR0aCjZACtnerNGmX+9wRficTwt AwstzLUNxIzOmFCTZgmegAes/DByr03ehymPmcm+s8WpGXGLLFWYEG4qo3sJmAv8zICd3p BK2JhTDpjT1ZmbHNIkrsTcy13ztPjkcuwuS4OQ9EixHG51yalCKLY3ybB0rj3Pgm/endUP r9OyTlu6Kwk4azfpr3RmBUEvPFSR2j1t9FTIIXyxM1lIjzVdF/PFJtz57MkIppv7H5rvM7 LdagWyxqiGrbZE4Tsv/Kyv+SqhGU7i/B3VDlM0PNnSbHj8JzHAsvA9IvyDfbug== Received: from mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Pjfln335yz10Yp for ; Fri, 24 Mar 2023 11:16:05 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-ua1-f53.google.com with SMTP id n17so1130053uaj.10 for ; Fri, 24 Mar 2023 04:16:05 -0700 (PDT) X-Gm-Message-State: AAQBX9csQPcAGr4Stenq0+Vt32jT+496Ybkw8ajtCd6aeIXt15u6h5Lb 8lFK4KUoKN72NCcshM92qq5xdxnl57YkD3i6XMs= X-Google-Smtp-Source: AKy350a2kj4FyNcANbkK2zag3UrDmL8AkOcEyZTOOhXAh9JdcN8Ts6bjAUsvTF03f0yhO5MAL2IgfsVFAZmSlIQPjho= X-Received: by 2002:ab0:6ecb:0:b0:68b:9eed:1c7d with SMTP id c11-20020ab06ecb000000b0068b9eed1c7dmr1794232uav.0.1679656565044; Fri, 24 Mar 2023 04:16:05 -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: <13BBF767-6CBB-41D5-AD93-6ADD9C417811@FreeBSD.org> <1aa553c9-79b9-30a0-e4ca-95b1057f1d80@gmail.com> In-Reply-To: From: Nuno Teixeira Date: Fri, 24 Mar 2023 11:15:54 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: byteswap.h not found on 12 and 13 To: Warner Losh Cc: "Floyd, Paul" , freebsd-current@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e77c0605f7a384c9" X-ThisMailContainsUnwantedMimeParts: N --000000000000e77c0605f7a384c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm thinking in the best plan to patch port. What about patch it for OSVERSION < 14 that will fix 12 and 13 and when 13.2 is out patching it only for 12. Any thoughts? Warner Losh escreveu no dia sexta, 24/03/2023 =C3=A0(s) 09= :37: > > > On Fri, Mar 24, 2023 at 3:23=E2=80=AFAM Floyd, Paul = wrote: > >> >> A modern and standard solution is std::byteswap. >> >> https://en.cppreference.com/w/cpp/numeric/byteswap >> >> According to this >> >> https://en.cppreference.com/w/cpp/compiler_support#C.2B.2B23_library_fea= tures >> >> you will need llvm 14 for that. >> > > Which doesn't help OP since they needed 12 and 13 support for existing > software. > Also, that's C++ only, which I don't think helps either. > > I'm glad to see some articulated standards here because when I did endian= .h > and byteswap.h, it was a minefield of what can or can't be defined in the > face > of existing use. > > Warner > > >> A+ >> >> Paul >> >> >> >> >> --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000e77c0605f7a384c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm thinking in the best plan to patch port.
What about patch it for OSVERSION < 14 that will fix 12 and 13 and= when 13.2 is out patching it only for 12.

Any tho= ughts?

Warner Losh <imp@bsdim= p.com> escreveu no dia sexta, 24/03/2023 =C3=A0(s) 09:37:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">


On Fri, Mar 24, 2023 at 3:23=E2=80=AFAM Floyd, Paul <paulf2718@gmail.com&= gt; wrote:

A modern and standard solution is std::byteswap.

https://en.cppreference.com/w/cpp/numeric/byteswap=

According to this
https://en.cppreference= .com/w/cpp/compiler_support#C.2B.2B23_library_features

you will need llvm 14 for that.

Which d= oesn't help OP since they needed 12 and 13 support for existing softwar= e.
Also, that's C++ only, which I don't think helps eithe= r.

I'm glad to see some articulated standards = here because when I did endian.h
and byteswap.h, it was a minefie= ld of what can or can't be defined in the face
of existing us= e.

Warner
=C2=A0
A+

Paul






--
Nuno Teixeira
FreeBSD Committ= er (ports)
--000000000000e77c0605f7a384c9-- From nobody Sat Mar 25 21:55:14 2023 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 4PkXtz5Js5z41mDW for ; Sat, 25 Mar 2023 21:55:23 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:123::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4PkXtx73dzz41NJ for ; Sat, 25 Mar 2023 21:55:21 +0000 (UTC) (envelope-from jamie@catflap.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jamie@catflap.org designates 2001:19f0:300:2185:123::1 as permitted sender) smtp.mailfrom=jamie@catflap.org; dmarc=pass (policy=none) header.from=catflap.org X-Catflap-Envelope-From: X-Catflap-Envelope-To: Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 32PLtEd2072350 for ; Sat, 25 Mar 2023 21:55:14 GMT (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 32PLtEPF072349 for freebsd-current@freebsd.org; Sat, 25 Mar 2023 21:55:14 GMT (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202303252155.32PLtEPF072349@donotpassgo.dyslexicfish.net> Date: Sat, 25 Mar 2023 21:55:14 +0000 Organization: Dyslexic Fish To: freebsd-current@freebsd.org Subject: diff(1) goes into cpu-hogging endless loop User-Agent: Heirloom mailx 12.4 7/29/08 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Sat, 25 Mar 2023 21:55:14 +0000 (GMT) X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[catflap.org,none]; R_SPF_ALLOW(-0.20)[+mx:dyslexicfish.net]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; ARC_NA(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[jamie]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; ASN(0.00)[asn:20473, ipnet:2001:19f0::/38, country:US] X-Rspamd-Queue-Id: 4PkXtx73dzz41NJ X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hi, A "diff" of 2 files: 1 77,933,904 bytes 2 63,013,818 bytes , goes into an endless loop, whilst "gdiff" completes the operation in about 5 seconds. I tested using the latest "diff" from current, and get the same result. Splitting both files into 10Mb chunks, and diffing these was successful. A ktrace of the "diff" actually stops producing any output after about 5 seconds, whilst the cpu looping continues. Any ideas on what to do next? Does anyone else get the same result? The files are just utf-8 freebsd git logs, and are available here if anyone would like to test: http://www.catflap.org/jamie/1.xz (13,282,864 bytes) http://www.catflap.org/jamie/2.xz (12,221,164 bytes) Cheers, Jamie From nobody Sat Mar 25 22:05:13 2023 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 4PkY6L5gtTz41mrX for ; Sat, 25 Mar 2023 22:05:14 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:123::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4PkY6L5GW8z435x for ; Sat, 25 Mar 2023 22:05:14 +0000 (UTC) (envelope-from jamie@catflap.org) Authentication-Results: mx1.freebsd.org; none X-Catflap-Envelope-From: Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 32PM5DCX073710; Sat, 25 Mar 2023 22:05:14 GMT (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 32PM5DoW073709; Sat, 25 Mar 2023 22:05:13 GMT (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202303252205.32PM5DoW073709@donotpassgo.dyslexicfish.net> Date: Sat, 25 Mar 2023 22:05:13 +0000 Organization: Dyslexic Fish To: jamie@catflap.org, freebsd-current@FreeBSD.org Subject: Re: diff(1) goes into cpu-hogging endless loop References: <202303252155.32PLtEPF072349@donotpassgo.dyslexicfish.net> In-Reply-To: <202303252155.32PLtEPF072349@donotpassgo.dyslexicfish.net> User-Agent: Heirloom mailx 12.4 7/29/08 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Sat, 25 Mar 2023 22:05:14 +0000 (GMT) X-Rspamd-Queue-Id: 4PkY6L5GW8z435x X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0::/38, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Just to add, that whilst the "diff" succeeded with the files split into 10Mb chunks, the time taken to run was really high, up to 10 times longer than gnu diff: + /usr/bin/time diff 1.aa 2.aa 16.74 real 16.70 user 0.03 sys + /usr/bin/time diff 1.ab 2.ab 16.53 real 16.45 user 0.07 sys + /usr/bin/time diff 1.ac 2.ac 21.58 real 21.51 user 0.06 sys + /usr/bin/time diff 1.ad 2.ad 22.37 real 22.25 user 0.11 sys + /usr/bin/time diff 1.ae 2.ae 25.93 real 25.81 user 0.11 sys + /usr/bin/time diff 1.af 2.af 26.63 real 26.53 user 0.09 sys + /usr/bin/time diff 1.ag 2.ag 0.98 real 0.96 user 0.02 sys + /usr/bin/time gdiff 1.aa 2.aa 2.44 real 2.37 user 0.06 sys + /usr/bin/time gdiff 1.ab 2.ab 4.09 real 4.06 user 0.03 sys + /usr/bin/time gdiff 1.ac 2.ac 2.24 real 2.22 user 0.01 sys + /usr/bin/time gdiff 1.ad 2.ad 1.99 real 1.98 user 0.00 sys + /usr/bin/time gdiff 1.ae 2.ae 2.63 real 2.60 user 0.02 sys + /usr/bin/time gdiff 1.af 2.af 2.62 real 2.59 user 0.03 sys + /usr/bin/time gdiff 1.ag 2.ag 0.12 real 0.11 user 0.00 sys From nobody Sat Mar 25 22:29:47 2023 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 4PkYfn1WTyz41pBZ for ; Sat, 25 Mar 2023 22:29:53 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PkYfm6lGxz472g for ; Sat, 25 Mar 2023 22:29:52 +0000 (UTC) (envelope-from thj@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 35A2F5C00C0; Sat, 25 Mar 2023 18:29:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 25 Mar 2023 18:29:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1679783392; x=1679869792; bh=kHMCn/a8AdopF RUQBc4hn98ZrhBaPjuaWXMY0MOjmwE=; b=MAqsssM7laFso3DhzZMlJyXqThuBx CGK91XTQTrPDaN/rUDATPhNw1Q3NzAzlczmg5vTQkrHFYX7zZNIEDrk9ZqgO/wVF 4o7oPjAUvZrK0rtNkEBS3dgo1JSCxCYp1twjYt8njk0FK4MMz1DwqLyqESxRxkDf Xz3RBTldOexyCAc5miHdI2CfvA0IPX71JKTWublGF9WRFSgKfctmdtd7gWIP868c NILD6fYDphbos7+KTIBi2uZo/bM3aVCY1B3RHEY8JgQqIYVZjFVbIiDwfsWbJ860 4hrYEpSqSJ3DKB8iVvENdBSl4FmwVJM3A54RisiKNpTlmh7DOQaDhx6Eg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegkedgudeihecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefvohhm ucflohhnvghsuceothhhjhesfhhrvggvsghsugdrohhrgheqnecuggftrfgrthhtvghrnh eptdegueevjeeitddvtdefjeeiteelieeufeelfffhkeettedugeeiheevieegudeunecu ffhomhgrihhnpegtrghtfhhlrghprdhorhhgpdhfrhgvvggsshgurdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhjhesfhhrvggv sghsugdrohhrgh X-ME-Proxy: Feedback-ID: ib75146ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 25 Mar 2023 18:29:51 -0400 (EDT) Date: Sat, 25 Mar 2023 22:29:47 +0000 From: Tom Jones To: Jamie Landeg-Jones Cc: freebsd-current@freebsd.org Subject: Re: diff(1) goes into cpu-hogging endless loop Message-ID: References: <202303252155.32PLtEPF072349@donotpassgo.dyslexicfish.net> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202303252155.32PLtEPF072349@donotpassgo.dyslexicfish.net> X-Rspamd-Queue-Id: 4PkYfm6lGxz472g X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Mar 25, 2023 at 09:55:14PM +0000, Jamie Landeg-Jones wrote: > Hi, A "diff" of 2 files: > > 1 77,933,904 bytes > 2 63,013,818 bytes > > , goes into an endless loop, whilst "gdiff" completes the operation in > about 5 seconds. > > I tested using the latest "diff" from current, and get the same result. > > Splitting both files into 10Mb chunks, and diffing these was successful. > > A ktrace of the "diff" actually stops producing any output after about > 5 seconds, whilst the cpu looping continues. > > Any ideas on what to do next? Does anyone else get the same result? > > The files are just utf-8 freebsd git logs, and are available here if > anyone would like to test: > > http://www.catflap.org/jamie/1.xz (13,282,864 bytes) > http://www.catflap.org/jamie/2.xz (12,221,164 bytes) > > Cheers, Jamie My guess is that you are hitting a worst case in the stone algorithm. I have a WIP review to integrate the Myers algorithm from libdiff here: https://reviews.freebsd.org/D36860 - Tom