Skip to content
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

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 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

@jeffkaufman jeffkaufman commented Jun 27, 2014

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

@jeffkaufman jeffkaufman commented Jun 27, 2014

Oh, and what compiler and version are you using?

@rcarl01
Copy link
Author

@rcarl01 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

@loadaverage loadaverage commented Jul 9, 2014

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 oschaaf commented Jul 9, 2014

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

@loadaverage
Copy link

@loadaverage loadaverage commented Jul 9, 2014

@oschaaf Thanks.

@jeffkaufman
Copy link
Contributor

@jeffkaufman jeffkaufman commented Aug 4, 2014

Fixed by #740

@jeffkaufman jeffkaufman closed this Aug 4, 2014
@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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants