phusion / passenger_apt_automation

Tools for automatically building a Debian APT repository for Phusion Passenger
MIT License
20 stars 20 forks source link

Cannot add a new module (ngx_pagespeed) #18

Closed shaneog closed 9 years ago

shaneog commented 9 years ago

I currently use nginx from the Passenger Enterprise repositories. However I wish to use the Pagespeed module.

Within the Vagrant build machine

debian/modules/ngx_pagespeed/psol/lib/Release/linux/x64/pagespeed_js_minify
debian/modules/ngx_pagespeed/psol/lib/Release/linux/ia32/pagespeed_js_minify

The build fails with the following errors, despite the fact that psol is in the correct place.

pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     configuring additional modules
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     adding module in /tmp/buildd/nginx-1.8.0/debian/modules/ngx_pagespeed
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     mod_pagespeed_dir=/tmp/buildd/nginx-1.8.0/debian/modules/ngx_pagespeed/psol/include
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     build_from_source=false
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     checking for psol ... not found
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     ./configure: error: module ngx_pagespeed requires the pagespeed optimization library.
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     Look in objs/autoconf.err for more details.
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     make[1]: *** [config.arch.extras] Error 1
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     make[1]: Leaving directory `/tmp/buildd/nginx-1.8.0'
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     make: *** [build] Error 2
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     dpkg-buildpackage: error: debian/rules build gave error exit status 2
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     E: Failed autobuilding of package
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     I: unmounting /var/cache/pbuilder/ccache/trusty-amd64 filesystem
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     I: unmounting dev/pts filesystem
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     I: unmounting run/shm filesystem
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     I: unmounting proc filesystem
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     I: cleaning the build env 
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:45:     I: removing directory /var/cache/pbuilder/build//19982 and its subdirectories
pkg:nginx:trusty:amd64        | 2015-09-15 22:47:46: *** Command failed: cd /work/spkg/nginx/trusty && pbuilder-dist trusty amd64 *.dsc

Question Is there something that I am doing wrong, or missing from this process?

FooBarWidget commented 9 years ago

./configure: error: module ngx_pagespeed requires the pagespeed optimization library.

It sounds like you need to install an additional library. Maybe it's libpagespeed? I am not sure what the library is called.

In any case, any libraries that the build process depends on, must be added to the control file as a Build-Depends. But this is assuming that your library is available in the Ubuntu APT repo. If not, then things become a bit more complicated.

shaneog commented 9 years ago

It's the psol library and it's included as a sub-directory under the ngx_pagespeed plugin directory, as Google recommends. For some reason it's not being found there.

When I re-build using the deb-src on another machine it works perfectly, just not using this project.

FooBarWidget commented 9 years ago

Maybe the strictness of the pbuilder environment interferes with the detection of the psol library. Anyway, if building the deb-src without pbuilder works, then that should be good enough for you. We only use the Docker + pbuilder approach to automate building packages for multiple distributions. Since you are only building for your own machines, building the deb-src without Docker + pbuilder is good enough.