我正在使用SQLite 3来管理我基于ARM9的微处理器中的数据库。
我想要在Linux(Ubuntu 10.04)中为我的项目交叉编译最新版本的SQLite 3。我正在使用arm-none-linux-gnueabi-gcc编译器进行开发。
我尝试使用以下命令进行交叉编译,
下载了sqlite-amalgamation-3.7.0.tar 我解压它,然后在终端上写入以下命令,
它成功地交叉编译了SQLite。
然后,
我怀疑它是否已经正确地进行了交叉编译。 我无法理解。
我在我的板子上插入了库,它工作得很好,但问题是速度变得非常慢。我认为有一些问题,我没有为GCC编译器设置任何标志。
我找不到任何选项。我如何为GCC编译器设置特定的标志,以便可以省略不必要的功能。
我想要在Linux(Ubuntu 10.04)中为我的项目交叉编译最新版本的SQLite 3。我正在使用arm-none-linux-gnueabi-gcc编译器进行开发。
我尝试使用以下命令进行交叉编译,
下载了sqlite-amalgamation-3.7.0.tar 我解压它,然后在终端上写入以下命令,
sudo ./configure --exec-prefix=/media/8CCC8E9BCC8E7F68/SQLIte3/sqliteinstall/ --host=arm --target=arm CC=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-gcc AR=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-ar STRIP=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-strip RANLIB=/opt/arm-2011.03/bin/arm-none-linux-gnueabi-ranlib CFLAGS="-Os"
它成功地交叉编译了SQLite。
然后,
sudo make
命令。
它成功运行。现在执行make install
命令。
它没有给我任何错误,但当我查看config.log文件时,发现有以下一些句子:
1.conftest.c:17:7: error: size of array 'off_t_is_large' is negative
2.conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.
3.conftest.cpp:23:28: error: ac_nonexistent.h: No such file or directory
4.conftest.c:67:13: error: invalid type argument of unary '*' (have 'int')
我怀疑它是否已经正确地进行了交叉编译。 我无法理解。
我在我的板子上插入了库,它工作得很好,但问题是速度变得非常慢。我认为有一些问题,我没有为GCC编译器设置任何标志。
我找不到任何选项。我如何为GCC编译器设置特定的标志,以便可以省略不必要的功能。
./configure
和make
时不要使用sudo
,最后使用sudo make install
。 - Braiam