Build OPNsense on on aarch64

Started by mestafin, September 25, 2024, 04:54:33 PM

Previous topic - Next topic
I have a FreebSD (amd64) cross-build system for building OPNsense for aarch64.

the OPNsense/tools repository is installed on in


/tmp/opnsense


on my machine keep it separate from the main package repositories.

I am following the process in OPNsense/tools, but encountered a few problem with the version number of certain packages.

For example, when I build the ports collection, it fails with these type of error messages:




>>> ERROR: The build encountered fatal issues!
>>> Aborted version 1.1.0 for databases/py-duckdb@py311 (py311-duckdb)

>>> Aborted version 2.1.5_9 for dns/dnscrypt-proxy2 (dnscrypt-proxy2)
>>> Aborted version 3.18.0 for dns/py-dns-lexicon@py311 (py311-dns-lexicon)
>>> Aborted version 2.6.1,1 for dns/py-dnspython@py311 (py311-dnspython)

>>> Aborted version 29.4,3 for editors/emacs@nox (emacs-nox)
>>> Aborted version 12.4.0,2 for emulators/open-vm-tools-nox11 (open-vm-tools-nox11)
>>> Aborted version 3.1.6,1 for lang/ruby31 (ruby)

>>> Aborted version 5.12.0_17 for net-mgmt/collectd5 (collectd5)
>>> Aborted version 1.7.0_1 for net-mgmt/py-opn-cli (py311-opn-cli)
>>> Aborted version 1.32.0 for net-mgmt/telegraf (telegraf)

>>> Aborted version 4.6 for net/chrony (chrony)
>>> Aborted version 24.1.4_1 for net/cloud-init@py311 (py311-cloud-init)
>>> Aborted version 1100.00_1 for net/realtek-re-kmod (realtek-re-kmod)

>>> Aborted version 2.4.10_1 for print/cups (cups)

>>> Aborted version 1.4.1_2,1 for security/clamav (clamav)
>>> Aborted version 1.6.3_1 for security/crowdsec (crowdsec)
>>> Aborted version 2.4.5_1 for security/gnupg (gnupg)
>>> Aborted version 7.0.6_2 for security/suricata (suricata)
>>> Aborted version 1.8.17_1 for security/xray-core (xray-core)

>>> Aborted version 8.5.0_1 for sysutils/ansible@py311 (py311-ansible)
>>> Aborted version 8.14.3_1 for sysutils/beats8 (beats8)
>>> Aborted version 1.12a_1 for sysutils/cciss_vol_status (cciss_vol_status)
>>> Aborted version 1.8.2 for sysutils/node_exporter (node_exporter)
>>> Aborted version 7.32.1 for sysutils/puppet7 (puppet7)

>>> Aborted version 2.20.37_1 for textproc/minify (minify)

>>> Aborted version 0.5.7 for www/c-icap-modules (c-icap-modules)
>>> Aborted version 2.8.4.3.0.4.2.3_4 for www/caddy-custom (caddy-custom)
>>> Aborted version 1.0.0_10 for www/icapeg (icapeg)



I checked the version numbers against the aarch64 repository of Maurice (OPNsense aarch64 firmware repository) and it looks like it is mostly updated packages that caused the failures.

for example,

py311-duckdb (1.1.0) fails while py311-duckdb (1.0.0) looks like it is ok

How do I fix this version problem in the build system (I am not a FreeBSD expert)

Either I need to get the build system to accept the latest version or I need to revert (downgrade) the packages to the previous versions.

Any help will be appreciated.

OPNsense does not use py311-duckdb 1.1.0 yet, we're still on 1.0.0.

Are you using the correct ports repository? Do not use freebsd/ports, but opnsense/ports.

Are you trying to build a snapshot or 24.7.x?

Cheers
Maurice
OPNsense virtual machine images
OPNsense aarch64 firmware repository

Commercial support & engineering available. PM for details (en / de).

Hi Maurice,

I am building 24.7.x, cross-building on an AMD54 machine running FreeBSD 14-1.

Background
I have successfully build OPNsense for aarch64 on a Amazon Cloud graviton (aarch64) machine without any issues.

As I have access to a number of idle AMD64 vm's in our data center, I decided to cross-build OPNsense on one of these machines.

I think the issue is with the cross-building of OPNsense on an AMD64 machine.

Build System
I started again with a clean AMD64 vm running FreeBSD and followed the recipe in opnsense/tools.

