Closed oneinstack closed 10 years ago
Can you try adding -march=i686
to your compiler flags?
Static compilation mode (./configure --add-modules=path-src/ngx_pagesspeed
) is ok. However, if use dso_tool
compiled ngx_pagespeed.so, loaded ngx_pagespeed.so error.
@yaoweibin any ideas?
OK. I'll check this problem. Thanks for your report.
@lj2007331 Could you show me your configure and install steps? And your OS? Thanks.
I tested many times. Debian 6 Ubuntu 12 and CentOS 6 has been passed, but CentOS 5.9 32bit have this problem. Please check your email, Can you see the issue in my VM. Look forward to your reply, Thanks!
@jeffkaufman when I add the compile flag -march=i686
, it's OK. What's the problem? How could I avoid it?
@lj2007331 it sounds like @yaoweibin couldn't reproduce your problem. Could you paste the specific commands you ran on your CentOS 5.9 32bit machine?
@jeffkaufman I have reproduced this problem in CentOS 5.9 32bit machine. When I add the compile flag march=i686
in the dso_tool, the problem disappears. Can you explain why I should add this flag?
@yaoweibin The compiler needs to know that __sync_add_and_fetch_4
is ok, and this requires an instruction that didn't exist on i586 or i386.
Can we add to our config
file a cflag to always set march=i686
and not require anyone to set it themself?
@yaoweibin @jeffkaufman I add the compile flag march=i686 in the dso_tool
, the problem disappears. but I need to always set march=i686
.
@jeffkaufman Is this pull request OK for you? https://github.com/pagespeed/ngx_pagespeed/pull/504 @lj2007331 Could you test the above pull request for sure?
Thank you for your effort.
@yaoweibin I tested. /root/lnmp/src/ngx_pagespeed-master/config: line 89: =march=i686: command not found
@lj2007331 It looks like there was a typo in #504. I've merged it to master and fixed the typo in a48c243. If you pull from master you should get something that fixes this problem.
Thank you, Jeff. I'm just testing and fixing this problem :). Your fix is good.
Tengine only support HTTP modules dynamically loaded.
if use dso_tool, error: nginx: [emerg] load module "/data/webservers/nginx/modules//ngx_pagespeed.so" failed (/data/webservers/nginx/modules//ngx_pagespeed.so: undefined symbol: __sync_add_and_fetch_4) in /data/webservers/nginx/conf/nginx.conf:8 configuration file /data/webservers/nginx/conf/nginx.conf test failed