• 7930阅读
  • 6回复

[建议]qt 4.8.6 移植到海思平台,编译源码出错 [复制链接]

上一主题 下一主题
离线qq137479872
 

只看楼主 倒序阅读 楼主  发表于: 2014-12-10
如题 需要编译生成相应的qt库,但是make的时候出错,各种方法都尝试了,还是没有头绪,望大神能指点迷津!
以下是具体步骤:下载qt源码:qt-everywhere-opensource-src-4.8.6.tar.gz。
解压、放到/usr/local/目录下:/usr/local/qt-everywhere-opensource-src-4.8.6。
配置海思交叉编译工具路径:export PATH=/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/usr/bin:$PATH
修改qmake配置文件/usr/local/qt-everywhere-opensource-src-4.8.6/mkspecs/qws/linux-arm-g++下的qmake.conf:

# modifications to g++.conf
QMAKE_CC                = arm-linux-gcc
QMAKE_CXX               = arm-linux-g++
QMAKE_LINK              = arm-linux-g++
QMAKE_LINK_SHLIB        = arm-linux-g++
# modifications to linux.conf
QMAKE_AR                = arm-linux-ar cqs
QMAKE_OBJCOPY           = arm-linux-objcopy
QMAKE_STRIP             = arm-linux-strip
修改为:

# modifications to g++.conf
QMAKE_CC                = arm-hismall-linux-gcc
QMAKE_CXX               = arm-hismall-linux-g++
QMAKE_LINK              = arm-hismall-linux-g++
QMAKE_LINK_SHLIB        = arm-hismall-linux-g++
# modifications to linux.conf
QMAKE_AR                = arm-hismall-linux-ar cqs
QMAKE_OBJCOPY           = arm-hismall-linux-objcopy
QMAKE_STRIP             = arm-hismall-linux-strip
准备工作完成,开始运行配置文件并裁剪qt库:

./configure -embedded arm -xplatform qws/linux-arm-g++ -release -opensource  -fast  -stl -no-accessibility  -no-scripttools  -no-mmx  -no-multimedia  -no-svg  -no-3dnow  -no-sse  -no-sse2  -no-libmng  -no-libtiff  -no-multimedia  -silent  -qt-libpng  -qt-libjpeg  -make libs  -nomake tools -nomake examples -nomake docs  -nomake demos -nomake translations -no-nis -no-cups -no-iconv  -no-dbus  -no-openssl  -little-endian -qt-freetype  -depths all -qt-gfx-linuxfb  -no-gfx-transformed  -no-gfx-multiscreen  -no-gfx-vnc  -no-gfx-qvfb  -qt-kbd-linuxinput  -no-glib  -no-phonon -no-phonon-backend -no-webkit -no-javascript-jit -no-sql-db2  -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-sqlite_symbian -no-sql-symsql  -no-sql-tds -no-qt3support -qt-mouse-linuxinput -no-mouse-linuxtp -no-script -no-largefile
(这里因为没有用到触摸屏所以没有配置tslib库,不知道是不是这个原因)
ok,配置完成!接着运行make命令,编译qt源码,出现下列错误
  1. make[1]: Entering directory `/usr/local/qt-everywhere-opensource-src-4.8.6/src/corelib'
  2. arm-hismall-linux-g++ -c -pipe -fno-exceptions -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER=\"/lib/ld-linux.so.2\" -DHB_EXPORT=Q_CORE_EXPORT -I/qws/linux-arm-g++ -I. -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp
  3. In file included from animation/qabstractanimation.cpp:145:
  4. animation/qabstractanimation.h:45:28: QtCore/qobject.h: No such file or directory
  5. In file included from animation/qabstractanimation.cpp:145:
  6. animation/qabstractanimation.h:47: error: `QT_BEGIN_HEADER' does not name a type
  7. animation/qabstractanimation.h:60: error: invalid function declaration
  8. animation/qabstractanimation.h:137: error: invalid function declaration
  9. animation/qabstractanimation.h:168: error: `QT_END_NAMESPACE' does not name a type
  10. In file included from animation/qabstractanimation.cpp:146:
  11. animation/qanimationgroup.h:45:39: QtCore/qabstractanimation.h: No such file or directory
  12. In file included from animation/qabstractanimation.cpp:146:
  13. animation/qanimationgroup.h:56: error: invalid function declaration
  14. animation/qanimationgroup.h:84: error: `QT_END_NAMESPACE' does not name a type
  15. animation/qabstractanimation.cpp:148:27: QtCore/qdebug.h: No such file or directory
  16. In file included from animation/qabstractanimation.cpp:150:
  17. animation/qabstractanimation_p.h:56:32: QtCore/qbasictimer.h: No such file or directory
  18. animation/qabstractanimation_p.h:57:30: QtCore/qdatetime.h: No such file or directory
  19. animation/qabstractanimation_p.h:58:27: QtCore/qtimer.h: No such file or directory
  20. animation/qabstractanimation_p.h:59:34: QtCore/qelapsedtimer.h: No such file or directory
  21. ....(后面错误太多不贴了,就是说qt的路径不对,但是手动在makefile里面添加路径,又提示moc_qabstractanimation.cpp:No such file or directory)
受困几天了,一直没有找到原因,望大神指点指点啊!
离线qq137479872

只看该作者 1楼 发表于: 2014-12-10
求帮忙啊
离线qq137479872

只看该作者 2楼 发表于: 2014-12-10
求帮忙啊
本帖提到的人: @XChinux @foruok
离线qq137479872

只看该作者 3楼 发表于: 2014-12-10
呵呵,没人理我,不过问题解决了
离线gongyuan073

只看该作者 4楼 发表于: 2014-12-15
美女能讲解一下么 多谢~
离线qq137479872

只看该作者 5楼 发表于: 2014-12-16
请问你也遇到相同的问题了吗?
离线fcymk2

只看该作者 6楼 发表于: 2014-12-19
回 qq137479872 的帖子
qq137479872:请问你也遇到相同的问题了吗? (2014-12-16 14:50) 

能把怎么解决的讲下么...感谢....

最近也要移植海思平台了...
快速回复
限100 字节
 
上一个 下一个