I cloned the repository into /opnsense

I then edited the MakeFile in opnsense/tools:


ROOTDIR = /opnsense
DEVICE = R4S
ARCH = aarch64
DEBUG = -g


followed by


env ROOTDIR=/tmp/opnsense make update


I then checked two ports to confirm versions by comparing the version info in the MakeFiles of the two ports. I checked the version I have in my local cloned ports tree


/opnsense/ports/databases/py-duckdb
/opnsense/ports/sysutils/beats8


against the version in the MakeFile in opnsense/ports repository on Github


ports/databases/py-duckdb
ports/sysutils/beats8


The versions were the same.

for example, from the py-duckdb MakeFile:


PORTNAME= duckdb
DISTVERSIONPREFIX= v
DISTVERSION= 1.1.1



I started the build process:


ev ROOTDIR=/opnsense make base       (success)
ev ROOTDIR=/opnsense make kernel.    (success)
ev ROOTDIR=/opnsense make tools.      (success)
ev ROOTDIR=/opnsense make ports.     (failed)


>>> Creating package mirror set for 24.7.5_33-aarch64... done
-rw-r--r--  1 root wheel  374M Oct  1 03:15 packages-24.7.5_33-aarch64.tar
>>> ERROR: The build encountered fatal issues!
>>> Aborted version 1.1.1 for databases/py-duckdb@py311 (py311-duckdb)
>>> Aborted version 2.1.5_9 for dns/dnscrypt-proxy2 (dnscrypt-proxy2)
>>> Aborted version 3.18.0 for dns/py-dns-lexicon@py311 (py311-dns-lexicon)
>>> Aborted version 2.6.1,1 for dns/py-dnspython@py311 (py311-dnspython)
>>> Aborted version 29.4,3 for editors/emacs@nox (emacs-nox)
>>> Aborted version 12.4.0,2 for emulators/open-vm-tools-nox11 (open-vm-tools-nox11)
>>> Aborted version 3.1.6,1 for lang/ruby31 (ruby)
>>> Aborted version 5.12.0_17 for net-mgmt/collectd5 (collectd5)
>>> Aborted version 1.7.0_1 for net-mgmt/py-opn-cli (py311-opn-cli)
>>> Aborted version 1.32.0 for net-mgmt/telegraf (telegraf)
>>> Aborted version 4.6 for net/chrony (chrony)
>>> Aborted version 24.1.4_1 for net/cloud-init@py311 (py311-cloud-init)
>>> Aborted version 6.2.d20240813,1 for net/ntopng (ntopng)
>>> Aborted version 1100.00_1 for net/realtek-re-kmod (realtek-re-kmod)
>>> Aborted version 2.4.10_1 for print/cups (cups)
>>> Aborted version 1.4.1_2,1 for security/clamav (clamav)
>>> Aborted version 1.6.3_1 for security/crowdsec (crowdsec)
>>> Aborted version 2.4.5_1 for security/gnupg (gnupg)
>>> Aborted version 7.0.6_2 for security/suricata (suricata)
>>> Aborted version 1.8.17_1 for security/xray-core (xray-core)
>>> Aborted version 8.5.0_1 for sysutils/ansible@py311 (py311-ansible)
>>> Aborted version 8.14.3_1 for sysutils/beats8 (beats8)
>>> Aborted version 1.12a_1 for sysutils/cciss_vol_status (cciss_vol_status)
>>> Aborted version 1.8.2 for sysutils/node_exporter (node_exporter)
>>> Aborted version 7.32.1 for sysutils/puppet7 (puppet7)
>>> Aborted version 2.20.37_1 for textproc/minify (minify)
>>> Aborted version 0.5.7 for www/c-icap-modules (c-icap-modules)
>>> Aborted version 2.8.4.3.0.4.2.3_4 for www/caddy-custom (caddy-custom)
>>> Aborted version 1.0.0_10 for www/icapeg (icapeg)
*** Error code 1



Any ideas?






You should probably use

# make ROOTDIR=/tmp/opnsense update VERSION=24.7.5

to build from the relevant tags. But I can see that e.g. dns/dnscrypt-proxy2 and lang/ruby31 would fail anyway since they haven't been updated which leads me to believe your build issue is due to a build dependency failing which is not obvious from the breakage of the top ports.

The logs for individual builds would tell you more.


Cheers,
Franco