From nobody Fri Mar 08 08:25:39 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 4TrfPs6xPMz5D8Y5 for ; Fri, 8 Mar 2024 08:25:53 +0000 (UTC) (envelope-from oliver.epper@gmail.com) Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 4TrfPq6Qcvz4t8H; Fri, 8 Mar 2024 08:25:51 +0000 (UTC) (envelope-from oliver.epper@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=V7zDDE97; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of oliver.epper@gmail.com designates 2607:f8b0:4864:20::32a as permitted sender) smtp.mailfrom=oliver.epper@gmail.com Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6e4e8be9c85so928341a34.3; Fri, 08 Mar 2024 00:25:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709886350; x=1710491150; 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=MNYg9lPcfoCJW8ot0SFjmdkHLQLsQ2lrbD8y/Ic1cgw=; b=V7zDDE97Qi7OOgI6v39mP4E+atgVLtd7S76ok3a/S9TNPrpMbzP181wMBOh0f+ldaG ScL68fJld0N9fewjm0HMBtzFNyk02n+CqSinnSsAQmrWusa2VrJ716cA2rELvA7KNhBO j+HGfnHGP/+JpbrBuJQGGC5R8Clbok+aKDr8hfO+/CKIt1h3fiC+BrmRsnGplJLUI6q7 jD9bi7kTRsE1m3eHR2oyyBNkG3lt/6ipPEi+mccTRkIfNBGyUNSAxCYWgFfOwvgtJAsC k/XO5hpJyDducdXKGYHjzv1ophgExK4A34Q9AZNk8jddDjLxhQjxrvZjFCRmvI46Ngn/ 6eUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709886350; x=1710491150; 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=MNYg9lPcfoCJW8ot0SFjmdkHLQLsQ2lrbD8y/Ic1cgw=; b=uD2z6jzEocxtstpEmduP2H1ef95LiKn5Wzmm6BN5d/8UBSJCTxWoz02bSkpyqbRA5E bstE20e22qA3hpyZxbuWqq4cp3973OGPcSw59laLibZ+a+PF4gBpWyHPAG4FJssGZc9V QoL8BqgEOKCo9163GlsriESCoMbmx93uEzD4olWISbyVa/sq+rT0oJWy2IFh95fwIri0 M4IdWFKsyoeLFYAdneVR3jsMmn4NhlRxSeTRf160PGnyeRDUAK/VjArdYwxX0+AaAES0 GRNhMGG1HYn2XHXpteUMKD4r3dLsMzQUYfaYpnfyLTW3beRd04ct2wWoPcaB3mx5CcHS ctqg== X-Forwarded-Encrypted: i=1; AJvYcCVOra59bxsErD8U9/drmEm/98e6nAyGzF5oWGfHLLh1Pzx1k0j6J3quk5WOIOEgCA5lgZac5/37doRC+qJkzRk= X-Gm-Message-State: AOJu0YwE/5s2KEhWGbTQsj2M/oH7PiFOQ3Fy1zinjkkd8pmf3WGSS+KP SvOoyuw0BMHh69E1hrTaAletykG5YnOie+idQA8+HyAyjc+2nsL5njFKk6Ei3SAKX70xIpuExqy S1irDZHL1qNxvWo9erjt4NAWyrOs= X-Google-Smtp-Source: AGHT+IHyy23HcmaQ52/rd5rDvngu7LRYvURqrkVV3Ex85O/tWUqZhwKw6IqE32pbGOAn02FuV8iXJIIQLS2eUvYiV/I= X-Received: by 2002:a05:6830:16da:b0:6e5:379:ca76 with SMTP id l26-20020a05683016da00b006e50379ca76mr7022991otr.20.1709886350569; Fri, 08 Mar 2024 00:25:50 -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 09:25:39 +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="000000000000883982061321f035" X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; 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:c]; 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::32a: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: 4TrfPq6Qcvz4t8H --000000000000883982061321f035 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 poudriere 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 under 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 an= d > > 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 just > > 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 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 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 > > --000000000000883982061321f035 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey Mark,

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

Since I am fairly new to FreeBSD I was unde= r the impression that it would support aarch64 as a platform. I guess it do= es, but this does not include the ports collection.=C2=A0

No problem. Since I was targeting the Pi as a device for a few simp= le things I might be able to build what I need without using the ports coll= ection.

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

Am Di., 5. M=C3=A4rz 2024 um 18:43=C2= =A0Uhr schrieb Mark Millard <marklm= i@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

--000000000000883982061321f035--