Apache httpd-2.2.10 交叉编译至 ARM

Apache httpd-2.2.10 交叉编译至 ARM

我正在尝试将 Apache 2.2.10 交叉编译为 ARM 架构。我已导出 CC、ARM 变量。此外,我还成功为目标 ARM 架构交叉编译了 openssl、apr、apr-util 和 pcre 数据包。

配置:

CC_FOR_BUILD=gcc ./configure --build=i686-linux --host=arm-linux --target=arm-linux --prefix=/mnt/nand-user/apache --enable-ssl --with-ssl=/mnt/nand-user/openssl --enable-cgi --enable-so --with-pcre=/mnt/nand-user/pcre --with-apr=/mnt/nand-user/apr/ --with-apr-util=/mnt/nand-user/apr-util/ 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_mutex_recursive="yes" apr_cv_tcp_nodelay_with_cork="yes" ac_cv_sizeof_struct_iovec="8" ap_cv_void_ptr_lt_long="4"

它可以正常运行 configure,但无法成功 make:

/mnt/nand-user/apr/build-1/libtool --silent --mode=link arm-linux-gcc -g -O2 -I/mnt/nand-user/pcre/include     -L/mnt/nand-user/openssl/lib   -o htpasswd  htpasswd.lo   -lm -L/mnt/nand-user/pcre/lib -lpcre /mnt/nand-user/apr-util/lib/libaprutil-1.la -lexpat /mnt/nand-user/apr/lib/libapr-1.la -lm -lcrypt -ldl
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_create'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_getspecific'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_mutexattr_destroy'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_detach'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_once'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_key_create'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_attr_setstacksize'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_sigmask'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_mutexattr_settype'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_mutexattr_init'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_join'
/mnt/nand-user/apr/lib/libapr-1.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory `/home/radek/Build/httpd-2.2.10/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/radek/Build/httpd-2.2.10/support'
make: *** [all-recursive] Error 1

我应该怎么办?

相关内容