交叉编译场景分析(arm-linux)(八)--编译glib
来源:互联网 发布:linux pwd自己实现 编辑:程序博客网 时间:2024/05/01 20:40
转载时请注明出处:http://blog.csdn.net/absurd
1. 基本信息:
软件名称
glib
功能简述
Glib是GNOME的一个基础库,提供基本的容器、算法、对象系统、OSAPI的适配器等。
下载地址
http://www.gtk.org
软件版本
glib-2.8.0.tar.gz
依赖关系
默认
前置条件
源文件位置:$(WORK_DIR)/ glib-2.8.0
2. 过程分析
下载的稳定版本,configure已经存在,直接进行配置:
[root@linux glib-2.8.0]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr
出现了如下错误:
checking for growing stack pointer... configure: error: cannot run test program while cross compiling
原来configure不能为交叉编译检查glib_cv_stack_grows,glib_cv_stack_grows表示堆栈的增长方向。configure无法在目标机上运行测试程序,自然无法检查,只好手工指定。顺便看一下还哪些相关的变量不能检查的,一起写到cache文件中,并重新配置:
[root@linux glib-2.8.0]# echo ac_cv_type_long_long=yes>$ARCH-linux.cache
[root@linux glib-2.8.0]# echo glib_cv_stack_grows=no>>$ARCH-linux.cache
[root@linux glib-2.8.0]# echo glib_cv_uscore=no>>$ARCH-linux.cache
[root@linux glib-2.8.0]# echo ac_cv_func_posix_getpwuid_r=yes>>$ARCH-linux.cache
[root@linux glib-2.8.0]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr --cache-file=$ARCH-linux.cache
这回配置成功了,编译:
[root@linux glib-2.8.0]# make && make install
编译成功!
3. 构建处方
l glib.mk
GLIB_DIR="glib-2.8.0"
all: clean config build
config:
@cd $(GLIB_DIR) && /
echo ac_cv_type_long_long=yes>$$ARCH-linux.cache && /
echo glib_cv_stack_grows=no>>$$ARCH-linux.cache && /
echo glib_cv_uscore=no>>$$ARCH-linux.cache && /
echo ac_cv_func_posix_getpwuid_r=yes>>$$ARCH-linux.cache &&/
./configure --host=$$ARCH-linux --prefix=$$ROOTFS_DIR/usr --cache-file=$$ARCH-linux.cache && /
echo "config done"
build:
@cd $(GLIB_DIR) && /
make && make install && /
echo "build done"
clean:
@cd $(GLIB_DIR) && /
if [ -e Makefile ]; then make distclean; fi && /
- 交叉编译场景分析(arm-linux)(八)--编译glib
- 交叉编译场景分析(arm-linux)(八)--编译glib
- 交叉编译场景分析(arm-linux)(八)--编译glib
- 交叉编译场景分析(arm-linux)(八)--编译glib
- 交叉编译场景分析(arm-linux)(八)--编译glib
- 交叉编译场景分析(arm-linux)(八)--编译glib
- 交叉编译场景分析(arm-linux)(八)--编译glib
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(Arm-Linux)
- 交叉编译场景分析(arm-linux)
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(四)--编译readline和ncurses
- 交叉编译场景分析(arm-linux)(五)--编译libjpeg和libpng
- 每个Java初学者都应该搞懂的六个问题
- 交叉编译场景分析(arm-linux)(六)--编译TinyX
- 交叉编译场景分析(arm-linux)(七)--编译sqlite
- 交叉编译场景分析(arm-linux)(八)--编译glib
- WebLogic如何设置session超时时间
- 猪的凄美爱情故事
- 针对伪装成“熊猫烧香”蠕虫病毒 的解决方案
- 一个简单的WebService服务
- JavaScrip简述
- Paper Outline and a template
- ReportX表格组件2.0a
- 中国程序员会不会给爸爸妈妈磕头