赞
踩
Apache可移植运行时(Apache Portable Runtime,简称APR)是ApacheHTTP服务器的支持库,提供了一组映射到下层操作系统的API。如果操作系统不支持某个特定的功能,APR将提供一个模拟的实现。这样程序员使用APR编写真正可在不同平台上移植的程序。最初,APR是作为Apache HTTP服务器的一部分而存在的,但是Apache软件基金会将其延伸成一个单独的项目。其他的应用程序可以使用APR来实现平台无关性 (baidu)。
APR包括三个源码包,分别为APR 1.7.0 , APR-util 1.6.1 ,APR iconv 1.2.2
源码下载链接https://apr.apache.org/download.cgi
./configure CC=arm-himix200-linux-gcc --host=arm-himix200-linux --prefix=$PWD/_install ac_cv_file__dev_zero=yes ac_cv_func_setpgrp_void=yes apr_cv_tcp_nodelay_with_cork=yes
make;make install
checking for /dev/zero... configure: error: cannot check for file existence when cross compiling
rm: cannot remove 'libtoolT': No such file or directory
./include/apr_want.h:94:8: error: redefinition of 'struct iovec'
- tools/gen_test_char > include/private/apr_escape_test_char.h
- /bin/sh: tools/gen_test_char: 无法执行二进制文件
- make[1]: *** [include/private/apr_escape_test_char.h] Error 126
接下来就可以完成编译;然后make install,生成目录如下:
bin build-1 include lib
./configure CC=arm-himix200-linux-gcc --host=arm-himix200-linux --prefix=$PWD/_instal --with-apr=$PWD/../apr-1.7.0/_install
make;make install
这个比较顺利,没有报什么错误。
该库需要上面两个安装目录
./configure CC=arm-himix200-linux-gcc --host=arm-himix200-linux --prefix=$PWD/_instal --with-apr=$PWD/../apr-1.7.0/_install --with-apr-iconv=$PWD/../apr-iconv-1.2.2/_install --with-expat=$PWD/../libexpat-master/expat/_install
make;make install
- xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
- #include <expat.h>
由于APR-util需要用到该库,所以也把这个加上。
源码:https://github.com/libexpat/libexpat
编译:
- ./buildconf.sh
-
- ./configure CC=arm-himix200-linux-gcc --host=arm-himix200-linux --prefix=$PWD/_install
-
- make; make install
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。