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

Can't build with nginx 1.9.11+ #1110

Closed
thedark1337 opened this Issue Feb 6, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@thedark1337
Copy link

thedark1337 commented Feb 6, 2016

Hi, I'm using the latest changeset from Nginx's repository and building it from source with the latest ngx_pagespeed and headers-more-nginx. Whilst compiling I get the error:

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -g -O2  -ffunction-sections -fdata-sections -fstack-protector-strong --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2  -D_GLIBCXX_USE_CXX11_ABI=0  -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/chromium/src -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/google-sparsehash/src -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/google-sparsehash/gen/arch/linux/x64/include -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/protobuf/src -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/re2/src -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/out/Debug/obj/gen -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/out/Debug/obj/gen/protoc_out/instaweb -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/apr/src/include -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/aprutil/src/include -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/apr/gen/arch/linux/x64/include -I ../ngx_pagespeed-release-1.10.33.4-beta/psol/include/third_party/aprutil/gen/arch/linux/x64/include -I objs -I src/http -I src/http/modules -I src/http/v2 \
        -o objs/addon/src/ngx_pagespeed.o \
        ../ngx_pagespeed-release-1.10.33.4-beta/src/ngx_pagespeed.cc

../ngx_pagespeed-release-1.10.33.4-beta/src/ngx_pagespeed.cc:3133:1: error: deprecated conversion from string constant to ‘char*’ [-Werror=write-strings]
 };
 ^
../ngx_pagespeed-release-1.10.33.4-beta/src/ngx_pagespeed.cc:3148:1: error: deprecated conversion from string constant to ‘char*’ [-Werror=write-strings]
 };
 ^

my configure:

./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --user=nobody --group=nobody --with-http_geoip_module --with-http_ssl_module --with-http_v2_module  --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module --with-ipv6 --with-threads --with-file-aio --with-libatomic --with-debug --with-pcre --with-pcre-jit --without-http_empty_gif_module --without-http_memcached_module --without-http_scgi_module --without-http_split_clients_module --without-http_ssi_module --without-http_upstream_hash_module --without-http_upstream_ip_hash_module --without-http_upstream_least_conn_module --without-http_userid_module --without-http_uwsgi_module --add-module=../ngx_pagespeed-release-${NPS_VERSION}-beta  --add-module=../headers-more-nginx-module --with-cc-opt='-g -O2  -ffunction-sections -fdata-sections -fstack-protector-strong --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt="-Wl,--gc-sections,-s,-z,relro,--as-needed"

I also noticed during the configuration this:

adding module in ../ngx_pagespeed-release-1.10.33.4-beta
mod_pagespeed_dir=../ngx_pagespeed-release-1.10.33.4-beta/psol/include
build_from_source=false
checking for psol ... found
sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 6, 2016

@thedark1337 There have been changes on nginx's repository that add support for dynamic module loading. While supporting dynamic modules is awesome, is seems the changes involved also broke ngx_pagespeed's build.
I'm working on changes for that. I currently have ngx_pagespeed limping along again on the latest nginx version, but it still need a bit more work before I'm confident enough to post a patch. Please stay tuned.

@thedark1337

This comment has been minimized.

Copy link

thedark1337 commented Feb 6, 2016

I see, I'll keep this issue open and revert to the commit before dynamic modules were added. Thanks!

@oschaaf oschaaf self-assigned this Feb 6, 2016

@oschaaf oschaaf changed the title Building from source fails Fix building with nginx 1.9.11+ and support dynamic module loading Feb 6, 2016

@oschaaf

This comment has been minimized.

Copy link
Member

oschaaf commented Feb 6, 2016

Updated the title for this issue

@centminmod

This comment has been minimized.

Copy link

centminmod commented Feb 9, 2016

similar issue here with errors https://community.centminmod.com/posts/26058/

