天嵌 ARM开发社区

 找回密码
 注册
查看: 11692|回复: 14

tq210 qt环境安装

[复制链接]
睁一只眼做梦 发表于 2013-4-11 14:36:19 | 显示全部楼层 |阅读模式
Preparing build tree...
You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 2.1 or
the GNU General Public License (GPL) version 3.

Type '3' to view the GNU General Public License version 3.
Type 'L' to view the GNU Lesser General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license?
Creating qmake. Please wait...
gmake: 没有什么可以做的为 `first'。
The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/opt/EmbedSky/qt-4.5/qt-embedded-linux-opensource-src-4.5.0/mkspecs/qws/linux-arm-g++.
Build Qt4.5 library now, please wait ...
gmake: *** 没有指明目标并且找不到 makefile。 停止。
Install Qt4.5 library now, please wait ...
gmake: *** 没有规则可以创建目标“install”。 停止。
root@can-vm:/opt/EmbedSky/qt-4.5#


 楼主| 睁一只眼做梦 发表于 2013-4-11 14:38:14 | 显示全部楼层
之后我去安装tslib
root@can-vm:/opt/qt/tslib# ./configure --host=arm-linux --prefix=/opt/EmbedSky/qt-4.5/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-strip... arm-linux-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-g++... arm-linux-g++
checking whether the C++ compiler works... no
configure: error: in `/opt/qt/tslib':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
 楼主| 睁一只眼做梦 发表于 2013-4-11 14:39:36 | 显示全部楼层
然后是pt-get update
之后
root@can-vm:/opt/source/sd# sudo apt-get install build-essential
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
build-essential 已经是最新的版本了。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 544 个软件包未被升级。
root@can-vm:/opt/source/sd#
 楼主| 睁一只眼做梦 发表于 2013-4-11 14:41:47 | 显示全部楼层
这是qmake.conf,我改了下
#
# qmake configuration for building with arm-linux-g++
#

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = /opt/EmbedSky/4.4.6/bin/arm-embedsky-linux-gnueabi-gcc
QMAKE_CXX               = /opt/EmbedSky/4.4.6/bin/arm-embedsky-linux-gnueabi-g++
QMAKE_LINK              = /opt/EmbedSky/4.4.6/bin/arm-embedsky-linux-gnueabi-g++
QMAKE_LINK_SHLIB        = /opt/EmbedSky/4.4.6/bin/arm-embedsky-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR                = /opt/EmbedSky/4.4.6/bin/arm-embedsky-linux-gnueabi-ar cqs
QMAKE_OBJCOPY           = /opt/EmbedSky/4.4.6/bin/arm-embedsky-linux-gnueabi-objcopy
QMAKE_STRIP             = /opt/EmbedSky/4.4.6/bin/arm-embedsky-linux-gnueabi-strip

load(qt_config)
QMAKE_CFLAGS_RELEASE =   -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
 楼主| 睁一只眼做梦 发表于 2013-4-11 14:44:21 | 显示全部楼层
environment   改后有source /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/EmbedSky/4.4.6/bin"
 楼主| 睁一只眼做梦 发表于 2013-4-11 15:06:39 | 显示全部楼层
用的系统所自带光盘里到ubuntu11.10.想自己不搞安卓,直接用了虚拟机安装(开了vt才行),之前用tq2440到时候在ubuntu 、fedora都装过qt,好像都没这么纠结。
Jangel 发表于 2013-4-11 17:27:35 | 显示全部楼层
lz是否是执行我们的脚本?请贴一下gcc版本号?
 楼主| 睁一只眼做梦 发表于 2013-4-11 17:30:11 | 显示全部楼层
root@can-vm:/opt/source/sd# gcc -v
使用内建 specs。
目标:x86_64-linux-gnu
配置为:../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.6-11ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
线程模型:posix
gcc 版本 4.4.6 (Ubuntu/Linaro 4.4.6-11ubuntu2)
 楼主| 睁一只眼做梦 发表于 2013-4-11 17:32:30 | 显示全部楼层
我是照着教程来到做到。。有执行ubuntu11.10补丁安装脚本
 楼主| 睁一只眼做梦 发表于 2013-4-11 17:47:15 | 显示全部楼层
