{"id":1871,"date":"2015-05-27T22:09:32","date_gmt":"2015-05-27T20:09:32","guid":{"rendered":"https:\/\/adrhc.go.ro\/wordpress\/?p=1871"},"modified":"2017-10-07T17:26:52","modified_gmt":"2017-10-07T15:26:52","slug":"compiling-nginx-1-9-2","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/compiling-nginx-1-9-2\/","title":{"rendered":"Compiling nginx 1.9.2"},"content":{"rendered":"<pre class=\"brush:bash shell\">\r\n#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here.\r\n#Before starting do declare the environment variables specified to the link above.\r\n\r\nNEW_BUILD_NAME=nginx\r\nNEW_BUILD_VER=1.9.1\r\nNEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER\r\nls -l \/tmp\/$NEW_BUILD_NAME-*\r\nls -l ~\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-*\r\nNEW_BUILD_NR=0\r\n\r\ncd \/ffp\/home\/root\/compile\/$NEW_BUILD_NAME_AND_VER\r\n~\/x.sh ffpg-all\r\n.\/configure --help > configure.help.txt\r\n\r\n#additional modules\r\n#+nginx-dav-ext-module\r\n#+ngx_devel_kit-0.2.19\r\n#+lua-nginx-module-0.9.16rc3\r\n#+echo-nginx-module-0.58\r\n#+rds-json-nginx-module-0.14\r\n#+drizzle-nginx-module-0.1.9\r\n#+set-misc-nginx-module-0.29\r\n#\r\n#--with-pcre-jit -> must be the last\r\n\r\n.\/configure --prefix=\/ffp --conf-path=\/ffp\/etc\/nginx\/nginx.conf --error-log-path=\/ffp\/log\/nginx-error.log --pid-path=\/ffp\/var\/run\/nginx.pid --user=nobody --group=nobody --with-file-aio --with-http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_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_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-perl=\/ffp\/bin\/perl --http-log-path=\/ffp\/log\/nginx-access.log --http-client-body-temp-path=\/ffp\/tmp\/nginx\/client-body --http-proxy-temp-path=\/ffp\/tmp\/nginx\/proxy --http-fastcgi-temp-path=\/ffp\/tmp\/nginx\/fastcgi --http-uwsgi-temp-path=\/ffp\/tmp\/nginx\/uwsgi --http-scgi-temp-path=\/ffp\/tmp\/nginx\/scgi --with-stream --with-stream_ssl_module --with-cc=\/ffp\/bin\/cc --with-cpp=\/ffp\/bin\/cpp --with-cpu-opt=armv5te --with-debug --add-module=$HOME\/compile\/nginx-modules\/nginx-dav-ext-module --add-module=$HOME\/compile\/nginx-modules\/ngx_devel_kit-0.2.19 --add-module=$HOME\/compile\/nginx-modules\/set-misc-nginx-module-0.29 --add-module=$HOME\/compile\/nginx-modules\/drizzle-nginx-module-0.1.9 --add-module=$HOME\/compile\/nginx-modules\/echo-nginx-module-0.58 --add-module=$HOME\/compile\/nginx-modules\/rds-json-nginx-module-0.14 --add-module=$HOME\/compile\/nginx-modules\/lua-nginx-module-0.9.16rc3 --with-pcre --with-pcre-jit\r\n\r\n#ERROR (lua-nginx-module-0.9.16rc1)\r\n\tngx_http_lua_initworkerby.c:(.text+0x2b8): undefined reference to `ngx_http_set_connection_log'\r\n\tobjs\/addon\/src\/ngx_http_lua_timer.o: In function `ngx_http_lua_timer_handler':\r\n\tngx_http_lua_timer.c:(.text+0x4c0): undefined reference to `ngx_http_set_connection_log'\r\n#SOLUTION\r\n\tsed -i s\/\"ngx_http_set_connection_log\"\/\"ngx_set_connection_log\"\/ nginx-modules\/lua-nginx-module-0.9.16rc1\/src\/ngx_http_lua_timer.c\r\n\tsed -i s\/\"ngx_http_set_connection_log\"\/\"ngx_set_connection_log\"\/ nginx-modules\/lua-nginx-module-0.9.16rc1\/src\/ngx_http_lua_initworkerby.c\r\n\r\n#ERROR (drizzle-nginx-module-0.1.8)\r\n\t\/ffp\/home\/root\/compile\/nginx-modules\/drizzle-nginx-module-0.1.9\/src\/ngx_http_drizzle_util.c:607:13: error: 'ngx_http_upstream_state_t' has no member named 'response_sec'\r\n\t\t u->state->response_sec = tp->sec;\r\n\t\t\t\t ^\r\n\t\/ffp\/home\/root\/compile\/nginx-modules\/drizzle-nginx-module-0.1.8\/src\/ngx_http_drizzle_util.c:608:13: error: 'ngx_http_upstream_state_t' has no member named 'response_msec'\r\n\t\t u->state->response_msec = tp->msec;\r\n#SOLUTION\r\n\t#Replace any \"->response_msec\" with \"->response_time\".\r\n\t#Comment any line containing: \"->response_sec =\".\r\n\t#Replace any \"&& u->state->response_time\" with \"&& u->state->response_time\".\r\n\t#Do the above replacements\/comments using these commands:\r\n\tsed -i s\/\"\\s\\s\\su->state->response_sec\"\/\"\\\/\\\/u->state->response_sec\"\/g \/ffp\/home\/root\/compile\/nginx-modules\/drizzle-nginx-module-0.1.8\/src\/ngx_http_drizzle_util.c\r\n\tsed -i s\/\"u->state->response_msec\"\/\"u->state->response_time\"\/g \/ffp\/home\/root\/compile\/nginx-modules\/drizzle-nginx-module-0.1.8\/src\/ngx_http_drizzle_util.c\r\n\tsed -i s\/\"u->state->response_sec\"\/\"u->state->response_time\"\/g \/ffp\/home\/root\/compile\/nginx-modules\/drizzle-nginx-module-0.1.8\/src\/ngx_http_drizzle_util.c\r\n\r\nnohup \/ffp\/bin\/make -C ~\/compile\/$NEW_BUILD_NAME_AND_VER &\r\nrenice -11 `pidof cc1plus` -p `pidof make` -p `pidof as` -p `pidof ld` -p `pidof configure` -p `pidof cc1` -p `pidof ccmake`\r\ntail -f nohup.out\r\n\r\n#directories required by nginx in order to run with default settings\r\nmkdir -p \/ffp\/tmp\/nginx\/client-body\r\nmkdir -p \/ffp\/tmp\/nginx\/proxy\r\nmkdir -p \/ffp\/tmp\/nginx\/fastcgi\r\nmkdir -p \/ffp\/tmp\/nginx\/uwsgi\r\nmkdir -p \/ffp\/tmp\/nginx\/scgi\r\n\r\nrm -r $HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\nmake install DESTDIR=$HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\ncd $HOME\/temp\/$NEW_BUILD_NAME_AND_VER\r\nmakepkg $NEW_BUILD_NAME $NEW_BUILD_VER $NEW_BUILD_NR\r\ncp -v \/tmp\/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz ~\/ffp_0.7_armv5\/packages\/\r\nfunpkg -q $NEW_BUILD_NAME\r\nfunpkg -i ~\/apache-htdocs\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#See https:\/\/adrhc.go.ro\/wordpress\/common-commands-when-building\/ for building environment, x.sh script and other things not defined here. #Before starting do declare the environment variables specified to the link above. NEW_BUILD_NAME=nginx NEW_BUILD_VER=1.9.1 NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER ls -l \/tmp\/$NEW_BUILD_NAME-* ls -l ~\/ffp_0.7_armv5\/packages\/$NEW_BUILD_NAME-* NEW_BUILD_NR=0 cd \/ffp\/home\/root\/compile\/$NEW_BUILD_NAME_AND_VER ~\/x.sh ffpg-all .\/configure [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/compiling-nginx-1-9-2\/#more-1871\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Compiling nginx 1.9.2<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,44,11,163],"tags":[100],"class_list":["post-1871","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-http-web-server","category-linux","category-nsa310","tag-nginx"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=1871"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1871\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=1871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=1871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=1871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}