UBUNTU 10.04环境下交叉编译sqlite3.20.1源码
来源:互联网 发布:windows下安装mysql 编辑:程序博客网 时间:2024/05/14 22:44
1、下载 SQLite3源码
地址:http://www.sqlite.org/download.html
完整版: sqlite-src-3200100.zip (PS: sqlite-autoconf-3200100.tar.gz可以直接configure编译通过, 这里下载完整版编译是为了比较产生的sqlite3.c文件之间的差异)
2、编译
2.1 解码
cd
cd rookie
mkdir 3.20.1-full
cp 源码目录/sqlite-src-3200100.zip ./3.20.1-full
unzip -x sqlite-src-3200100.zip
2.2 配置
然后,在unzip出来的源码目录中
mkdir ../install #创建安装目录
./configure --disable-tcl --host=arm-none-linux-gnueabi --prefix=/coral/rookie/3.20.1-full/install
其中,
--host: 指定交叉编译工具,一般为arm-linux、arm-linux-gnueabihf、arm-none-linux-gnueabi等,具体要和板子用的交叉编译工具对应。
--prefix: 指定安装目录,编译后的文件会全部放在安装目录中。必须是绝对路径
2.3 编译
make
报告如下错误:
tclsh /coral/rookie/3.20.1-full/tool/mksqlite3h.tcl /coral/rookie/3.20.1-full >sqlite3.h
gcc -g -o mkkeywordhash /coral/rookie/3.20.1-full/tool/mkkeywordhash.c
./mkkeywordhash >keywordhash.h
gcc -g -o lemon /coral/rookie/3.20.1-full/tool/lemon.c
cp /coral/rookie/3.20.1-full/tool/lempar.c .
cp /coral/rookie/3.20.1-full/src/parse.y .
rm -f parse.h
./lemon parse.y
mv parse.h parse.h.temp
tclsh /coral/rookie/3.20.1-full/tool/addopcodes.tcl parse.h.temp >parse.h
illegal access mode "rb"
while executing
"open [lindex $argv 0] rb"
invoked from within
"set in [open [lindex $argv 0] rb]"
(file "/coral/rookie/3.20.1-full/tool/addopcodes.tcl" line 9)
make: *** [parse.c] 错误 1
2.4 错误分析
检查ubuntu10.04的环境,确认tcl/tk没有安装
3.安装tcl
3.1 参考博文:ubuntu12.04.4安装tcl/tk和Tkinter( http://blog.csdn.net/cryhelyxx/article/details/22514871 )
./configure
make
报告#pragma GCC错误,按以下方式解决:
3.2 参考博文: http://blog.chinaunix.net/uid-31343710-id-5758107.html ( 貌似是编译器版本太低了,所以我直接将cJSON_AddItemToObjectCS函数中的#pragma GCC注释掉了,没有任何影响 )
注释掉#pragma GCC,编译通过
make
make install
4.再次编译sqlite3.20.1,通过
地址:http://www.sqlite.org/download.html
完整版: sqlite-src-3200100.zip (PS: sqlite-autoconf-3200100.tar.gz可以直接configure编译通过, 这里下载完整版编译是为了比较产生的sqlite3.c文件之间的差异)
2、编译
2.1 解码
cd
cd rookie
mkdir 3.20.1-full
cp 源码目录/sqlite-src-3200100.zip ./3.20.1-full
unzip -x sqlite-src-3200100.zip
2.2 配置
然后,在unzip出来的源码目录中
mkdir ../install #创建安装目录
./configure --disable-tcl --host=arm-none-linux-gnueabi --prefix=/coral/rookie/3.20.1-full/install
其中,
--host: 指定交叉编译工具,一般为arm-linux、arm-linux-gnueabihf、arm-none-linux-gnueabi等,具体要和板子用的交叉编译工具对应。
--prefix: 指定安装目录,编译后的文件会全部放在安装目录中。必须是绝对路径
2.3 编译
make
报告如下错误:
tclsh /coral/rookie/3.20.1-full/tool/mksqlite3h.tcl /coral/rookie/3.20.1-full >sqlite3.h
gcc -g -o mkkeywordhash /coral/rookie/3.20.1-full/tool/mkkeywordhash.c
./mkkeywordhash >keywordhash.h
gcc -g -o lemon /coral/rookie/3.20.1-full/tool/lemon.c
cp /coral/rookie/3.20.1-full/tool/lempar.c .
cp /coral/rookie/3.20.1-full/src/parse.y .
rm -f parse.h
./lemon parse.y
mv parse.h parse.h.temp
tclsh /coral/rookie/3.20.1-full/tool/addopcodes.tcl parse.h.temp >parse.h
illegal access mode "rb"
while executing
"open [lindex $argv 0] rb"
invoked from within
"set in [open [lindex $argv 0] rb]"
(file "/coral/rookie/3.20.1-full/tool/addopcodes.tcl" line 9)
make: *** [parse.c] 错误 1
2.4 错误分析
检查ubuntu10.04的环境,确认tcl/tk没有安装
3.安装tcl
3.1 参考博文:ubuntu12.04.4安装tcl/tk和Tkinter( http://blog.csdn.net/cryhelyxx/article/details/22514871 )
./configure
make
报告#pragma GCC错误,按以下方式解决:
3.2 参考博文: http://blog.chinaunix.net/uid-31343710-id-5758107.html ( 貌似是编译器版本太低了,所以我直接将cJSON_AddItemToObjectCS函数中的#pragma GCC注释掉了,没有任何影响 )
注释掉#pragma GCC,编译通过
make
make install
4.再次编译sqlite3.20.1,通过
阅读全文
0 0
- UBUNTU 10.04环境下交叉编译sqlite3.20.1源码
- ubuntu下交叉编译sqlite3.7.16
- sqlite3 配置交叉编译环境
- sqlite3交叉编译环境配置
- ubuntu 10.04 交叉编译环境
- ubuntu下搭建交叉编译环境
- ubuntu下交叉编译环境搭建
- Ubuntu下安装交叉编译环境
- Ubuntu下安装交叉编译环境
- Ubuntu 下构建 ARM交叉编译环境
- Ubuntu下交叉编译环境安装
- ubuntu下搭建arm交叉编译环境
- Ubuntu下搭建MIPS交叉编译环境
- Ubuntu下ARM交叉编译环境配置
- Ubuntu下搭建MIPS交叉编译环境
- Ubuntu下安装交叉编译环境
- ubuntu下安装交叉编译环境
- Ubuntu下建立交叉编译环境EABI
- 欢迎使用CSDN-markdown编辑器
- 第五周项目3
- Oracle学习笔记
- 3S基础知识:基于MapX的多字段专题饼图的设计
- DUBBO+SPRINGMVC+MYBATIS+EHCACHE+REDIS J2EE分布式架构
- UBUNTU 10.04环境下交叉编译sqlite3.20.1源码
- 使用winsock2.h造成的重定义解决办法
- 多版本Python共存时pip给指定版本的python安装package的方法
- 张量分析初步和矢量恒等式
- Android数据库操作工具类
- 解释器和编译器区别和联系
- 建造者模式
- 【Python NLP入门教程】词频统计和处理停用词,可视化
- Makefile十八之更新函数库