loongson 1B 开发板移植sqlite3.6.20

loongson 1B 开发板移植sqlite3.6.20,第1张

概述附注:在sqlite 版本为大于3.6.20无需参考本博客 目标平台:loongson 1B 目标开发板架构:mipsel架构 编译平台:ubuntu13.04 交叉工具链:gcc-4.3-ls232-softfloat 在loongson 移植 sqlite3 备注:本文所有 *** 作均在root用户下进行。 解压源码sqlite 3.6.20.tar.gz压缩包,进入sqlite3.6.20文件夹后

附注:在sqlite 版本为大于3.6.20无需参考本博客

目标平台:loongson 1B

目标开发板架构:mipsel架构

编译平台:ubuntu13.04

交叉工具链:gcc-4.3-ls232-softfloat

在loongson 移植 sqlite3

备注:本文所有 *** 作均在root用户下进行。

解压源码sqlite 3.6.20.tar.gz压缩包,进入sqlite3.6.20文件夹后执行:

1)./configure --host=mipsel-linux(指定交叉编译工具链) --prefix=/opt/mispel-linux-sqlite2) make3) make install


在执行make中会出现下面错误:

libtool: link: mipsel-linux-gcc -shared .libs/tclsqlite.o -Wl,-rpath -Wl,/opt/sqlite-3.6.20-embedded/.libs -Wl,/opt/mipsel-linux-sqlite/lib ./.libs/libsqlite3.so -L/opt/tcl8.5.15/unix -ltclstub8.5 -lpthread -Wl,-soname -Wl,libtclsqlite3.so -o .libs/libtclsqlite3.so/opt/gcc-4.3-ls232-softfloat/lib/gcc/mipsel-linux/4.3.0/../../../../mipsel-linux/bin/ld: skipPing incompatible /opt/gcc-4.3-ls232-softfloat/lib/gcc/mipsel-linux/4.3.0/../../../../mipsel-linux/lib/libtclstub8.5.a when searching for -ltclstub8.5/opt/gcc-4.3-ls232-softfloat/lib/gcc/mipsel-linux/4.3.0/../../../../mipsel-linux/bin/ld: cannot find -ltclstub8.5collect2: ld returned 1 exit statusmake: *** [libtclsqlite3.la] 错误 1

出现:skipPing incompatible 一般是不同处理器架构引用了不属于自己处理器架构的库,

上面出现的情况,就是mipsel架构的引用了x86架构的库 libtclstub8.5。

所以要源码交叉编译tclsh才能解决上述问题。

解决方法:解压tcl8.5.15-src.tar.gz,并进入源码文件夹tcl8.5.15

执行:

1)./configure --host=mipsel-linux --prefix=/opt/mipsel-linux-tclsh2) make3) make install



但在 ./configure --host=mipsel-linux --prefix=/opt/mipsel-linux-tclsh

过程中会出现以下错误:

fixstrtod.o: In function `fixstrtod':fixstrtod.c:(.text+0x0): multiple deFinition of `fixstrtod'strtod.o:strtod.c:(.text+0x0): first defined herecollect2:

ld returned 1 exit statusmake: *** [libtcl8.5.so] 错误 1

执行下面语句:

[root@CaM/opt/tcl-embedded/unix 11:45]#export ac_cv_func_strtod=yes[root@CaM/opt/tcl-embedded/unix 11:46]#export tcl_cv_strtod_BUGgy=1


就可以解决了。

编译安装完成后,在mipsel-linux-sqlite目录下分别生成bin、include和lib目录。

将bin/sqlite3与lib/libsqlite3.so.0.8.6分别拷至文件系统/bin目录与/lib目录下,

并将libsqlite3.so.0.8.6更名为libsqlite3.so.0完成移植。

总结

以上是内存溢出为你收集整理的loongson 1B 开发板移植sqlite3.6.20全部内容,希望文章能够帮你解决loongson 1B 开发板移植sqlite3.6.20所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/1172853.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存