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--