Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

CentOS 7: can't build PSOL from source #1656

Closed
dvershinin opened this issue Jun 15, 2019 · 10 comments
Closed

CentOS 7: can't build PSOL from source #1656

dvershinin opened this issue Jun 15, 2019 · 10 comments

Comments

@dvershinin
Copy link
Contributor

After all the stuff:

$ mkdir -p ~/bin
$ cd ~/bin
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=$PATH:~/bin/depot_tools
$ mkdir ~/mod_pagespeed
$ cd ~/mod_pagespeed
$ git clone https://github.com/pagespeed/mod_pagespeed.git src
$ gclient config https://github.com/pagespeed/mod_pagespeed.git --unmanaged --name=src
$ cd src/
$ git checkout ${BRANCH}
$ cd ..
$ gclient sync --force --jobs=1 # add --revision=xxxx for a specific git revision
$ make AR.host="$PWD/build/wrappers/ar.sh" \
       AR.target="$PWD/build/wrappers/ar.sh" \
       BUILDTYPE=Release \
       mod_pagespeed_test pagespeed_automatic_test

Getting:

make: *** No rule to make target `mod_pagespeed_test'. Stop.

No Makefile is created by previous commands. Tried to use an older gclient (if that's what is supposed to generate it anyway) without success.

@Lofesa
Copy link

Lofesa commented Jun 16, 2019

Hi @dvershinin
Think these are outdated steps to do.
see at https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source.

For Centos 7 take account that you need to install libstdc++-static rpm as far that pagespeed link statics libraries. For latest versions of pagespeed don´t need the AR arguments

@dvershinin
Copy link
Contributor Author

@Lofesa thank you, that's better.

The build runs without errors, but the output doesn't contain the likes of pagespeed_automatic.a static library (what I think I'm trying to build after all :) ).

I have libstdc++-static 4.8.5.

@dvershinin
Copy link
Contributor Author

So I also did install/build_psol.sh and it worked.

@Lofesa
Copy link

Lofesa commented Jun 16, 2019

Hi @dvershinin
You can do a cd pagespeed/automatic and then make BUILDTYPE=Release all this creates the pagespeed_automatica.a in this dir

@Firegarden
Copy link

So I also did install/build_psol.sh and it worked.

I am having the same problem with

make: *** No rule to make target `mod_pagespeed_test'. Stop

Can you please clarify what you mean. I am not a C programmer so this is a little challenging to understand.

@Lofesa
Copy link

Lofesa commented Aug 17, 2020

@Firegarden Maybe is better to open a new issue other than write in a closed one.
But anyway.... have you done the step from this https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source?

@Firegarden
Copy link

Firegarden commented Aug 17, 2020

Thank you @Lofesa I am still learning how to to use github. I am actually using this https://github.com/apache/incubator-pagespeed-ngx/wiki/building-psol-from-source and as you can see it has the same instructions as above and I get the same error.

Just to give some context I am trying to build on Ubuntu 20.04 - Arm (AWS M6g Graviton2 processor) and there are no PSOL libraries available so I have to build them.

Also just a note I am trying to build for x86 as well because there are no files available on dl.google.com/dl/page-speed/psol for latest build of pagespeed 1.14.36.1

@Firegarden
Copy link

make: *** No rule to make target 'mod_pagespeed_test'

Just an update to this thread before I create a new issue. I have tested with instructions from https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source and same error as above. I can not get passed the step make step

@Lofesa
Copy link

Lofesa commented Aug 18, 2020

Here the files to download https://github.com/apache/incubator-pagespeed-ngx/releases/tag/v1.14.33.1-RC1 for the nginx.
And follow these steps https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
But in this step: psol_url=https://dl.google.com/dl/page-speed/psol/${NPS_RELEASE_NUMBER}.tar.gz
change it with https://dist.apache.org/repos/dist/release/incubator/pagespeed/1.14.36.1/x64/psol-1.14.36.1-apache-incubating-$BIT_SIZE_NAME.tar.gz

@Firegarden
Copy link

Firegarden commented Aug 19, 2020

Thank you @Lofesa

I tested with my build script and was able to build Nginx with your instructions on X86

echo -ne " Downloading ngx_pagespeed [..]\\r"
wget https://github.com/apache/incubator-pagespeed-ngx/archive/v1.14.33.1-RC1.zip >> /tmp/nginx-autoinstall.log 2>&1
unzip v1.14.33.1-RC1.zip >> /tmp/nginx-autoinstall.log 2>&1
cd incubator-pagespeed-ngx-1.14.33.1-RC1/ || exit 1
wget https://dist.apache.org/repos/dist/release/incubator/pagespeed/1.14.36.1/x64/psol-1.14.36.1-apache-incubating-x64.tar.gz
tar -xzvf psol-1.14.36.1-apache-incubating-x64.tar.gz >> /tmp/nginx-autoinstall.log 2>&1

Thank you for taking the time to answer this and I can confirm this works. The only concern I have left is to get the PSOL to compile on AWS M6g Graviton2 Arm processor. If anyone knows how to make this work it would be helpful to know.

sambacha pushed a commit to sambacha/nginx-autoinstall that referenced this issue Mar 19, 2021
this fixes the deadlinks for pagespeed, see [apache/incubator-pagespeed-ngx#1656.

Also added clearer instructions if pagespeed is used as a module so that users know to adjust their `nginx.conf`
sambacha pushed a commit to sambacha/nginx-autoinstall that referenced this issue Mar 19, 2021
this fixes the deadlinks for pagespeed, see [apache/incubator-pagespeed-ngx#1656.

Also added clearer instructions if pagespeed is used as a module so that users know to adjust their `nginx.conf`
sambacha pushed a commit to sambacha/nginx-autoinstall that referenced this issue Mar 20, 2021
this fixes the deadlinks for pagespeed, see [apache/incubator-pagespeed-ngx#1656.

Also added clearer instructions if pagespeed is used as a module so that users know to adjust their `nginx.conf`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants