搜索
bottom↓
回复: 8

i.MX6 arm-fsl-linux-gnueabi编译器编译Sqlite问题【已解决】

[复制链接]

出0入0汤圆

发表于 2014-6-19 14:47:10 | 显示全部楼层 |阅读模式
本帖最后由 bruce_helen 于 2014-6-20 11:30 编辑

开始移植Sqlite到i.MX6上。从网上下载最新的安装包,Sqlite Version 3.8.5
http://www.sqlite.org/download.html

编译器目录已加到环境变量中,在命令行中也能正确识别
echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin

但是在配置时说是没有fsl的编译器,这是什么原因呢?下面为log,注意红色字体。
bruce@ubuntu:~/share/work/sqllite/sqlite-autoconf-3080500$ sudo ./configure --host=arm-fsl-linux-gnueabi --prefix=/home/bruce/share/work/sqllite/sqlite
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-fsl-linux-gnueabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for arm-fsl-linux-gnueabi-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for arm-fsl-linux-gnueabi-gcc... gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for arm-fsl-linux-gnueabi-ranlib... no
checking for ranlib... ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... arm-fsl-linux-gnueabi
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-fsl-linux-gnueabi-dumpbin... no
checking for arm-fsl-linux-gnueabi-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to arm-fsl-linux-gnueabi format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for arm-fsl-linux-gnueabi-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for arm-fsl-linux-gnueabi-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-fsl-linux-gnueabi-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for arm-fsl-linux-gnueabi-strip... strip
checking for arm-fsl-linux-gnueabi-ranlib... ranlib
checking command to parse nm output from gcc object... ok
checking for sysroot... no
checking for arm-fsl-linux-gnueabi-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for fdatasync... yes
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... yes
checking for gmtime_r... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for library containing tgetent... -lcurses
checking for library containing readline... -lreadline
checking for readline... yes
checking for library containing pthread_create... -lpthread
checking for library containing dlopen... -ldl
checking for whether to support dynamic extensions... yes
checking for posix_fallocate... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfiles commands
config.status: executing libtool commands
bruce@ubuntu:~/share/work/sqllite/sqlite-autoconf-3080500$ sudo gedit configure
bruce@ubuntu:~/share/work/sqllite/sqlite-autoconf-3080500$ sudo ./configure --host=arm-fsl-linux-gnueabi --prefix=/home/bruce/share/work/sqllite/sqlite
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-fsl-linux-gnueabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for arm-fsl-linux-gnueabi-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for arm-fsl-linux-gnueabi-gcc... gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for arm-fsl-linux-gnueabi-ranlib... no
checking for ranlib... ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... arm-fsl-linux-gnueabi
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for arm-fsl-linux-gnueabi-dumpbin... no
checking for arm-fsl-linux-gnueabi-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-linux-gnu file names to arm-fsl-linux-gnueabi format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for arm-fsl-linux-gnueabi-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for arm-fsl-linux-gnueabi-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for arm-fsl-linux-gnueabi-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for arm-fsl-linux-gnueabi-strip... strip
checking for arm-fsl-linux-gnueabi-ranlib... ranlib
checking command to parse nm output from gcc object... ok
checking for sysroot... no
checking for arm-fsl-linux-gnueabi-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for fdatasync... yes
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... yes
checking for gmtime_r... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for library containing tgetent... -lcurses
checking for library containing readline... -lreadline
checking for readline... yes
checking for library containing pthread_create... -lpthread
checking for library containing dlopen... -ldl
checking for whether to support dynamic extensions... yes
checking for posix_fallocate... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfiles commands
config.status: executing libtool commands

=======================================================
解决方法:命令配置有些信息没写全。
./configure --host=arm-linux CC=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-gcc AR=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-ar STRIP=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-strip RANLIB=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-linux-ranlib CFLAGS="-mfpu=vfp -Os -lpthread -lrt" LDFLAGS=${LDFLAGS} --prefix=/home/bruce/share/work/sqllite/sqlite

查看文件信息为ARM,正确,下面准备放到板子里测试


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

阿莫论坛20周年了!感谢大家的支持与爱护!!

月入3000的是反美的。收入3万是亲美的。收入30万是移民美国的。收入300万是取得绿卡后回国,教唆那些3000来反美的!

出0入0汤圆

发表于 2014-6-19 14:49:32 | 显示全部楼层
在终端下试试看能不能Tab出编译器命令

出0入0汤圆

发表于 2014-6-19 14:52:06 | 显示全部楼层
查看一下配置脚本啊
以前安装TI SDK的时候老是提示版本不兼容,直接把脚本中的版本检测给去掉了....

出0入0汤圆

 楼主| 发表于 2014-6-19 14:59:51 | 显示全部楼层
Jordan?? 发表于 2014-6-19 14:52
查看一下配置脚本啊
以前安装TI SDK的时候老是提示版本不兼容,直接把脚本中的版本检测给去掉了.... ...

哎,sqlite的配置脚本configure 14000+行,看着眼花,也看不懂。
另外,交叉编译器在命令行中能正常运行。编译其他的软件没有问题。

出0入0汤圆

 楼主| 发表于 2014-6-19 15:02:19 | 显示全部楼层
Jordan?? 发表于 2014-6-19 14:52
查看一下配置脚本啊
以前安装TI SDK的时候老是提示版本不兼容,直接把脚本中的版本检测给去掉了.... ...

这个哥们出现的问题跟我差不多,不过我看不懂他怎么解决的。有时间帮我看看哈
https://github.com/zfsonlinux/spl/issues/344

出0入0汤圆

发表于 2014-6-19 17:11:46 | 显示全部楼层
ARCH_UM="ARCH=arm CC=/home/cyril/Documents/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc LD=/home/cyril/Documents/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-ld"
cross_compiling=yes

出0入0汤圆

 楼主| 发表于 2014-6-19 17:17:02 | 显示全部楼层
Jordan?? 发表于 2014-6-19 17:11
ARCH_UM="ARCH=arm CC=/home/cyril/Documents/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-gcc LD=/h ...

这行代码加到什么地方呢?

出0入0汤圆

发表于 2014-6-19 17:19:29 | 显示全部楼层
configure的脚本参数
还是不行的话那就不知道了

出0入0汤圆

发表于 2015-1-7 08:38:50 | 显示全部楼层
283 也遇到编译器的各种问题
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-4-24 06:05

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表