按照正常编译
apr
apr-util
pcre
httpd
都没有问题
换到arm-linux-gnueabihf
apr
apr-util
pcre
都无问题
httpd有问题
设置
sudo ./configure --prefix=/usr/local/apache --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --host=arm-linux-gnueabihf ap_cv_void_ptr_lt_long=no --enable-so --enable-cgi LDFLAGS=-lpthread --with-mpm=prefork
中途替换 x86下 gen_test_char 能继续编译
但是又卡在
htpasswd.c: In function ‘mkrecord’:
htpasswd.c:187:46: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
apr_snprintf(record, (rlen - 1), "password too long (>%"
^
/usr/local/apr/build-1/libtool --silent --mode=link arm-linux-gnueabihf-gcc -g -O2 -L/usr/local/expat/lib -lpthread -o htpasswd htpasswd.lo /usr/local/apr-util/lib/libaprutil-1.la /usr/local/apr/lib/libapr-1.la -lrt -lcrypt -ldl -lcrypt
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ParserCreate'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ParserFree'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetUserData'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_StopParser'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_Parse'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ErrorString'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetElementHandler'
collect2: error: ld returned 1 exit status
Makefile:46: recipe for target 'htpasswd' failed
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory '/home/chenlh/httpd-arm/support'
/home/chenlh/httpd-arm/build/rules.mk:72: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/chenlh/httpd-arm/support'
/home/chenlh/httpd-arm/build/rules.mk:72: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
我上网查了下 实在是解决不了,也试过下面链接中的方法还是一样的报错
https://bbs.csdn.net/topics/392191188