Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Building trunk tracking ngx_pagespeed with PSOL synced to trunk

anupamadutta edited this page Jun 10, 2013 · 19 revisions

Most people will be fine using the binary distribution of PSOL to build ngx_pagespeed the standard way or [building PSOL from source synced to the tagged version] (https://github.com/pagespeed/ngx_pagespeed/wiki/Building-PSOL-From-Source) but if you want to use the latest PSOL source and build ngx_pagespeed against this source, you need to follow these instructions.

First build mod_pagespeed at the trunk revision that ngx_pagespeed trunk-tracking has been updated to work with. You can see [the commit history] (https://github.com/pagespeed/ngx_pagespeed/commits/trunk-tracking) of the trunk-tracking branch to find the latest PSOL revision that the branch has been updated to work with. This is usually mentioned in the pull request's description.

$ mkdir -p ~/bin
$ cd ~/bin
$ svn co http://src.chromium.org/svn/trunk/tools/depot_tools
$ export PATH=$PATH:~/bin/depot_tools
$ mkdir ~/mod_pagespeed
$ cd ~/mod_pagespeed
$ gclient config http://modpagespeed.googlecode.com/svn/trunk/src
$ gclient sync --force --jobs=1
$ cd src/
$ svn up -r 3130
$ make AR.host="$PWD/build/wrappers/ar.sh" \
       AR.target="$PWD/build/wrappers/ar.sh" \
       BUILDTYPE=Release \
       mod_pagespeed_test pagespeed_automatic_test

(See mod_pagespeed: build from source if you run into trouble, or ask for help on the mailing list.)

Then build the pagespeed optimization library:

$ cd ~/mod_pagespeed/src/net/instaweb/automatic
$ make CXXFLAGS="-DSERF_HTTPS_FETCHING=0" \
       AR.host="$PWD/../../../build/wrappers/ar.sh" \
       AR.target="$PWD/../../../build/wrappers/ar.sh" \
       all

While make all will always report an error, as long as it creates pagespeed_automatic.a you have what you need.

Check out ngx_pagespeed:

$ cd ~
$ git clone https://github.com/pagespeed/ngx_pagespeed.git

Check out ngx_pagespeed trunk-tracking branch specifically:

$ cd ~/ngx_pagespeed
$ git checkout trunk-tracking

Continue with the instructions given in the [building PSOL from source page] (https://github.com/pagespeed/ngx_pagespeed/wiki/Building-PSOL-From-Source) for downloading and building nginx.

Clone this wiki locally