Nginx 1.1.4 can't build on Debian hurd-i386
|Reported by:||Cyril Lavier||Owned by:||somebody|
|Keywords:||patch, build fail, hurd||Cc:|
|uname -a:||GNU debian 0.3 GNU-Mach 1.3.99/Hurd-0.3 i686-AT386 GNU|
For the Debian packaging purposes, I try to make Nginx working under the hurd-i386 kernel.
The error is the following.
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules \ -o objs/src/http/ngx_http_variables.o \ src/http/ngx_http_variables.c src/http/ngx_http_variables.c: In function ‘ngx_http_variable_realpath_root’: src/http/ngx_http_variables.c:1160:37: error: ‘PATH_MAX’ undeclared (first use in this function) src/http/ngx_http_variables.c:1160:37: note: each undeclared identifier is reported only once for each function it appears in src/http/ngx_http_variables.c:1160:32: error: unused variable ‘real’ [-Werror=unused-variable] cc1: all warnings being treated as error
Under hurd, there is no PATH_MAX variable defined in the limits.h kernel header, and in any other header.
In order to have this issue corrected, I decided to set the PATH_MAX at 4096 (which is the common value in most Linux based systems). And after this, the build is working fine.
I attached a patch which does the trick.
I would like this patch to be applied upstream, as it will benefit all distributions providing a hurd kernel.
I'm working on the last version (1.1.4), and it can be applied/adapted on any other serie (1.0.x and 0.8.x), as Nginx always failed to build under hurd-i386.