{"id":1756,"date":"2015-05-01T14:22:11","date_gmt":"2015-05-01T12:22:11","guid":{"rendered":"https:\/\/adrhc.go.ro\/wordpress\/?p=1756"},"modified":"2017-10-07T17:26:57","modified_gmt":"2017-10-07T15:26:57","slug":"compiling-nginx-1-9-0","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/compiling-nginx-1-9-0\/","title":{"rendered":"Compiling nginx 1.9.0"},"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.0\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=1\r\n\r\ncd \/ffp\/home\/root\/compile\/nginx-1.9.0\r\n~\/x.sh ffpg\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.16rc1\r\n#+echo-nginx-module-0.57\r\n#+rds-json-nginx-module\r\n#+drizzle-nginx-module\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-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\/drizzle-nginx-module --add-module=$HOME\/compile\/nginx-modules\/echo-nginx-module-0.57 --add-module=$HOME\/compile\/nginx-modules\/rds-json-nginx-module --add-module=$HOME\/compile\/nginx-modules\/lua-nginx-module-0.9.16rc1 --with-pcre --with-pcre-jit\r\n\r\nERROR\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\nSOLUTION\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\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 for nginx 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.0 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=1 cd \/ffp\/home\/root\/compile\/nginx-1.9.0 ~\/x.sh ffpg .\/configure [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/compiling-nginx-1-9-0\/#more-1756\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Compiling nginx 1.9.0<\/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,11,163],"tags":[100],"class_list":["post-1756","post","type-post","status-publish","format-standard","hentry","category-compiling-from-source","category-linux","category-nsa310","tag-nginx"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1756","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=1756"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/1756\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=1756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=1756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=1756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}