Cross-compiling Apache httpd 2.2.19 for uclibc
1. Download Apache httpd 2.2.19
Http://httpd.apache.org/download.cgi
2. Compile the local version
Because httpd requires a compilation tool to generate intermediate code, all the tools that first compile the local version will generate.
#./Configure -- Host = i686-pc-linux-uclibc/
-- With-defined ded-APR/
-- With-MPM = worker/
-- Enable-static-AB/
-- Enable-cgi/
-- Enable-cgid
# Cp srclib/PCRE/dftables/tmp/tools
# Cp server/gen_test_char/tmp/tools
3. Cross-compilation for uclibc
Add the path of the Cross-compilation tool to path
#./Configure -- Host = i686-pc-linux-uclibc/
-- With-defined ded-APR/
-- With-MPM = worker/
-- Enable-static-AB/
-- Enable-cgi/
-- Enable-cgid/
Ldflags = "-l/mnt/CLFs/lib-L/mnt/CLFs/usr/lib" libs =-lpthread/
AR = i686-pc-linux-uclibc-ar/
As = i686-pc-linux-uclibc-as/
Cc = i686-pc-linux-uclibc-gcc/
Cxx = i686-pc-linux-uclibc-gcc/
Ranlib = i686-pc-linux-uclibc-ranlib/
Strip = i686-pc-linux-uclibc-strip/
F77 = none/
Ac_cv_c_alignment = need/
Ac_cv_c_endian = little/
Ac_cv_int_type_size_t = Yes/
Ac_cv_int_type_int32_t = Yes/
Ac_cv_int_type_uint32_t = Yes/
Ac_cv_lib_rt_fdatasync = No/
Ac_cv_sizeof_char = 1/
Ac_cv_sizeof_char_p = 4/
Ac_cv_sizeof_int = 4/
Ac_cv_sizeof_long = 4/
Ac_cv_sizeof_long_int = 4/
Ac_cv_sizeof_long_long = 8/
Ac_cv_sizeof_long_long_int = 8/
Ac_cv_sizeof_off_t = 4/
Ac_cv_sizeof_pid_t = 4/
Ac_cv_sizeof_short = 2/
Ac_cv_sizeof_size_t = 4/
Ac_cv_sizeof_ssize_t = 4/
Ac_cv_sizeof_struct_iovec = 8/
Ac_cv_file _ dev_zero = Yes/
Ac_cv_func_setpgrp_void = Yes/
Apr_cv_process_shared_works = Yes/
Apr_cv_mutex_robust_shared = Yes/
Apr_cv_tcp_nodelay_with_cork = Yes/
Ap_cv_void_ptr_lt_long = No/
Ap_void_ptr_lt_long = No/
Ac_cv_func_memcmp_working = Yes/
Ac_cv_func_mkstemp64 = Yes/
Ac_cv_func_mmap64 = Yes/
Ac_cv_func_mmap_fixed_mapped = Yes/
Ac_cv_func_pthread_attr_setguardsize = Yes/
Ac_cv_func_pthread_key_delete = Yes/
Ac_cv_func_pthread_rwlock_init = Yes/
Ac_cv_func_pthread_yield = Yes/
Ac_cv_func_readdir64_r = Yes/
Ac_cv_func_sem_open = Yes/
Ac_cv_func_sendfile64 = Yes/
Ac_cv_func_sendfilev64 = No/
Ac_cv_header_libpq_fe_h = No/
Ac_cv_header_ SQL _h = No/
Ac_cv_negative_eai = Yes/
Ac_cv_o_nonblock_inherited = No/
Ac_cv_struct_rlimit = Yes/
Apr_cv_typematch_ssize_t_int = Yes/
Apr_cv_typematch_ssize_t_long = Yes/
Apr_cv_typematch_size_t_unsigned_int = Yes/
Apr_cv_typematch_size_t_unsigned_long = Yes
When srclib/PCRE/dftables is compiled, an error message indicating that the chartables. c file generated by dftables is displayed.
Manually generate
# Cd srclib/PCRE/
#/Tmp/tools/dftables chartables. c
# CD ../../
# Make
When compiling the server directory, the system prompts gen_test_char to generate the test_char.h error message again.
# Cd/Server
#/Tmp/tools/gen_test_char> test_char.h
# CD ../
# Make
Compilation completed.
4. Installation
# Make destdir =/tmp/httpd install