I am running Ubuntu Server 22.04 (aarch64) on my Raspberry Pi 4. It is a web server. I am trying to build the Nginx Pagespeed Module for the Raspberry Pi 4 with modern PSOL binaries. I have created a Raspberry Pi (aarch64) fork of the We-amp fork (which tracks dependency updates in upstream projects to the main branch and builds a valid mod_pagespeed) so I can create a Raspberry Pi version of the PSOL libraries.
I have written a tutorial here to build Nginx Pagespeed on the Raspberry Pi 4, except, it relies on old aarch64 PSOL binaries that were originally built for NGINX v1.18.0. I am running Nginx v1.25.5, so this needs to be updated. Unfortunately, the developer who originally built the aarch64 PSOL binaries is long gone and hasn't replied to any messages for years on his gitlab profile.
What I want to do is update my tutorial (as well as my Nginx Pagespeed module) to use updated PSOL binaries when building the pagespeed_ngx Module from source. So essentially, I need to build the PSOL binaries on Ubuntu 22.04 (aarch64) for Raspberry Pi from source to get to get a modern version of pagespeeed.
Mogwai, the guy who originally built the Aarch64 version of the PSOL libraries provides instructions on his repository page to build them. The instructions go as follows:
wget https://gitlab.com/gusco/ngx_pagespeed_arm/-/raw/master/incubator-pagespeed-mod-aarch64.patch
git clone --recursive https://github.com/apache/incubator-pagespeed-mod.git
cd incubator-pagespeed-mod
patch -Np1 -i ../incubator-pagespeed-mod-aarch64.patch
But when I get to the last line on Ubuntu, I get the following message:
patch -Np1 -i ../incubator-pagespeed-mod-aarch64.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur incubator-pagespeed-mod.orig/build/install.gyp incubator-pagespeed-mod/build/install.gyp
|--- incubator-pagespeed-mod.orig/build/install.gyp 2020-05-11 15:37:26.932307598 +0000
|+++ incubator-pagespeed-mod/build/install.gyp 2020-05-11 16:01:32.357959445 +0000
--------------------------
File to patch:
At this point I am stuck. I don't think the patch he gives applies to the most recent version of the source code. I don't know what file to input here, and don't even know if it would work if I found the correct file, since the source code has been modified since the patch was created.
Could someone please help me compile the PSOL binaries from my fork to an aarch64 version for Raspberry Pi 4 Ubuntu 22.04? If you could please create a patch that does work, or direct me to what file I should be patching in the "File to patch:" question above, that would be great. Any step by step instructions to get the latest PSOL binaries for Aarch64 would be of great help! Thanks for your advice and instructions!