ubuntu11.04编译TQ2440 Qt2.2.0 成功
2013-12-07 10:49
288 查看
转:http://blog.csdn.net/xuehui869/article/details/8958311
运行主机:ubuntu 32位 11.04
QT版本:2.2.0
开发板:TQ2440
源码安装路径(修改相关脚本x86-qtopia-2.2.0_build等,摈弃了解压缩后的文件都放在/opt/EmbedSky/Qte的问题):/opt/newSSD/tq2440/source/Qte
GCC版本:3.4.4
说明:鉴于网上的讨论-------------------ubuntu11.04自带的gcc4.5.2编译Qt2.2.0会出现很多问题,所以把GCC的版本降低,出现的错误大大减少。参考文献:http://jinsuo2007.blog.163.com/blog/static/1922799520104137259556/
1. 安装GCC(包含G++)3.4.4
安装方法参考《ubuntu10.4系统下GCC降级安装》
下载地址http://mirror.bjtu.edu.cn/gnu/gcc/gcc-3.4.4/
先解压
$ ./configure --prefix=/opt/newSSD/tq2440/compile/gcc-3.4.4/ --mandir=/opt/newSSD/tq2440/compile/gcc-3.4.4/share/man --infodir=/opt/newSSD/tq2440/compile/gcc-3.4.4/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++
$ make && make install
2. 编译错误
错误:asm/page.h:没有那个文件或目录 In file included from kernel/qgfx_qws.h:39,
解决办法:
http://tensing.blog.sohu.com/114887954.html
从linux2.6.25.8拷贝出linux-2.6.25.8/include/asm-x86/page.h放在/usr/include/asm目录下即可
3. 编译出现错误:
/usr/bin/ld: cannot find -luuid
/usr/bin/ld: cannot find -lqte
collect2: ld 返回 1
make[5]: *** [../../../lib/libqpe.so.1.5.3] 错误 1
make[5]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src/libraries/qtopia'
make[4]: *** [all] 错误 2
make[4]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src/libraries/qtopia'
make[3]: *** [sub-libraries-qtopia] 错误 2
make[3]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src'
make[2]: *** [all] 错误 2
make[2]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src'
make[1]: *** [all] 错误 2
make[1]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia'
解决方法:http://blog.csdn.net/mimicock1234/article/details/7402453
$locate libuuid
/lib/i386-linux-gnu/libuuid.so.1
/lib/i386-linux-gnu/libuuid.so.1.3.0
$ln -sf /lib/i386-linux-gnu/libuuid.so.1.3.0 /usr/lib/libuuid.so
4. 错误
/usr/lib/libGLU.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4'
/usr/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `__gxx_personality_v0@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `operator delete[](void*)@GLIBCXX_3.4'
/usr/lib/libGLU.so: undefined reference to `operator new(unsigned int)@GLIBCXX_3.4'
/usr/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__class_type_info@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `operator new[](unsigned int)@GLIBCXX_3.4'
collect2: ld 返回 1
make[1]: *** [../../../bin/lrelease] 错误 1
make[1]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/dqt/tools/linguist/lrelease'
-----------------------这个问题不影响编译
5.
videocaptureview.cpp:54:28: linux/videodev.h:没有那个文件或目录
videocaptureview.cpp:90: 错误: field `caps' has incomplete type
videocaptureview.cpp:91: 错误: field `mbuf' has incomplete type
解决办法: http://blog.csdn.net/r91987/article/details/6849730
$apt-get install libv4l-dev
$ vi x86-qtopia-2.2.0/qtopia/src/applications/camera/videocaptureview.cpp
#include <linux/videodev.h>
替换为
#include <libv4l1-videodev.h>
6.
opt/EmbedSky/Qte/pro/build
mv: 无法获取"pro" 的文件状态(stat): 没有那个文件或目录
Build user program , please wait ...
./x86-qtopia-2.2.0_build: 第 45 行: cd: x86-qtopia-2.2.0/pro: 没有那个文件或目录
./x86-qtopia-2.2.0_build: 行 46: ./build: 没有那个文件或目录
解决办法:
发现原因是x86-qtopia-2.2.0_build脚本里的解压路径不对,改正即可。
------------------------------以下,Qt就可以运行了。
7.
qpe运行时
qpe: error while loading shared libraries: libqtopia2.so.2: cannot open shared object file: No such file or directory。。。。。
http://blog.csdn.net/chenah/article/details/5216308
解决办法:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/lib
运行主机:ubuntu 32位 11.04
QT版本:2.2.0
开发板:TQ2440
源码安装路径(修改相关脚本x86-qtopia-2.2.0_build等,摈弃了解压缩后的文件都放在/opt/EmbedSky/Qte的问题):/opt/newSSD/tq2440/source/Qte
GCC版本:3.4.4
说明:鉴于网上的讨论-------------------ubuntu11.04自带的gcc4.5.2编译Qt2.2.0会出现很多问题,所以把GCC的版本降低,出现的错误大大减少。参考文献:http://jinsuo2007.blog.163.com/blog/static/1922799520104137259556/
1. 安装GCC(包含G++)3.4.4
安装方法参考《ubuntu10.4系统下GCC降级安装》
下载地址http://mirror.bjtu.edu.cn/gnu/gcc/gcc-3.4.4/
先解压
$ ./configure --prefix=/opt/newSSD/tq2440/compile/gcc-3.4.4/ --mandir=/opt/newSSD/tq2440/compile/gcc-3.4.4/share/man --infodir=/opt/newSSD/tq2440/compile/gcc-3.4.4/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++
$ make && make install
2. 编译错误
错误:asm/page.h:没有那个文件或目录 In file included from kernel/qgfx_qws.h:39,
解决办法:
http://tensing.blog.sohu.com/114887954.html
从linux2.6.25.8拷贝出linux-2.6.25.8/include/asm-x86/page.h放在/usr/include/asm目录下即可
3. 编译出现错误:
/usr/bin/ld: cannot find -luuid
/usr/bin/ld: cannot find -lqte
collect2: ld 返回 1
make[5]: *** [../../../lib/libqpe.so.1.5.3] 错误 1
make[5]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src/libraries/qtopia'
make[4]: *** [all] 错误 2
make[4]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src/libraries/qtopia'
make[3]: *** [sub-libraries-qtopia] 错误 2
make[3]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src'
make[2]: *** [all] 错误 2
make[2]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia/src'
make[1]: *** [all] 错误 2
make[1]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/qtopia'
解决方法:http://blog.csdn.net/mimicock1234/article/details/7402453
$locate libuuid
/lib/i386-linux-gnu/libuuid.so.1
/lib/i386-linux-gnu/libuuid.so.1.3.0
$ln -sf /lib/i386-linux-gnu/libuuid.so.1.3.0 /usr/lib/libuuid.so
4. 错误
/usr/lib/libGLU.so: undefined reference to `operator delete(void*)@GLIBCXX_3.4'
/usr/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `__gxx_personality_v0@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `operator delete[](void*)@GLIBCXX_3.4'
/usr/lib/libGLU.so: undefined reference to `operator new(unsigned int)@GLIBCXX_3.4'
/usr/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `__cxa_pure_virtual@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `vtable for __cxxabiv1::__class_type_info@CXXABI_1.3'
/usr/lib/libGLU.so: undefined reference to `operator new[](unsigned int)@GLIBCXX_3.4'
collect2: ld 返回 1
make[1]: *** [../../../bin/lrelease] 错误 1
make[1]:正在离开目录 `/opt/newSSD/tq2440/source/Qte/x86-qtopia-2.2.0/dqt/tools/linguist/lrelease'
-----------------------这个问题不影响编译
5.
videocaptureview.cpp:54:28: linux/videodev.h:没有那个文件或目录
videocaptureview.cpp:90: 错误: field `caps' has incomplete type
videocaptureview.cpp:91: 错误: field `mbuf' has incomplete type
解决办法: http://blog.csdn.net/r91987/article/details/6849730
$apt-get install libv4l-dev
$ vi x86-qtopia-2.2.0/qtopia/src/applications/camera/videocaptureview.cpp
#include <linux/videodev.h>
替换为
#include <libv4l1-videodev.h>
6.
opt/EmbedSky/Qte/pro/build
mv: 无法获取"pro" 的文件状态(stat): 没有那个文件或目录
Build user program , please wait ...
./x86-qtopia-2.2.0_build: 第 45 行: cd: x86-qtopia-2.2.0/pro: 没有那个文件或目录
./x86-qtopia-2.2.0_build: 行 46: ./build: 没有那个文件或目录
解决办法:
发现原因是x86-qtopia-2.2.0_build脚本里的解压路径不对,改正即可。
------------------------------以下,Qt就可以运行了。
7.
qpe运行时
qpe: error while loading shared libraries: libqtopia2.so.2: cannot open shared object file: No such file or directory。。。。。
http://blog.csdn.net/chenah/article/details/5216308
解决办法:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/EmbedSky/Qte/x86-qtopia-2.2.0/qtopia/lib
相关文章推荐
- ubuntu11.04编译TQ2440 Qt2.2.0 成功
- 天嵌TQ210在ubuntu11.04的opencv2.2.0(ARM)的编译遇到的问题
- windows7 VS2010 OpenCV2.2.0 TBB CMake 2.8.4编译配置成功
- 在linux下qt中使用pjsip编译成功
- 【Qt】Qt程序编译成功,执行时报错:程序异常结束,crashed
- QT 自带例程编译不成功解决办法
- Ubuntu,TQ2440,arm-linux,Qt交叉编译环境配置
- windows7 VS2010 OpenCV2.2.0 TBB CMake 2.8.4编译配置成功
- windows下编译qt的mysql驱动,终于成功了,一定记录下
- QT5.4.2静态编译(包含QtWebKit),在VS2013上创建项目,并成功运行
- Qt使用虚拟机windows共享目录调用第三方库编译不成功
- 终于编译好了qt的oracle驱动QOCI,连接成功!!!
- fc4下成功编译qt-x11-2.3.2 qt-embedded-2.3.10 qtopia-2.1.1 tmake-1.13
- qt2.2.0 X86版本和arm版本的编译和运行
- ubuntu11.04下QT4.7+OpenCV2.2开发环境搭建成功,成功打开并显示图片
- 交叉编译tslib1.4过程详述,配合QT4.5.3成功在Mini2440运行成功
- 在fedora9 x86_64上编译arm qt2.2.0
- [整理]ubuntu10.10编译TQ2440的x86-qtopia-2.2.0编译问题解决精简版
- tq2440编译ARM版本的Qt4出错问题解决
- [整理]ubuntu10.10编译TQ2440的x86-qtopia-2.2.0具体问题总结及原因分析