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