ccache /usr/bin/clang -ferror-limit=0 -c -I/usr/local/include/luajit-2.1  -pipe  -O -Wall -Wextra -Wpointer-arith -Wconditional-uninitialized -Wno-unused-parameter -Werror -g -m64 -mtune=native -mfpmath=sse -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-c++11-extensions -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion  -DNDK_SET_VAR -DNDK_UPSTREAM_LIST -DNDK_SET_VAR  -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/chromium/src -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/google-sparsehash/src -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/google-sparsehash/gen/arch/linux/x64/include -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/protobuf/src -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/re2/src -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/out/Release/obj/gen -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/out/Release/obj/gen/protoc_out/instaweb -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/apr/src/include -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/aprutil/src/include -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/apr/gen/arch/linux/x64/include -I ../ngx_pagespeed-release-1.9.32.13-beta/psol/include/third_party/aprutil/gen/arch/linux/x64/include -I ../ngx_devel_kit-0.2.19/objs -I objs/addon/ndk -I /usr/local/include/luajit-2.1 -I ../lua-nginx-module-0.9.20/src/api -I ../nginx_upstream_check_module-0.3.0 -I ../pcre-8.38 -I ../libressl-2.2.6/.openssl/include -I objs -I src/http -I src/http/modules -I src/http/v2 -I ../ngx_devel_kit-0.2.19/src -I src/stream \
        -o objs/addon/src/ngx_pagespeed.o \
        ../ngx_pagespeed-release-1.9.32.13-beta/src/ngx_pagespeed.cc
../ngx_pagespeed-release-1.9.32.13-beta/src/ngx_pagespeed.cc:3185:3: error: conversion from string literal to 'char *' is deprecated [-Werror,-Wc++11-compat-deprecated-writable-strings]
  NGX_MODULE_V1,
  ^
src/core/ngx_module.h:241:32: note: expanded from macro 'NGX_MODULE_V1'
    NULL, 0, 0, nginx_version, NGX_MODULE_SIGNATURE
                               ^
src/core/ngx_module.h:225:5: note: expanded from macro 'NGX_MODULE_SIGNATURE'
    NGX_MODULE_SIGNATURE_0 NGX_MODULE_SIGNATURE_1 NGX_MODULE_SIGNATURE_2      \
    ^
src/core/ngx_module.h:22:5: note: expanded from macro 'NGX_MODULE_SIGNATURE_0'
    ngx_value(NGX_PTR_SIZE) ","                                               \
    ^
src/core/ngx_string.h:231:31: note: expanded from macro 'ngx_value'
#define ngx_value(n)          ngx_value_helper(n)
                              ^
src/core/ngx_string.h:230:31: note: expanded from macro 'ngx_value_helper'
#define ngx_value_helper(n)   #n
                              ^
<scratch space>:135:1: note: expanded from here
"8"
^
../ngx_pagespeed-release-1.9.32.13-beta/src/ngx_pagespeed.cc:3200:3: error: conversion from string literal to 'char *' is deprecated [-Werror,-Wc++11-compat-deprecated-writable-strings]
  NGX_MODULE_V1,
  ^
src/core/ngx_module.h:241:32: note: expanded from macro 'NGX_MODULE_V1'
    NULL, 0, 0, nginx_version, NGX_MODULE_SIGNATURE
                               ^
src/core/ngx_module.h:225:5: note: expanded from macro 'NGX_MODULE_SIGNATURE'
    NGX_MODULE_SIGNATURE_0 NGX_MODULE_SIGNATURE_1 NGX_MODULE_SIGNATURE_2      \
    ^
src/core/ngx_module.h:22:5: note: expanded from macro 'NGX_MODULE_SIGNATURE_0'
    ngx_value(NGX_PTR_SIZE) ","                                               \
    ^
src/core/ngx_string.h:231:31: note: expanded from macro 'ngx_value'
#define ngx_value(n)          ngx_value_helper(n)
                              ^
src/core/ngx_string.h:230:31: note: expanded from macro 'ngx_value_helper'
#define ngx_value_helper(n)   #n
                              ^
<scratch space>:137:1: note: expanded from here
"8"
^
2 errors generated.
make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 1
make[1]: Leaving directory `/svr-setup/nginx-1.9.11'
make: *** [install] Error 2

oschaaf added a commit that referenced this issue Feb 10, 2016

dynamic-modules: changes to support building dynamic modules
This change makes us support dynamic modules.
Combined with pull #1114
(which needs to go in first) this fixes
#1110
@sbagmeijer

This comment has been minimized.

Copy link

sbagmeijer commented Feb 10, 2016

@oschaaf will you actually change it in such a way Pagespeed can be dynamically loadable ?

They provided some info:
https://www.nginx.com/resources/wiki/extending/converting/
https://www.nginx.com/resources/wiki/extending/new_config/#

@jeffkaufman jeffkaufman changed the title Fix building with nginx 1.9.11+ and support dynamic module loading Can't build with nginx 1.9.11+ Feb 11, 2016

@pono pono unassigned oschaaf Jan 8, 2018

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