New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module ngx_pagespeed requires the pagespeed optimization library #327

Closed
gm100861 opened this Issue May 3, 2013 · 15 comments

Comments

Projects
None yet
4 participants
@gm100861

gm100861 commented May 3, 2013

[root@centos100 nginx-1.4.0]# uname -a
Linux centos100 2.6.18-238.el5xen #1 SMP Thu Jan 13 16:41:45 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@centos100 nginx-1.4.0]# cat /etc/issue
CentOS release 5.6 (Final)
Kernel \r on an \m

configuring additional modules
adding module in /root/ngx_pagespeed-release-1.5.27.2-beta/
mod_pagespeed_dir=/root/ngx_pagespeed-release-1.5.27.2-beta//psol/include
build_from_source=false
checking for psol ... not found
./configure: error: module ngx_pagespeed requires the pagespeed optimization library

view objs/autoconf.err:

/root/ngx_pagespeed-release-1.5.27.2-beta//psol/lib/Release/linux/x64/pagespeed_automatic.a(35.html_name.gp.o.o):html_name.gp.cc:(.text.ZNK12net_instaweb8HtmlName8Iterator4nameEv+0xa6): more undefined references to std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)' follow /root/ngx_pagespeed-release-1.5.27.2-beta//psol/lib/Release/linux/x64/pagespeed_automatic.a(1.logging.o.o): In functionstd::basic_string<char, std::char_traits, std::allocator >* logging::MakeCheckOpString<unsigned long, unsigned int>(unsigned long const&, unsigned int const&, char const)':
/root/ngx_pagespeed-release-1.5.27.2-beta//psol/lib/Release/linux/x64/pagespeed_automatic.a(1.logging.o.o): In function std::basic_string<char, std::char_traits<char>, std::allocator<char> >_ logging::MakeCheckOpString<int, int>(int const&, int const&, char const_)': logging.cc:(.text._ZN7logging17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[std::basic_string<char, std::char_traits<char>, std::allocator<char> >_ logging::MakeCheckOpString<int, int>(int const&, int const&, char const_)]+0x5b): undefined reference to std::basic_ostream<char, std::char_traits >& std::_ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const, long)'
logging.cc:(.text.ZN7logging17MakeCheckOpStringIiiEEPSsRKT_RKT0_PKc[std::basic_string<char, std::char_traits, std::allocator >* logging::MakeCheckOpString<int, int>(int const&, int const&, char const)]+0x6f): undefined reference to `std::basic_ostream<char, std::char_traits >& std::_ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const, long)'

what can i do ?

@jeffkaufman

This comment has been minimized.

Show comment
Hide comment
@jeffkaufman

jeffkaufman May 3, 2013

Contributor

CentOS 5.x uses GCC 4.1, but we built the PSOL binaries with GCC 4.2. Options:

  1. Build PSOL from source
  2. Wait for 1.5.27.3 (probably) where we'll build binaries on CentOS 5.4 and they should work everywhere.

(See #313)

Contributor

jeffkaufman commented May 3, 2013

CentOS 5.x uses GCC 4.1, but we built the PSOL binaries with GCC 4.2. Options:

  1. Build PSOL from source
  2. Wait for 1.5.27.3 (probably) where we'll build binaries on CentOS 5.4 and they should work everywhere.

(See #313)

@chaizhenhua

This comment has been minimized.

Show comment
Hide comment
@chaizhenhua

chaizhenhua May 4, 2013

Contributor

@jeffkaufman i also has the problem. when i got ./configure: error: module ngx_pagespeed requires the pagespeed optimization library, i run tar xvf 1.5.27.2.tar.gz and configure again can fix this.

Contributor

chaizhenhua commented May 4, 2013

@jeffkaufman i also has the problem. when i got ./configure: error: module ngx_pagespeed requires the pagespeed optimization library, i run tar xvf 1.5.27.2.tar.gz and configure again can fix this.

@jeffkaufman

This comment has been minimized.

Show comment
Hide comment
@jeffkaufman

jeffkaufman May 5, 2013

Contributor

@chaizhenhua it sounds to me like you had a different problem that also gives "ngx_pagespeed requires the pagespeed optimization library". @gm100861 is running CentOS 5 and so the binaries we ship won't work, while I think you didn't have a psol directory.

Contributor

jeffkaufman commented May 5, 2013

@chaizhenhua it sounds to me like you had a different problem that also gives "ngx_pagespeed requires the pagespeed optimization library". @gm100861 is running CentOS 5 and so the binaries we ship won't work, while I think you didn't have a psol directory.

@chaizhenhua

This comment has been minimized.

Show comment
Hide comment
@chaizhenhua

chaizhenhua May 5, 2013

Contributor

@jeffkaufman it occur when i re-configure nginx. i have psol directory in ngx_pagespeed folder. when i unzip again the error dispear.

Contributor

chaizhenhua commented May 5, 2013

@jeffkaufman it occur when i re-configure nginx. i have psol directory in ngx_pagespeed folder. when i unzip again the error dispear.

@gm100861

This comment has been minimized.

Show comment
Hide comment
@gm100861

gm100861 May 6, 2013

@chaizhenhua
有PSOL这个目录的,我是按照github上的安装的,先下载一个组件,然后下载了一个PSOL,当然名字不是叫这个,解压完后是这个名字,是解压在那个组件里面的,有90M+,然后我又进nginx的目录里
./configure --add-ones指定了,但是还是找不到的。

2013/5/5 Chai Zhenhua notifications@github.com

@jeffkaufman https://github.com/jeffkaufman it occur when i
re-configure nginx. i have psol directory in ngx_pagespeed folder. when i
unzip again the error dispear.


Reply to this email directly or view it on GitHubhttps://github.com//issues/327#issuecomment-17451365
.

gm100861 commented May 6, 2013

@chaizhenhua
有PSOL这个目录的,我是按照github上的安装的,先下载一个组件,然后下载了一个PSOL,当然名字不是叫这个,解压完后是这个名字,是解压在那个组件里面的,有90M+,然后我又进nginx的目录里
./configure --add-ones指定了,但是还是找不到的。

2013/5/5 Chai Zhenhua notifications@github.com

@jeffkaufman https://github.com/jeffkaufman it occur when i
re-configure nginx. i have psol directory in ngx_pagespeed folder. when i
unzip again the error dispear.


Reply to this email directly or view it on GitHubhttps://github.com//issues/327#issuecomment-17451365
.

@chaizhenhua

This comment has been minimized.

Show comment
Hide comment
@chaizhenhua

chaizhenhua May 6, 2013

Contributor

@gm100861 你可以试一下从源码编译pso l

CentOS 5.x uses GCC 4.1, but we built the PSOL binaries with GCC 4.2. Options:

  1. Build PSOL from source
  2. Wait for 1.5.27.3 (probably) where we'll build binaries on CentOS 5.4 and they should work everywhere.

(See #313)

Contributor

chaizhenhua commented May 6, 2013

@gm100861 你可以试一下从源码编译pso l

CentOS 5.x uses GCC 4.1, but we built the PSOL binaries with GCC 4.2. Options:

  1. Build PSOL from source
  2. Wait for 1.5.27.3 (probably) where we'll build binaries on CentOS 5.4 and they should work everywhere.

(See #313)

@gm100861

This comment has been minimized.

Show comment
Hide comment
@gm100861

gm100861 May 7, 2013

好的,谢谢,我试一下。英文太烂了,还好你懂中文,感谢!!!

2013/5/6 Chai Zhenhua notifications@github.com

@gm100861 https://github.com/gm100861 你可以试一下从源码编译pso l

CentOS 5.x uses GCC 4.1, but we built the PSOL binaries with GCC 4.2.
Options:

  1. Build PSOL from sourcehttps://github.com/pagespeed/ngx_pagespeed/wiki/Building-PSOL-From-Source
  2. Wait for 1.5.27.3 (probably) where we'll build binaries on CentOS
    5.4 and they should work everywhere.

(See #313 #313)

Reply to this email directly or view it on GitHubhttps://github.com//issues/327#issuecomment-17485351
.

gm100861 commented May 7, 2013

好的,谢谢,我试一下。英文太烂了,还好你懂中文,感谢!!!

2013/5/6 Chai Zhenhua notifications@github.com

@gm100861 https://github.com/gm100861 你可以试一下从源码编译pso l

CentOS 5.x uses GCC 4.1, but we built the PSOL binaries with GCC 4.2.
Options:

  1. Build PSOL from sourcehttps://github.com/pagespeed/ngx_pagespeed/wiki/Building-PSOL-From-Source
  2. Wait for 1.5.27.3 (probably) where we'll build binaries on CentOS
    5.4 and they should work everywhere.

(See #313 #313)

Reply to this email directly or view it on GitHubhttps://github.com//issues/327#issuecomment-17485351
.

@ozra

This comment has been minimized.

Show comment
Hide comment
@ozra

ozra Oct 22, 2015

[ED:] I've made a download-sources-and-compile script that works flawlessly in Ubuntu 15 (my local machine), but not on my Debian 8 VPS - where I get above error. I've tried countless different compile approaches from the net, but they all fail the same way on the VPS. Differences in bash handling of line breaks or something?
I'm using nginx-1.9.5 and ngx_pagespeed-release-1.9.32.10-beta.

I first had the problem on the Ubuntu machine too - while putting the script together - but after removing all line continuations in the --with-cc-opt param, it worked immediately there.

I've tried removing all line continuations in the script on Debian side - but no change.

Debian 8 has GCC 5.2.1-22 - passing -D_GLIBCXX_USE_CXX11_ABI=0 with ./configure solves it!

ozra commented Oct 22, 2015

[ED:] I've made a download-sources-and-compile script that works flawlessly in Ubuntu 15 (my local machine), but not on my Debian 8 VPS - where I get above error. I've tried countless different compile approaches from the net, but they all fail the same way on the VPS. Differences in bash handling of line breaks or something?
I'm using nginx-1.9.5 and ngx_pagespeed-release-1.9.32.10-beta.

I first had the problem on the Ubuntu machine too - while putting the script together - but after removing all line continuations in the --with-cc-opt param, it worked immediately there.

I've tried removing all line continuations in the script on Debian side - but no change.

Debian 8 has GCC 5.2.1-22 - passing -D_GLIBCXX_USE_CXX11_ABI=0 with ./configure solves it!

@jeffkaufman

This comment has been minimized.

Show comment
Hide comment
@jeffkaufman

jeffkaufman Oct 22, 2015

Contributor

Can you paste your script?

Contributor

jeffkaufman commented Oct 22, 2015

Can you paste your script?

@ozra

This comment has been minimized.

Show comment
Hide comment
@ozra

ozra Oct 22, 2015

Hope I got it right after all the changes back and forth:

Note that ~/tmp... cannot be used in --add-module=... - that chokes too.

set -e
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip
cd ~
mkdir -p tmp
cd ~/tmp

# check http://nginx.org/en/download.html for the latest version
NGX_VERSION=1.9.32.10
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NGX_VERSION}-beta.zip
unzip release-${NGX_VERSION}-beta.zip
cd ngx_pagespeed-release-${NGX_VERSION}-beta/
wget https://dl.google.com/dl/page-speed/psol/${NGX_VERSION}.tar.gz
tar -xzvf ${NGX_VERSION}.tar.gz

cd ~/tmp
NGINX_VERSION=1.9.5
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar -xvzf nginx-${NGINX_VERSION}.tar.gz
cd nginx-${NGINX_VERSION}/

./configure \
  --prefix=/usr/local/share/nginx --conf-path=/etc/nginx/nginx.conf \
  --sbin-path=/usr/local/sbin --error-log-path=/var/log/nginx/error.log \
  --with-http_v2_module --with-http_ssl_module --with-http_realip_module \
  --with-http_addition_module --with-http_sub_module --with-http_dav_module \
  --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module \
  --with-http_gzip_static_module --with-http_random_index_module \
  --with-http_secure_link_module --with-http_stub_status_module \
  --with-file-aio --with-ipv6 \
  --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=native -mtune=native -D_GLIBCXX_USE_CXX11_ABI=0' \
  --add-module=../ngx_pagespeed-release-${NGX_VERSION}-beta

make
sudo make install

ozra commented Oct 22, 2015

Hope I got it right after all the changes back and forth:

Note that ~/tmp... cannot be used in --add-module=... - that chokes too.

set -e
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip
cd ~
mkdir -p tmp
cd ~/tmp

# check http://nginx.org/en/download.html for the latest version
NGX_VERSION=1.9.32.10
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NGX_VERSION}-beta.zip
unzip release-${NGX_VERSION}-beta.zip
cd ngx_pagespeed-release-${NGX_VERSION}-beta/
wget https://dl.google.com/dl/page-speed/psol/${NGX_VERSION}.tar.gz
tar -xzvf ${NGX_VERSION}.tar.gz

cd ~/tmp
NGINX_VERSION=1.9.5
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar -xvzf nginx-${NGINX_VERSION}.tar.gz
cd nginx-${NGINX_VERSION}/

./configure \
  --prefix=/usr/local/share/nginx --conf-path=/etc/nginx/nginx.conf \
  --sbin-path=/usr/local/sbin --error-log-path=/var/log/nginx/error.log \
  --with-http_v2_module --with-http_ssl_module --with-http_realip_module \
  --with-http_addition_module --with-http_sub_module --with-http_dav_module \
  --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module \
  --with-http_gzip_static_module --with-http_random_index_module \
  --with-http_secure_link_module --with-http_stub_status_module \
  --with-file-aio --with-ipv6 \
  --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=native -mtune=native -D_GLIBCXX_USE_CXX11_ABI=0' \
  --add-module=../ngx_pagespeed-release-${NGX_VERSION}-beta

make
sudo make install
@ozra

This comment has been minimized.

Show comment
Hide comment
@ozra

ozra Oct 22, 2015

It's a cut n paste from different sources and changed bit by bit till working kind-of-stew. I think the snips are small enough to not be a license problem. This is free to use in any way as long as I'm not held responsible, and all that kahuna.

ozra commented Oct 22, 2015

It's a cut n paste from different sources and changed bit by bit till working kind-of-stew. I think the snips are small enough to not be a license problem. This is free to use in any way as long as I'm not held responsible, and all that kahuna.

@jeffkaufman

This comment has been minimized.

Show comment
Hide comment
@jeffkaufman

jeffkaufman Oct 22, 2015

Contributor

Can you add to the top:

set -e

This will make the script stop if any of the individual commands fails, which should let us see where the problem is. I suspect something is going wrong earlier in the process, and then things later don't see what they expect.

Contributor

jeffkaufman commented Oct 22, 2015

Can you add to the top:

set -e

This will make the script stop if any of the individual commands fails, which should let us see where the problem is. I suspect something is going wrong earlier in the process, and then things later don't see what they expect.

@ozra

This comment has been minimized.

Show comment
Hide comment
@ozra

ozra Oct 22, 2015

Eh, did you see my edit in the comment above? The ABI flag solved the problem...

ozra commented Oct 22, 2015

Eh, did you see my edit in the comment above? The ABI flag solved the problem...

@jeffkaufman

This comment has been minimized.

Show comment
Hide comment
@jeffkaufman

jeffkaufman Oct 22, 2015

Contributor

Debian 8 has GCC 5.2.1-22 - passing -D_GLIBCXX_USE_CXX11_ABI=0 with ./configure solves it!

Makes sense, thanks for reporting what works!

@morlovich is currently working on getting us working with C++11.

Contributor

jeffkaufman commented Oct 22, 2015

Debian 8 has GCC 5.2.1-22 - passing -D_GLIBCXX_USE_CXX11_ABI=0 with ./configure solves it!

Makes sense, thanks for reporting what works!

@morlovich is currently working on getting us working with C++11.

@ozra

This comment has been minimized.

Show comment
Hide comment
@ozra

ozra Oct 22, 2015

I wasted so many hours on this server, so I'm happy to save some one else the trouble. Not the favourite debugging to do ;-)
Thanks for the set -e tip by the way!

ozra commented Oct 22, 2015

I wasted so many hours on this server, so I'm happy to save some one else the trouble. Not the favourite debugging to do ;-)
Thanks for the set -e tip by the way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment