云心水影 发表于 2017-8-15 10:20:56

IMX6 TSLIB库编译交叉工具检测问题

本帖最后由 云心水影 于 2017-8-15 10:23 编辑

ubuntu12.04,32位版本,编译工具:gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux,在编译时,依据说明书操作如下:
1、指定编译工具:
root@ubuntu:/home/imx6ull/imx6ulltools/tslib# export CC=/home/imx6ull/imx6ulltools/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc-4.9.23
2、 root@ubuntu:/home/imx6ull/imx6ulltools/tslib# ./autogen.sh
3、
root@ubuntu:/home/imx6ull/imx6ulltools/tslib# ./configure --host=arm-linux-gnueabihf --prefix=/usr/local/tslib ac_cv_func_malloc_0_nonnull=yes

configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-gnueabihf-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 arm-linux-gnueabihf-g++... no
checking for arm-linux-gnueabihf-c++... no
checking for arm-linux-gnueabihf-gpp... no
checking for arm-linux-gnueabihf-aCC... no
checking for arm-linux-gnueabihf-CC... no
checking for arm-linux-gnueabihf-cxx... no
checking for arm-linux-gnueabihf-cc++... no
checking for arm-linux-gnueabihf-cl.exe... no
checking for arm-linux-gnueabihf-FCC... no
checking for arm-linux-gnueabihf-KCC... no
checking for arm-linux-gnueabihf-RCC... no
checking for arm-linux-gnueabihf-xlC_r... no
checking for arm-linux-gnueabihf-xlC... no
checking for g++... g++
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 g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for arm-linux-gnueabihf-gcc... /home/myzr/6ul-tools/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc-4.9.23
checking whether we are using the GNU C compiler... no
checking whether /home/myzr/6ul-tools/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc-4.9.23 accepts -g... no
checking for /home/myzr/6ul-tools/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc-4.9.23 option to accept ISO C89... unsupported

依据上面信息:系检测不到交叉编译工具。请版主帮忙一下,谢谢!


软件01 发表于 2017-8-15 10:53:48

export PATH=/home/myzr/6ul-tools/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin:$PATH
arm-linux-gnueabihf-gcc -v
检测到后,再试试,(其他环境变量也设置一下)

云心水影 发表于 2017-8-15 11:09:10

本帖最后由 云心水影 于 2017-8-15 11:10 编辑

这样操作后还是不行:
root@ubuntu:/home/imx6ull/imx6ulltools/tslib# ./configure --host=arm-linux-gnueabihf --prefix=/usr/local/tslib ac_cv_func_malloc_0_nonnull=yes
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-gnueabihf-strip... arm-linux-gnueabihf-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 arm-linux-gnueabihf-g++... arm-linux-gnueabihf-g++
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... yes
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether arm-linux-gnueabihf-g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of arm-linux-gnueabihf-g++... gcc3
checking for arm-linux-gnueabihf-gcc... /home/imx6ull/imx6ulltools/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc-4.9.23
checking whether we are using the GNU C compiler... no

好像能检测到交叉工具,但编译还是用的GUN C++

云心水影 发表于 2017-8-15 12:04:25

tslib移植
编译tslib库
1 解压tslib

unzip tslib-master
2 进入tslib目录,指定交叉编译工具

export CC=/home/myzr/6ul-tools/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc-4.9.23
此处应该是4.9.2,工具包里没有4.9.23.
页: [1]
查看完整版本: IMX6 TSLIB库编译交叉工具检测问题