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

2020-02-20 19:54发布

本帖最后由 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,注意红 {MOD}字体。
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
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
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,正确,下面准备放到板子里测试
clipboard.png (59.5 KB, 下载次数: 0) 下载附件 2014-6-20 11:30 上传

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
8条回答
Jordan??
1楼-- · 2020-02-20 21:41
在终端下试试看能不能Tab出编译器命令
Jordan??
2楼-- · 2020-02-20 21:48
查看一下配置脚本啊
以前安装TI SDK的时候老是提示版本不兼容,直接把脚本中的版本检测给去掉了....
bruce_helen
3楼-- · 2020-02-21 00:54
Jordan?? 发表于 2014-6-19 14:52
查看一下配置脚本啊
以前安装TI SDK的时候老是提示版本不兼容,直接把脚本中的版本检测给去掉了.... ...

哎,sqlite的配置脚本configure 14000+行,看着眼花,也看不懂。
另外,交叉编译器在命令行中能正常运行。编译其他的软件没有问题。
bruce_helen
4楼-- · 2020-02-21 02:27
 精彩回答 2  元偷偷看……
Jordan??
5楼-- · 2020-02-21 06:00
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
bruce_helen
6楼-- · 2020-02-21 08:47
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 ...

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

一周热门 更多>