Nginx-1.5.10 MIPS compiled to rt5350

Source: Internet
Author: User

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








Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.