OPNsense Forum

English Forums => 25.1, 25.4 Series => Topic started by: sillyc0n on May 03, 2025, 10:43:03 AM

Title: Building on ARM
Post by: sillyc0n on May 03, 2025, 10:43:03 AM
Hi All,
This is my first post and I pretty much registered to seek help with troubleshooting opnsense-tools build on ARM64.

I run builds on Oracle ARM VM, 4xVPU + 12GB RAM.
CPU  0: ARM Neoverse-N1 r3p1 affinity:  0
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64 byte CWG,IDC>
 Instruction Set Attributes 0 = <DP,RDM,Atomic,CRC32,SHA2,SHA1,AES+PMULL>
 Instruction Set Attributes 1 = <RCPC-8.3,DCPoP>
 Instruction Set Attributes 2 = <>
         Processor Features 0 = <CSV3,CSV2,RAS,GIC,AdvSIMD+HP,FP+HP,EL3,EL2,EL1,EL0 32>
         Processor Features 1 = <PSTATE.SSBS MSR>
         Processor Features 2 = <>
      Memory Model Features 0 = <TGran4,TGran64,TGran16,SNSMem,BigEnd,16bit ASID,256TB PA>
      Memory Model Features 1 = <XNX,PAN+ATS1E1,LO,HPD+TTPBHA,VH,16bit VMID,HAF+DS>
      Memory Model Features 2 = <EVT-8.2,32bit CCIDX,48bit VA,UAO,CnP>
      Memory Model Features 3 = <>
      Memory Model Features 4 = <>
             Debug Features 0 = <DoubleLock,2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3p1,Debugv8>
             Debug Features 1 = <>
         Auxiliary Features 0 = <>
         Auxiliary Features 1 = <>
AArch32 Instruction Set Attributes 5 = <RDM,CRC32,SHA2,SHA1,AES+VMULL,SEVL>
AArch32 Media and VFP Features 0 = <FPRound,FPSqrt,FPDivide,DP VFPv3+v4,SP VFPv3+v4,AdvSIMD>
AArch32 Media and VFP Features 1 = <SIMDFMAC,FPHP Arith,SIMDHP Arith,SIMDSP,SIMDInt,SIMDLS,FPDNaN,FPFtZ>
CPU  1: ARM Neoverse-N1 r3p1 affinity:  1
CPU  2: ARM Neoverse-N1 r3p1 affinity:  2
CPU  3: ARM Neoverse-N1 r3p1 affinity:  3

FreeBSD freebsd-14-2 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC arm64

There is 2 issues I encounter:

1. To complete make VERSION=25.1.5 DEVICE=ARM64 ports, I had to comment out py-telepot in config/25.1/ports.conf
#net-im/py-telepot@py${PRODUCT_PYTHON}          arm
because it fails on:
pkg-static: py311-wheel-0.45.1 conflicts with py311-wheel044-0.44.0 (installs files into the same place).  Problematic file: /usr/local/bin/wheel-3.11
you can build it as standalone from within chroot
...
make chroot
pkg remove py311-wheel044
make -C /usr/ports/net-im/py-telepot # might not be exact, variables missing etc.!
...

but make VERSION=25.1.5 DEVICE=ARM64 ports always starts fresh and runs into the same problem.

looks to me like a bad problem with resolving dependencies.

2. Eventually when above step completes, with py-telepot commented out, make VERSION=25.1.5 DEVICE=ARM64 core fails, and i think it is related to how sort is used during plist step inside opnsense-core Makefile. Log attached.
We could probably fix it, by running sort on both plists (new and old), but how to make local changes to opnsense-core be recognized?

Questions in summary:
1. how to clean packages more properly to avoid cross dependency issues such as the py311-wheel044 problem? I suspect something could be done in build/ports.sh?

2. how to work with opnsense-core locally and troubleshoot sort problem? seems to me that opnsense-tools fetches scripts from github and executes them inside chroot, so local changes are always overwritten, and the step is generally not easy to debug.
Title: Re: Building on ARM
Post by: EricPerl on May 03, 2025, 09:11:35 PM
There might be hints in this pinned thread in the FAQ section: https://forum.opnsense.org/index.php?topic=35828.0 (https://forum.opnsense.org/index.php?topic=35828.0)
Title: Re: Building on ARM
Post by: Salvadori on May 04, 2025, 01:36:27 AM
Hi Eric,

Confirming I'm also seeing the same issue with the `py311-wheel-0.45.1` vs `py311-wheel044-0.44.0` conflict when trying to build `opnsense-tools` (VERSION=25.1.5 DEVICE=AMD64).

This is happening in my environment running FreeBSD 14.2-RELEASE (amd64) as a VM (QCOW2 image) on Proxmox CE.