在执行./arm_qt4.5_build到时候不是说要tslib,
所以我自己去下了tslib1.4来编译,
但在./configure到时候说C++ compiler cannot create executables,
然而我gcc -v g++ -v都有说存在啊,
而且我也在ubuntu里gcc g++编译过c和c++(单个文件),都可以执行到,
百度了一下就这样:
apt-get update,
sudo apt-get install build-essential
我还甚至sudo apt-get install g++
但都提示
build-essential 已经是最新的版本了。
升级了 0 个软件包。。。。
我就没辄了。。求搭救!

 楼主| 睁一只眼做梦 发表于 2013-4-12 10:04:20 | 显示全部楼层
这是编译tslib ./configured 的 部分config.log arm-linux-g++  用不了

configure:3120: checking whether the C++ compiler works
configure:3142: arm-linux-g++    conftest.cpp  >&5
/opt/EmbedSky/4.4.6/lib/gcc/arm-embedsky-linux-gnueabi/4.4.6/../../../../arm-embedsky-linux-gnueabi/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
configure:3146: $? = 1
configure:3184: result: no

但是
root@can-vm:/opt/source/sd# arm-linux-g++ -v
Using built-in specs.
Target: arm-embedsky-linux-gnueabi
Configured with: /opt/EmbedSky/build-croostools/.build/src/gcc-4.4.6/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-embedsky-linux-gnueabi --prefix=/opt/EmbedSky/4.4.6 --with-sysroot=/opt/EmbedSky/4.4.6/arm-embedsky-linux-gnueabi/embedsky --enable-languages=c,c++ --disable-multilib --with-arch=armv7-a --with-cpu=cortex-a8 --with-tune=cortex-a8 --with-fpu=neon --with-float=softfp --with-pkgversion='for TQ210 EmbedSky Tech' --with-bugurl=http://www.embedsky.net --disable-sjlj-exceptions --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --with-gmp=/opt/EmbedSky/build-croostools/.build/arm-embedsky-linux-gnueabi/build/static --with-mpfr=/opt/EmbedSky/build-croostools/.build/arm-embedsky-linux-gnueabi/build/static --with-mpc=/opt/EmbedSky/build-croostools/.build/arm-embedsky-linux-gnueabi/build/static --with-ppl=no --with-cloog=no --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-threads=posix --enable-target-optspace --without-long-double-128 --with-local-prefix=/opt/EmbedSky/4.4.6/arm-embedsky-linux-gnueabi/embedsky --disable-nls --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.4.6 (for TQ210 EmbedSky Tech)

奇怪了,然后我照这里到第一步做也不行
http://blog.csdn.net/lxlj2006/article/details/5823560
,求解?
 楼主| 睁一只眼做梦 发表于 2013-4-12 16:56:15 | 显示全部楼层
In function 'open',
    inlined from 'main' at ts_calibrate.c:230:
/opt/EmbedSky/4.4.6/lib/gcc/arm-embedsky-linux-gnueabi/4.4.6/../../../../arm-embedsky-linux-gnueabi/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
In function 'open',
    inlined from 'main' at ts_calibrate.c:232:
/opt/EmbedSky/4.4.6/lib/gcc/arm-embedsky-linux-gnueabi/4.4.6/../../../../arm-embedsky-linux-gnueabi/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[2]: *** [ts_calibrate.o] 错误 1
make[2]:正在离开目录 `/opt/EmbedSky/qt-4.5/tslib-1.4.1/tests'


gcc 新版本编译器对语法检查严格,在源文件 ./tests/ts_calibrate.c 中
// 源文件
// if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
//     cal_fd = open (calfile, O_CREAT | O_RDWR);
// } else {
//   cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR);
// }
// 需要更改成如下形式
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
    cal_fd = open (calfile, O_CREAT | O_RDWR, 0777);
} else {
    cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR, 0777);
}

保存后重新编译即可
 楼主| 睁一只眼做梦 发表于 2013-4-12 16:58:15 | 显示全部楼层
睁一只眼做梦 发表于 2013-4-12 10:04
这是编译tslib ./configured 的 部分config.log arm-linux-g++  用不了

configure:3120: checking wheth ...

目测是ubuntu11.10补丁没装好。装的时候断了下网。重装搞定了
f117cdh 发表于 2013-4-19 15:57:07 | 显示全部楼层
大神你最后是怎么解决的
 楼主| 睁一只眼做梦 发表于 2013-4-20 13:57:20 | 显示全部楼层
装好ubuntu11.10补丁安装脚本,确定arm-linux-gcc能正常编译c文件,
再编译好tslib,
编译qt的时候设置好tslib的依赖路径,
注意qt的makefie改gmake为make,
source 下环境就可以了。
最好安装系统的时候最好连网更新下
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-5-18 19:42 , Processed in 1.046875 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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