From nobody Fri Mar 08 08:14:27 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 4Trf8w1zzfz5D87D for ; Fri, 8 Mar 2024 08:14:40 +0000 (UTC) (envelope-from oliver.epper@gmail.com) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 4Trf8v4Jzqz4q87; Fri, 8 Mar 2024 08:14:39 +0000 (UTC) (envelope-from oliver.epper@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=WmeP+Gbv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of oliver.epper@gmail.com designates 2607:f8b0:4864:20::336 as permitted sender) smtp.mailfrom=oliver.epper@gmail.com Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6e4e8687a96so243576a34.1; Fri, 08 Mar 2024 00:14:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709885678; x=1710490478; 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=gm4zdNO2dcXWhbGsS6u5PMpZyYy52BK9lN4YEb99Mnc=; b=WmeP+Gbv3hGeOQHsnwr7nKPvdwGbLWGTBrGnieavnbWm9n0ekXs+QIHtfjZaSkolaB FyNd+9xjiNjTvkQo1nWlKF7ptDkSn1graCbfdUXwB1XDRbND6qZ4OatOMqncMOSTDxXI n3x83K8i8dfG8x3GS39xbffOrkFZS0UsbzK9yxaoJ4AgoLvqiFreVyRW/mD6QhR83tlj 4M485dfU7n8U4f/qU7aHbphVLS/p5CdDcuZu+j3fovN1/5f7xRZyDfkmOO+lW97+yOne RPu68rRQkqkFqLHUWbU9lGw6DA3N3r7InETACBjlUmf/8ad2qbOHYQluQORCG9iLRdsY 0ZkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709885678; x=1710490478; 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=gm4zdNO2dcXWhbGsS6u5PMpZyYy52BK9lN4YEb99Mnc=; b=T7sZF8wAT4iLpyC9NKcbFfFFmV4F5LsUWrghYvxTzfUWXPNcyfZHpUFa509TmQutUk pEgmvWFxQpLgnmQfg89YPdSJ3rA8voqQARnKUwNS6WaZAzFDJ1IpToGDLbkTCkd9RGIZ cwTZyFW2DvE187MWWClSdggExKmofyk0W9AVRinIgmGzsQ8g7EcAmeIGLGfJml8nFHi7 teskvqd4kyghNrfBVYas9BSKYSzCWmhvUF3/+9OXzLxSYWKPxj0A7BubEa4xWUMoupzR ZxhbYlMsgHjfIMRQZQcGvfTiZRfF9MICCQPef+j++Ti7Ss0ENFg9433DNRZwzl1D8H9j COGA== X-Gm-Message-State: AOJu0Yx274fBASUNP0M806waPfRCCJ3gXU5mIBVqxCn5ev+8fU8HwMnH 3QOl/2YJGNkdEXMcMb2eo5iXMub/5rOl/U9Kd4BXL2z5yMRR8Id2zvgI/mVj2zHgh5SVYYiccTz Y8avWDcQPv5ziQbfaEokPqSlI3pb7ERGa8Ls= X-Google-Smtp-Source: AGHT+IFbcKFsanDXQv413LURWffa+rtEoedA+WLgSuGLEHtknuHv++iect3QiZznR9egyIyzdCuhmpVivgnXIZF31ls= X-Received: by 2002:a9d:684b:0:b0:6e5:704:63fc with SMTP id c11-20020a9d684b000000b006e5070463fcmr5347600oto.34.1709885678242; Fri, 08 Mar 2024 00:14:38 -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:14:27 +0100 Message-ID: Subject: Re: compiling for other architecture To: Mathieu Arnold Cc: FreeBSD Ports Content-Type: multipart/alternative; boundary="000000000000755511061321c8bc" 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.998]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MID_RHS_MATCH_FROMTLD(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TAGGED_FROM(0.00)[]; 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)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::336:from] X-Rspamd-Queue-Id: 4Trf8v4Jzqz4q87 --000000000000755511061321c8bc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for your answers. I've finished working on the port and setup poudriere. Running the native build is all fine. Building for aarch64 on an amd64 host with the use of qemu-user-static the build time for port-mgmt/pkg (for example) went up by a factor of 11! I understand that is the way it is for now. But given that a clang running on amd64 can emit aarch64 just fine this might still not be the best setup if one needs to build a few packages for aarch64. Anyways thanks for your information. I might try to build on Apple Silicon running non-emulated aarch64 FreeBSD under its hypervisor or qemu virtualization (as opposed to emulation). greetings Oliver Am Di., 5. M=C3=A4rz 2024 um 16:37 Uhr schrieb Mathieu Arnold : > Hi, > > 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 and > 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. > > 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 person= al > > 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. > > -- > Mathieu Arnold > --000000000000755511061321c8bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for your answers. I've finished working on the = port and setup poudriere. Running the native build is all fine. Building fo= r aarch64 on an amd64 host with the use of qemu-user-static the build time = for port-mgmt/pkg (for example) went up by a factor of 11! I understand tha= t is the way it is for now. But given that a clang running on amd64 can emi= t aarch64 just fine this might still not be the best setup if one needs to = build a few=C2=A0packages for aarch64.

Anyways thanks fo= r your information. I might try to build on Apple Silicon running non-emula= ted aarch64 FreeBSD under its hypervisor or qemu virtualization (as opposed= to emulation).

greetings
Oliver

Am= Di., 5. M=C3=A4rz 2024 um 16:37=C2=A0Uhr schrieb Mathieu Arnold <mat@freebsd.org>:
Hi,

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.

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 perso= nal
> 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 ar= e all
> about the "dos and don'ts" and best practices when it co= mes to the FreeBSDs
> ports system.

--
Mathieu Arnold
--000000000000755511061321c8bc--