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

Compilation error with gcc 4.9 #739

Closed
rcarl01 opened this issue Jun 27, 2014 · 7 comments
Closed

Compilation error with gcc 4.9 #739

rcarl01 opened this issue Jun 27, 2014 · 7 comments

Comments

@rcarl01
Copy link

rcarl01 commented Jun 27, 2014

Error Message

/ngx_pagespeed-release-1.8.31.4-beta/src/ngx_pagespeed.cc
/root/ngx_pagespeed-release-1.8.31.4-beta/src/ngx_pagespeed.cc:1264:17: error: 'net_instaweb::{anonymous}::ps_main_conf_t* net_instaweb::{anonymous}::ps_get_main_config(ngx_http_request_t*)' defined but not used [-Werror=unused-function]
 ps_main_conf_t* ps_get_main_config(ngx_http_request_t* r) {
jeffkaufman added a commit that referenced this issue Jun 27, 2014
@jeffkaufman
Copy link
Contributor

The error is accurate: ps_get_main_config is defined and not used. I'll remove it.

For now, could you compile without the unused-function warning? This would mean adding something like CFLAGS="$CFLAGS -Wno-unused-function" to ngx_pagespeed/config.

@jeffkaufman
Copy link
Contributor

Oh, and what compiler and version are you using?

@rcarl01
Copy link
Author

rcarl01 commented Jun 27, 2014

Nginx 1.7.2
gcc 4.9.0 (Debian 4.9.0.7)

jeffkaufman added a commit that referenced this issue Jun 30, 2014
@loadaverage
Copy link

I have the similar issue.
Debian GNU/Linux jessie/sid
gcc version 4.9.0 (Debian 4.9.0-7)
On nginx 1.6 (and 1.7.3 too) and ngx_pagespeed-release-1.8.31.4-beta

@oschaaf
Copy link
Member

oschaaf commented Jul 9, 2014

@jeffkaufman fixed this via e55b062 on the trunk-tracking branch. The patch should apply cleanly.

@loadaverage
Copy link

@oschaaf Thanks.

@jeffkaufman
Copy link
Contributor

Fixed by #740

@jeffkaufman jeffkaufman changed the title Compile error build from source src/ngx_pagespeed.cc:1264:17: error: 'net_instaweb::{anonymous} Compilation error with gcc 4.9 Aug 4, 2014
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

4 participants