Compiling nginx-1.5.10 usually requires the support of the following libraries: PCRE, zlib, OpenSSL
The library versions used by this compilation nginx-1.5.10 are pcre-8.34; openssl-1.0.0l; zlib-1.2.8 put these and nginx in the same directory
Add a shell script file runscript. Sh to nginx
#! /Bin/sh
Build_path = ../release
Cc_path =/opt/buildroot-gcc342/bin/mipsel-Linux-gcc
Cpp_path =/opt/buildroot-gcc342/bin/mipsel-Linux-G ++
./Configure \
-- With-OpenSSL =/home/nginx/openssl-1.0.0l \
-- Prefix = $ build_path \
-- User = nginx \
-- Group = nginx \
-- Builddir = $ build_path/build \
-With-zlib =/home/nginx/zlib-1.2.8 \
-- With-PCRE \
-- With-PCRE =/home/nginx/pcre-8.34 \
-- With-PCRE-jit \
-- With-CC = $ cc_path \
-- With-CPP = $ cpp_path \
Execute the script file and convert it into a makefile.
Src/OS/Unix/ngx_files.c: In function 'ngx _ read_ahead ': |
Src/OS/Unix/ngx_files.c: 473: Warning: Implicit declaration of function 'posix _ fadvise' |
Make [1]: *** [../release/build/src/OS/Unix/ngx_files.o] Error 1 |
Make [1]: Leaving directory '/home/nginx/nginx-1.5.10' |
Make: *** [Build] Error 2 |
[[Email protected] nginx-1.5.10] # |
In makefile
-Werror-G Removal
Re-Execute make again with an error |
Objs/src/CORE/ngx_cycle.o: In function 'ngx _ init_cycle ': |
/Home/loongsoner/job/Web-server/nginx-1.4.3/src/CORE/ngx_cycle.c: 464: Undefined reference to 'ngx _ shm_free' |
/Home/loongsoner/job/Web-server/nginx-1.4.3/src/CORE/ngx_cycle.c: 469: Undefined reference to 'ngx _ shm_alloc' |
/Home/loongsoner/job/Web-server/nginx-1.4.3/src/CORE/ngx_cycle.c: 647: Undefined reference to 'ngx _ shm_free' |
Objs/src/event/ngx_event.o: In function 'ngx _ event_module_init ': |
/Home/loongsoner/job/Web-server/nginx-1.4.3/src/event/ngx_event.c: 526: Undefined reference to 'ngx _ shm_alloc' |
The ngx_shm_free and ngx_shm_alloc functions are undefined. The solution is to define the macro ngx_have_sysvshm. |
Add the following macro to the automatically generated header file
# Ifndef ngx_sys_nerr
# Define ngx_sys_nerr 132
# Endif
# Ifndef ngx_have_sysvshm
# Define ngx_have_sysvshm1
# Endif
Make & make install to generate nginx