From nobody Fri Mar 08 09:34:24 2024 X-Original-To: freebsd-ports@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 4Trgx90RmVz5Cm5K for ; Fri, 8 Mar 2024 09:34:37 +0000 (UTC) (envelope-from oliver.epper@gmail.com) Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (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 4Trgx83MSyz42WL; Fri, 8 Mar 2024 09:34:36 +0000 (UTC) (envelope-from oliver.epper@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZZmZWUcg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of oliver.epper@gmail.com designates 2607:f8b0:4864:20::333 as permitted sender) smtp.mailfrom=oliver.epper@gmail.com Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-6e4eb1ec4e9so377819a34.3; Fri, 08 Mar 2024 01:34:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709890475; x=1710495275; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Yt+KndSCJPk2esedaiVMCM+x2lVmM2Gn/cdj8Q6S8fA=; b=ZZmZWUcgaFcyFjZ4bS+qnDoHnZp5pvSWKMQQQrqsFTCkAAE5aysP4AeiV8m0XFga+7 ThtgjC5NvsFYl6eXHD/LygpFD+Wb/gTkpNhIkKgrPqImEG0N3r3ELSt4TgGUG24937fW Res2039Ta3lS9QBxLUP+B4m0f88RVCWuXFpDRqPLzjOE62AIlQStDgNZpVkNz65GwFUz 4c/s6nqNzGS3tW7zGd818MrNoHvMKNPVDbZzVH5onTU1oSNIUggglysjG5heUln6jSFe fvPlSa97VrWlHaFjP870gYArQx1/bmiVh7oP4iPVq/jMy5gMbgDV/bNb3IjrpRAbj9+y 8OCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709890475; x=1710495275; 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=Yt+KndSCJPk2esedaiVMCM+x2lVmM2Gn/cdj8Q6S8fA=; b=fIQHGeTfrnVxQGc/s93/uy1XwQ640WVpk9OImdVaZB+5RwH6W5JZSR1+eyaaRR8keB b9R9r9UMTZ9sUcYB7QIbZJAmbsy+HF+3ED17MfAXbDWLKhb5bZcnvV/Y9HqVpwzzhxja d4uwrJfEes4UyrGomracGr1ihIXHwwMOmQhZy3ll4ULBn3ejf6QPiLs+dw8QiXAf4N1y INp71nljU/mY/YqVbGkA5xHPHkdtCsEOq2rCP//JuaTaLA03JbbqdFoUIBt7SjE9nVYK p91CztoRmM1QRoXKCRKLqcRy9pC5/3RgEUhox1GdEZKKDzSAw1QGbdWy4+9h7Hm8YB1J jYJg== X-Forwarded-Encrypted: i=1; AJvYcCVZVlPMPMz/zEzmfVQonqhW2OY4DvpVpR0W/hEX/LAsyfIfzu36PjoHYUMFitW3sxKBE75O2fdPJ6ndF+gdJOw= X-Gm-Message-State: AOJu0YwkY7E/m9hklCxLLcrye/Trr60BIW8JVcI4/hxOXIlXo+kefCvP 20iWKZxjzht+zq4CiSa56C6c++DMIELFFvzDUCYHUVjAlnmcJImidmf95t2rA/a2Q+6N8xFBzKq B6lou7s1pX7HGM23D2C3OvOM+wfg= X-Google-Smtp-Source: AGHT+IFoAH3V7clcvzfgE0q4MDLfs7VQ7tvpFtrTN3AcQ30Yf9glKzUU7MfxcVVD1oQWwA0j9/fvBXZ0Cdd7Qp3xjNE= X-Received: by 2002:a05:6830:205a:b0:6e4:dd99:86b5 with SMTP id f26-20020a056830205a00b006e4dd9986b5mr10716607otp.27.1709890475363; Fri, 08 Mar 2024 01:34:35 -0800 (PST) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Oliver Epper Date: Fri, 8 Mar 2024 10:34:24 +0100 Message-ID: Subject: Re: compiling for other architecture [armv6 targeting specifically] To: Mark Millard Cc: FreeBSD Mailing List , mat@freebsd.org Content-Type: multipart/alternative; boundary="000000000000639491061322e6de" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.985]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[yahoo.com]; ARC_NA(0.00)[]; TAGGED_FROM(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::333:from]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MISSING_XM_UA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4Trgx83MSyz42WL --000000000000639491061322e6de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable For reference: I've just installed FreeBSD-14.0-RELEASE for aarch64 under Apples Hypervisor on a M1 MacBook Pro and setup poudriere. Now things seem to build just fine and naturally much much faster than under qemu emulation. This seems feasible. Build times effectively halved even compared to my native amd64 build. (granted that was on a slightly older i7). greetings Oliver Am Fr., 8. M=C3=A4rz 2024 um 09:25 Uhr schrieb Oliver Epper < oliver.epper@gmail.com>: > Hey Mark, > > Thanks for that information. I messed up the target architecture. I was > trying to build for 64 bit arm, anyways (just a typo). I've tried poudrie= re > with qemu-user-static but there are a lot of errors, indeed. Only a few > packages build just fine. > > Since I am fairly new to FreeBSD I was under the impression that it would > support aarch64 as a platform. I guess it does, but this does not include > the ports collection. > > No problem. Since I was targeting the Pi as a device for a few simple > things I might be able to build what I need without using the ports > collection. > > Are there any plans (or a working group) trying to improve the situation > of the ports collection for other platforms? Doing real native > cross-compiling and slowly working things out that outright fail even und= er > emulation? > > Am Di., 5. M=C3=A4rz 2024 um 18:43 Uhr schrieb Mark Millard >: > >> Mathieu Arnold wrote on >> Date: Tue, 05 Mar 2024 15:37:08 UTC : >> >> > I don't think you need to do much of the things you are saying, cross >> > building can't really work because most ports will compile something a= nd >> > then try to run it, which won't work because an armv6 binary won't run >> > on a x86_64 machine. >> > >> > What works on the other hand is using poudriere and qemu-user-static. >> > >> > you install both, and if you want to build packages for armv6, you jus= t >> > create a jail with the arch as "arm.armv6", and then simply run >> > poudriere bulk with the arm jail. It will build everything in a jail, >> > and you'll get arm packages in the end. >> >> Back when FreeBSD ran official port -> package building was >> targeting armv6 it worked this way. But there were major problems. >> >> The last armv6 attempt was on Thu, 05 Oct 2023 02:37:41 GMT. It >> queued 34637 packages (so a from-scratch build attempt). It built >> 8276. 242 failed. 25763 were skipped because of the failures. 356 >> were ignored up front. The overall ending status was >> "stopped:crashed:". This was a 132releng-armv6 quarterly build. >> >> The prior from-scratch "stopped:done:" build was on >> Sat, 05 Aug 2023 04:40:30 GMT. Queued 34382. Built 26346. Failed >> 407. Skipped 6844. Ignored 721. Again a 132releng-armv6 quarterly >> build. (Unusually successful for fairly modern times.) >> >> The most recent from-scratch main-armv6 build (non-quarterly) >> goes back to Sun, 11 Dec 2022 03:52:32 GMT. It had a >> large incremental build on Thu, 12 Jan 2023 03:51:11 GMT, >> which is the last of the "stopped:done" builds for main-armv6. >> >> From my own on-time involvement and and general observation >> of the official package build attempts for 32 bit architectures >> on 64-bit hosts is that has rarely gone well overall. >> >> > On Sun, Mar 03, 2024 at 01:53:31PM +0100, Oliver Epper wrote: >> > > Hi all, >> > > >> > > I am currently working on an updated port of net/pjsip. I have a >> personal >> > > use case building for the raspberry-pi, too. All the information tha= t >> I >> > > found so far seemed outdated. Many are talking about building a >> > > cross-compiler. With clang that should not be necessary, right? >> > > >> > > Can anyone point me to more recent information on how I can build fo= r >> armv6 >> > > on a x86_64 machine? >> > > >> > > greetings >> > > Oliver >> > > >> > > P.S.: I know how to build for different architectures. My questions >> are all >> > > about the "dos and don'ts" and best practices when it comes to the >> FreeBSDs >> > > ports system. >> >> =3D=3D=3D >> Mark Millard >> marklmi at yahoo.com >> >> --000000000000639491061322e6de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
For reference: I've just installed FreeBSD-14.0-RELEAS= E for aarch64 under Apples Hypervisor on a M1 MacBook Pro and setup=C2=A0po= udriere. Now things seem to build just fine and naturally much much faster = than under qemu emulation. This seems feasible. Build times effectively=C2= =A0halved=C2=A0even compared to my native amd64 build. (granted that was on= a slightly older i7).

greetings
Oliver
<= /div>
A= m Fr., 8. M=C3=A4rz 2024 um 09:25=C2=A0Uhr schrieb Oliver Epper <oliver.epper@gmail.com>:
Hey Mark,

Thanks for = that information. I messed up the target architecture. I was trying to buil= d for 64 bit arm,=C2=A0anyways=C2=A0(just a typo). I've tried poudriere= with qemu-user-static but there are a lot of errors, indeed. Only a few pa= ckages build just fine.

Since I am fairly new to F= reeBSD I was under the impression that it would support aarch64 as a platfo= rm. I guess it does, but this does not include the ports collection.=C2=A0<= /div>

No problem. Since I was targeting the Pi as a devi= ce for a few simple things I might be able to build what I need without usi= ng the ports collection.

Are there any plans (or a= working group) trying to improve the situation of the ports collection for= other platforms? Doing real native cross-compiling and slowly working thin= gs out that outright fail even under emulation?

Am Di., 5. M=C3=A4rz= 2024 um 18:43=C2=A0Uhr schrieb Mark Millard <marklmi@yahoo.com>:
Mathieu Arnold <mat_at_freebsd.org> wrote on
Date: Tue, 05 Mar 2024 15:37:08 UTC :

> I don't think you need to do much of the things you are saying, cr= oss
> building can't really work because most ports will compile somethi= ng and
> then try to run it, which won't work because an armv6 binary won&#= 39;t run
> on a x86_64 machine.
>
> What works on the other hand is using poudriere and qemu-user-static.<= br> >
> you install both, and if you want to build packages for armv6, you jus= t
> create a jail with the arch as "arm.armv6", and then simply = run
> poudriere bulk with the arm jail. It will build everything in a jail,<= br> > and you'll get arm packages in the end.

Back when FreeBSD ran official port -> package building was
targeting armv6 it worked this way. But there were major problems.

The last armv6 attempt was on Thu, 05 Oct 2023 02:37:41 GMT. It
queued 34637 packages (so a from-scratch build attempt). It built
8276. 242 failed. 25763 were skipped because of the failures. 356
were ignored up front. The overall ending status was
"stopped:crashed:". This was a 132releng-armv6 quarterly build.
The prior from-scratch "stopped:done:" build was on
Sat, 05 Aug 2023 04:40:30 GMT. Queued 34382. Built 26346. Failed
407. Skipped 6844. Ignored 721. Again a 132releng-armv6 quarterly
build. (Unusually successful for fairly modern times.)

The most recent from-scratch main-armv6 build (non-quarterly)
goes back to Sun, 11 Dec 2022 03:52:32 GMT. It had a
large incremental build on Thu, 12 Jan 2023 03:51:11 GMT,
which is the last of the "stopped:done" builds for main-armv6.
From my own on-time involvement and and general observation
of the official package build attempts for 32 bit architectures
on 64-bit hosts is that has rarely gone well overall.

> On Sun, Mar 03, 2024 at 01:53:31PM +0100, Oliver Epper wrote:
> > Hi all,
> >
> > I am currently working on an updated port of net/pjsip. I have a = personal
> > use case building for the raspberry-pi, too. All the information = that I
> > found so far seemed outdated. Many are talking about building a > > cross-compiler. With clang that should not be necessary, right? > >
> > Can anyone point me to more recent information on how I can build= for armv6
> > on a x86_64 machine?
> >
> > greetings
> > Oliver
> >
> > P.S.: I know how to build for different architectures. My questio= ns are all
> > about the "dos and don'ts" and best practices when = it comes to the FreeBSDs
> > ports system.

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

--000000000000639491061322e6de--