OPNsense Forum

English Forums => Hardware and Performance => Topic started by: gondox on March 22, 2022, 10:19:49 am

Title: OPNSense Compilation stuck for generic ARM64
Post by: gondox on March 22, 2022, 10:19:49 am
Hi,
i try to set up OPNSense on a DFRobot Routerboard ( https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767 ) using a CM4 Module with onboard eMMC flash.
I flashed the rpi4-uefi onto it ( https://rpi4-uefi.dev/ ), because I want to run the generic arm64 version of OPNSense instead of the specific Raspberry Pi 4 version.

That is the reason why I tried to compile "make searial DEVICE=ARM64" in a Freebsd13 VM.
It took me 4 days compilation time to get to this error: "Cannot create repository catalogue"

Any ideas what may have caused this? I did not deviate from the commands here: https://github.com/opnsense/tools
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: franco on March 22, 2022, 01:34:45 pm
Wrong pkg version on build host? Install the one from our tree...


Cheers,
Franco
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: gondox on March 22, 2022, 03:49:38 pm
any hints how I can install your pkg version?
Maybe there is even a proven VM Image I can use?

EDIT: I checked and freebsd-version is "13.0-RELEASE" while pkg --version is "1.17.5"
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: franco on March 22, 2022, 08:37:25 pm
Yes, you need 1.16.x

# cd /usr/ports/ports-mgmt/pkg && make reinstall


Cheers,
Franco
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: gondox on March 22, 2022, 09:48:17 pm
I could downgrade it and restart make, lets see how it works this time :-)

Thanks for the advice!
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: franco on March 23, 2022, 07:26:37 am
Fingers crossed :)
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: gondox on March 25, 2022, 02:50:52 pm
it took a really long time but sadly didn't work again.

Is there a way to find out what exactly caused the error?
Is it possible to compile faster in any way? The VM already has 8 cores and 12GB of RAM.

Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: gondox on March 25, 2022, 08:09:53 pm
I installed freebsd 13.0 on a raspberry pi and tried to compile it with "make serial" but I get an error about unknown architecture aarch64. So I guess this is not supported? I am about to cross compile arm64 on a aarch64 system using qemu now with the command "make serial DEVICE=ARM64" which feels weird. Any better way?
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: gondox on March 29, 2022, 08:54:57 am
Compilation just doesn't seem to work out for me, I ran into a lua script error about a nil value . . .
Is the some kind of approved VM image for building?
Am I posting in the right sub forum?
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: franco on March 29, 2022, 09:27:03 am
In your screenshot these are all go-based packages so I assume the go compiler package didn't build. Welcome to our world. ;)

DEVICE is exactly what to use to build the respective device. The default one is a amd64 target.

Not saying the default selection could be improved (there is no logic at the moment), but someone with a little time to tinker on different architectures will have to do provide the change.


Cheers,
Franco
Title: Re: OPNSense Compilation stuck for generic ARM64
Post by: gondox on March 29, 2022, 09:55:12 pm
the lua script error happened when I tried to compile "make serial DEVICE=ARM64" on a raspberry pi cm4, I guess it didnt even use qemu. I set up a new VM on my AMD64 Host a try to do "make dvd DEVICE=ARM64" this time.

How are the official builds created? Is there a server that continuously builds images and packages?