Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4049

Raspberry Pi OS • How to build Pagespeed PSOL binaries from source for ARM64 (aarch64) Raspberry Pi 4 on Raspberry Pi OS?

$
0
0
I run a Raspberry Pi LEMP server. I am trying to build the Nginx Pagespeed Module https://github.com/apache/incubator-pagespeed-ngx for the Raspberry Pi 4 with modern PSOL binaries.

I have written a tutorial here https://danran.rocks/2022/01/how-to-com ... ver-20-04/ 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. You can find them here: https://gitlab.com/gusco/ngx_pagespeed_ ... ree/master 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.
https://gitlab.com/gusco/ngx_pagespeed_ ... ree/master

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 Raspberry Pi OS (aarch64) for Raspberry Pi from source to get to get a modern version of the Pagespeeed module.

Mogwai, the guy who originally built the Aarch64 version of the PSOL libraries provides instructions on his repository page to build them. You can find the repo page with instructions here: https://gitlab.com/gusco/ngx_pagespeed_ ... ree/master

The instructions go as follows:

Code:

wget https://gitlab.com/gusco/ngx_pagespeed_arm/-/raw/master/incubator-pagespeed-mod-aarch64.patchgit clone --recursive https://github.com/apache/incubator-pagespeed-mod.gitcd incubator-pagespeed-modpatch -Np1 -i ../incubator-pagespeed-mod-aarch64.patch
But when I get to the last line on Raspberry Pi OS, I get the following message:

Code:

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 to an Aarch64 version of Raspberry Pi OS for Raspberry Pi 4? 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!

Statistics: Posted by Danrancan — Fri Apr 26, 2024 2:50 am



Viewing all articles
Browse latest Browse all 4049

Trending Articles