Guys just watched a 6 hour ffmpeg compile on my arm box from Hetzner. 4 cores 8gb ram. Thought it would be a quick build. Any leads on faster options?
ARM box compiling from source: a timelapse in pain
Cross compile from x86_64 and scp the binary over. Did this at 3am once for nginx on a pi. Anyway idk why I do this
./configure --arch=arm64 --cross-prefix=aarch64-linux-gnu-
Pro tip: oracle cloud free tier arm ampere a1. 4 ocpu 24gb ram. Compile there or use it as cross-compile host. Steps:
- Launch instance
- Install gcc-aarch64-linux-gnu
- Build with --target=arm-linux-gnueabihf
- Strip binary
- Deploy
Heads up: free tier has idle timeout policy, keep build under 4 hours or use screen.
So I did this once (well more than once actually) with ffmpeg on a rock64 I got from a friend (he owed me money and gave me the board instead which tells you something about our friendship) and I started the compile before going to bed (big mistake I know but I was young and foolish and full of hope) and woke up to find it had failed at hour 5 because I forgot to install libfdk-aac-dev (or was it libopus I forget now this was 2019 or maybe 2020 the years blur together when you are compiling from source regularly) and the lesson I took from this (besides always checking dependencies first which seems obvious in retrospect but was not obvious at 2am when I started) was that cross-compilation is not cheating it is just using your time wisely because time is the one resource you cannot get back unlike money or arm boards which seem to multiply in my closet somehow (my partner hates this) and
Lmao 6 hours bro just rent a bigger box for the compile and cancel after Or use github actions runner they got arm now. U r paying with ur time instead of money
Virtualization tax on ARM is lower than x86 but still measurable. Your 4 vCPU is likely 2 physical cores with threads. Cross-compilation avoids the virtualization tax entirely. OpenVZ would make this worse with shared kernel and cgroup limits on CPU bursts. For sustained compiles, dedicated ARM or cross-build is the only rational path.