Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2024 09:14:27 +0100
From:      Oliver Epper <oliver.epper@gmail.com>
To:        Mathieu Arnold <mat@freebsd.org>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: compiling for other architecture
Message-ID:  <CAP8tsuQ8tCD0YAOpxSjMiZog4yxj2h6aux2sBN=jjBXjZQPf6Q@mail.gmail.com>
In-Reply-To: <cn6rpylhua7fxzvewf2mkamjakmjm733ezyer3rtvyvywh7ois@exe67emqjohf>
References:  <CAP8tsuQ=j4CSMno75nbh32-FEcvAtrrEDxup5d1u5n_3fibuuA@mail.gmail.com> <cn6rpylhua7fxzvewf2mkamjakmjm733ezyer3rtvyvywh7ois@exe67emqjohf>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <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 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

<div dir=3D"ltr">Thanks for your answers. I&#39;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.<div><br></div><div>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).</div><div><br></div><div>greetings</div><div>Oliver</div></=
div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Am=
 Di., 5. M=C3=A4rz 2024 um 16:37=C2=A0Uhr schrieb Mathieu Arnold &lt;<a hre=
f=3D"mailto:mat@freebsd.org">mat@freebsd.org</a>&gt;:<br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1=
px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:=
1ex">Hi,<br>
<br>
I don&#39;t think you need to do much of the things you are saying, cross<b=
r>
building can&#39;t really work because most ports will compile something an=
d<br>
then try to run it, which won&#39;t work because an armv6 binary won&#39;t =
run<br>
on a x86_64 machine.<br>
<br>
What works on the other hand is using poudriere and qemu-user-static.<br>
<br>
you install both, and if you want to build packages for armv6, you just<br>
create a jail with the arch as &quot;arm.armv6&quot;, and then simply run<b=
r>
poudriere bulk with the arm jail. It will build everything in a jail,<br>
and you&#39;ll get arm packages in the end.<br>
<br>
On Sun, Mar 03, 2024 at 01:53:31PM +0100, Oliver Epper wrote:<br>
&gt; Hi all,<br>
&gt; <br>
&gt; I am currently working on an updated port of net/pjsip. I have a perso=
nal<br>
&gt; use case building for the raspberry-pi, too. All the information that =
I<br>
&gt; found so far seemed outdated. Many are talking about building a<br>
&gt; cross-compiler. With clang that should not be necessary, right?<br>
&gt; <br>
&gt; Can anyone point me to more recent information on how I can build for =
armv6<br>
&gt; on a x86_64 machine?<br>
&gt; <br>
&gt; greetings<br>
&gt; Oliver<br>
&gt; <br>
&gt; P.S.: I know how to build for different architectures. My questions ar=
e all<br>
&gt; about the &quot;dos and don&#39;ts&quot; and best practices when it co=
mes to the FreeBSDs<br>
&gt; ports system.<br>
<br>
-- <br>
Mathieu Arnold<br>
</blockquote></div>

--000000000000755511061321c8bc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP8tsuQ8tCD0YAOpxSjMiZog4yxj2h6aux2sBN=jjBXjZQPf6Q>