交叉编译场景分析(arm-linux)(七)--编译sqlite
2007-11-10 17:20
441 查看
导读:
交叉编译场景分析(arm-linux)(七)--编译sqlite
转载时请注明出处:http://blog.csdn.net/absurd
1. 基本信息:
软件名称 sqlite
功能简述 sqlite 是一个针对嵌入式系统设计的数据库管理系统 (DBMS) ,实现了 SQL92 的基本功能, ARM 版的可执行文件约 300K.
下载地址 http://www.sqlite.org/ 软件版本 sqlite-3.3.4.tar.gz
依赖关系 默认
readline
前置条件 源文件位置: $(WORK_DIR)/ sqlite-3.3.4
2. 过程分析
下载的稳定版本,configure已经存在,直接进行配置:
[root@linux sqlite-3.3.4]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr
出现了如下错误:
configure: error: unable to find a compiler for building build tools
前面检查arm-linux-gcc都通过了,怎么还说没有找到编译器呢?花了点时间看configure的脚本,太复杂了,又结合configure.ac看了一下。原来是要设置config_TARGET_CC和config_BUILD_CC两个环境变量。config_TARGET_CC是交叉编译器,config_BUILD_CC是主机编译器。重来:
[root@linux sqlite-3.3.4]# export config_BUILD_CC=gcc
[root@linux sqlite-3.3.4]# export config_TARGET_CC=arm-linux-gcc
[root@linux sqlite-3.3.4]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr
出现了如下错误:
checking for /usr/include/readline.h... configure: error: cannot check for file existence when cross compiling
readline我们已经编译过了,readline.h是肯定存在,没有必要检查。还是施展我们欺骗大法吧,在cache文件里设置ac_cv_header_readline_h=yes,骗过configure脚本:
[root@linux sqlite-3.3.4]# echo ac_cv_header_readline_h=yes >$ARCH-linux.cache
[root@linux sqlite-3.3.4]#./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr --cache-file=$ARCH-linux.cache
这回配置成功了,编译:
[root@linux sqlite-3.3.4]# make &&make install
有的机器上会出现下列错误:
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
这时检查一下libtool里的CC变量是否设置为arm-linux-gcc,如果不是,可以手工改过来,或者设置环境变量lt_compiler=arm-linux-gcc,重新配置一下。
OK,经过几番周折,终于编译过去了。
3. 构建处方
l sqlite.mk
SQLITE_DIR="sqlite-3.3.4"
all: clean config build
config:
@cd $(SQLITE_DIR) &&/
export config_BUILD_CC=gcc &&/
export config_TARGET_CC=arm-linux-gcc &&/
echo ac_cv_header_readline_h=yes >$$ARCH-linux.cache &&/
./configure --host=$$ARCH-linux --prefix=$$ROOTFS_DIR/usr --cache-file=$$ARCH-linux.cache &&/
echo "config done"
build:
@cd $(SQLITE_DIR) &&/
make &&make install &&/
echo "build done"
clean:
@cd $(SQLITE_DIR) &&/
if [ -e Makefile ]; then make distclean; fi &&/
echo "clean done"
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=646988
本文转自
http://blog.csdn.net/absurd/archive/2006/04/01/646988.aspx
交叉编译场景分析(arm-linux)(七)--编译sqlite
转载时请注明出处:http://blog.csdn.net/absurd
1. 基本信息:
软件名称 sqlite
功能简述 sqlite 是一个针对嵌入式系统设计的数据库管理系统 (DBMS) ,实现了 SQL92 的基本功能, ARM 版的可执行文件约 300K.
下载地址 http://www.sqlite.org/ 软件版本 sqlite-3.3.4.tar.gz
依赖关系 默认
readline
前置条件 源文件位置: $(WORK_DIR)/ sqlite-3.3.4
2. 过程分析
下载的稳定版本,configure已经存在,直接进行配置:
[root@linux sqlite-3.3.4]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr
出现了如下错误:
configure: error: unable to find a compiler for building build tools
前面检查arm-linux-gcc都通过了,怎么还说没有找到编译器呢?花了点时间看configure的脚本,太复杂了,又结合configure.ac看了一下。原来是要设置config_TARGET_CC和config_BUILD_CC两个环境变量。config_TARGET_CC是交叉编译器,config_BUILD_CC是主机编译器。重来:
[root@linux sqlite-3.3.4]# export config_BUILD_CC=gcc
[root@linux sqlite-3.3.4]# export config_TARGET_CC=arm-linux-gcc
[root@linux sqlite-3.3.4]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr
出现了如下错误:
checking for /usr/include/readline.h... configure: error: cannot check for file existence when cross compiling
readline我们已经编译过了,readline.h是肯定存在,没有必要检查。还是施展我们欺骗大法吧,在cache文件里设置ac_cv_header_readline_h=yes,骗过configure脚本:
[root@linux sqlite-3.3.4]# echo ac_cv_header_readline_h=yes >$ARCH-linux.cache
[root@linux sqlite-3.3.4]#./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr --cache-file=$ARCH-linux.cache
这回配置成功了,编译:
[root@linux sqlite-3.3.4]# make &&make install
有的机器上会出现下列错误:
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
这时检查一下libtool里的CC变量是否设置为arm-linux-gcc,如果不是,可以手工改过来,或者设置环境变量lt_compiler=arm-linux-gcc,重新配置一下。
OK,经过几番周折,终于编译过去了。
3. 构建处方
l sqlite.mk
SQLITE_DIR="sqlite-3.3.4"
all: clean config build
config:
@cd $(SQLITE_DIR) &&/
export config_BUILD_CC=gcc &&/
export config_TARGET_CC=arm-linux-gcc &&/
echo ac_cv_header_readline_h=yes >$$ARCH-linux.cache &&/
./configure --host=$$ARCH-linux --prefix=$$ROOTFS_DIR/usr --cache-file=$$ARCH-linux.cache &&/
echo "config done"
build:
@cd $(SQLITE_DIR) &&/
make &&make install &&/
echo "build done"
clean:
@cd $(SQLITE_DIR) &&/
if [ -e Makefile ]; then make distclean; fi &&/
echo "clean done"
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=646988
本文转自
http://blog.csdn.net/absurd/archive/2006/04/01/646988.aspx
相关文章推荐
- 交叉编译场景分析(arm-linux)(七)--编译sqlite
- 交叉编译场景分析(arm-linux)(七)--编译sqlite
- 交叉编译场景分析(arm-linux)(七)--编译sqlite
- 交叉编译场景分析(arm-linux)(七)--编译sqlite
- 交叉编译场景分析(arm-linux)(七)--编译sqlite
- 交叉编译场景分析(arm-linux)(六)--编译TinyX
- 交叉编译场景分析(arm-linux)(四)--编译readline和ncurses
- 交叉编译场景(arm-linux)分析(转载)
- 交叉编译场景分析(arm-linux)(一)--基本知识
- 交叉编译场景分析(arm-linux)(六)--编译TinyX
- 交叉编译场景分析(arm-linux)
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(三)--编译zlib
- 交叉编译场景分析(arm-linux)(二)--编译tslib
- 交叉编译场景分析(arm-linux)(四)--编译readline和ncurses
- 交叉编译场景分析(Arm-Linux)
- 交叉编译场景分析(arm-linux)--序
- 交叉编译场景分析(arm-linux)(八)--编译glib