Cross-compiling Apache httpd 2.2.19 for uclibc

來源:互聯網
上載者:User

Cross-compiling Apache httpd 2.2.19 for uclibc

1. 下載 Apache httpd 2.2.19
http://httpd.apache.org/download.cgi

2. 編譯本機版本

由於httpd需要編譯工具產生中間代碼, 所有先編譯本機版本產生工具.
# ./configure --host=i686-pc-linux-uclibc  /
 --with-included-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. 交叉編譯 for uclibc 
將交叉編譯工具路徑加入到PATH

# ./configure --host=i686-pc-linux-uclibc  /
 --with-included-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

在編譯完srclib/pcre/dftables 時會出現一個dftables產生chartables.c檔案錯誤的資訊.
這時候需手動產生
# cd srclib/pcre/
# /tmp/tools/dftables chartables.c
# cd ../../
# make
在編譯server目錄時會再次提示gen_test_char產生test_char.h的錯誤資訊
# cd /server
# /tmp/tools/gen_test_char > test_char.h
# cd ../
# make
編譯完成.

4. 安裝
# make DESTDIR=/tmp/httpd install

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.