近日将QtEmbedded库的版本由4.7.0更新到4.7.4.工具链并未改变,仍为

Target: arm-none-linux-gnueabi
Configured with: ......
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)

所有依赖的库根据需要重新下载最新版本编译。现将在此过程中出现的问题及解决方法列出,以供下次移植时参考。

1.browser程序重新编译,在开发板的命令行运行:
./browser -display "LinuxFB:/dev/fb1" -geometry 1920x1080 -qws
 www.baidu.com &

a.第1次错误
-----------------------------------------------------------------------------
./browser: error while loading shared libraries: libqtsingleapplication.so.1: cannot open shared object file: No such file or directory
-----------------------------------------------------------------------------

拷贝libqtsingleapplication.so.1库到/nand1/lib中消除了这个问题

b.第2次错误
-----------------------------------------------------------------------------
 QFontDatabase: Cannot find font directory /usr/local/arm/qte4.7.4/lib/fonts - is Qt installed correctly?
-----------------------------------------------------------------------------

在目录/nand1/allapp/browser下建立qt.conf文件,文件内容
-----------------------------------------------------------------------------
[Paths]
Prefix = /usr/qte-4.7.4
Translations = share/qtopia/translations
Plugins = lib/qtopia/plugins
Libraries = lib
#Headers = include/qtopia
-----------------------------------------------------------------------------

页在/usr/qte-4.7.4下只是建立到nand1相应目录的链接,
------------------------------------------------------------------------------
/usr/qte-4.7.4 # ls -l
lrwxrwxrwx    1 root     0              10 Jan  1  1970 etc -> /nand1/etc
lrwxrwxrwx    1 root     0              10 Jan  1  1970 lib -> /nand1/lib
lrwxrwxrwx    1 root     0              14 Jan  1  1970 libexec -> /nand1/libexec
lrwxrwxrwx    1 root     0              11 Jan  1  1970 sbin -> /nand1/sbin
lrwxrwxrwx    1 root     0              12 Jan  1  1970 share -> /nand1/share
lrwxrwxrwx    1 root     0              10 Jan  1  1970 ssl -> /nand1/ssl
lrwxrwxrwx    1 root     0              19 Jan  1  1970 translations -> /nand1/translations
lrwxrwxrwx    1 root     0              10 Jan  1  1970 var -> /nand1/var
------------------------------------------------------------------------------

c.第3次错误
------------------------------------------------------------------------------
/nand1/allapp/browser # LinuxFB: driver not found
------------------------------------------------------------------------------
在编译QtEmbedded时的配置参数是:

./configure -opensource -confirm-license -release \
-prefix /usr/local/arm/qte4.7.4 \
-webkit -qt-zlib \
-xplatform qws/linux-arm-gnueabi-g++ -embedded armv6 \
-qt-kbd-linuxinput -qt-mouse-linuxinput -plugin-gfx-linuxfb \
-nomake demos -nomake examples -nomake tools -nomake test -fast \
-L /usr/local/arm/lib -I /usr/local/arm/include

增加上-qt-gfx-linuxfb,去除-plugin-gfx-linuxfb

=================================================================================
./configure -opensource -confirm-license -release \
-prefix /usr/local/arm/qte4.7.4 \
-webkit -qt-zlib \
-xplatform qws/linux-arm-gnueabi-g++ -embedded armv6 \
-qt-kbd-linuxinput -qt-mouse-linuxinput -qt-gfx-linuxfb \
-nomake demos -nomake examples -nomake tools -nomake test -fast \
-L /usr/local/arm/lib -I /usr/local/arm/include
=================================================================================

对与LinuxFb相关的配置项

----------------------------------------------------------------------------------
-qt-gfx-<driver> … Enable a graphics <driver> in the QtGui library.
Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ]

-plugin-gfx-<driver> Enable graphics <driver> as a plugin to be
linked to at run time.
Possible values for <driver>: [  ahi directfb hybrid linuxfb powervr qvfb transformed vnc ]

-no-gfx-<driver> … Disable graphics <driver> entirely.
Possible values for <driver>: [ linuxfb transformed qvfb vnc multiscreen ]

-----------------------------------------------------------------------------------

再次编译QtEmbedded时的信息:

-----------------------------------------------------------------------------------

Building on:   qws/linux-x86-g++
Building for:  qws/linux-arm-gnueabi-g++
Architecture:  armv6
Host architecture: i386

Build .................. libs docs translations
Configuration ..........  cross_compile release shared dll embedded largefile stl precompile_header exceptions_off  minimal-config small-config medium-config large-config full-config qt3support accessibility embedded reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify png freetype zlib nis multimedia audio-backend svg script scripttools declarative release
Debug .................. no
Qt 3 compatibility ..... yes
QtDBus module .......... no
QtConcurrent code ...... yes
QtGui module ........... yes
QtScript module ........ yes
QtScriptTools module ... yes
QtXmlPatterns module ... no
Phonon module .......... no
Multimedia module ...... auto
SVG module ............. yes
WebKit module .......... yes
JavaScriptCore JIT ..... To be decided by JavaScriptCore
Declarative module ..... yes
Declarative debugging ...yes
Support for S60 ........ no
Symbian DEF files ...... no
STL support ............ yes
PCH support ............ yes
MMX/3DNOW/SSE/SSE2/SSE3. no/no/no/no/no
SSSE3/SSE4.1/SSE4.2..... no/no/no
AVX..................... no
iWMMXt support ......... no
NEON support ........... no
IPv6 support ........... yes
IPv6 ifname support .... yes
getaddrinfo support .... yes
getifaddrs support ..... yes
Accessibility .......... yes
NIS support ............ yes
CUPS support ........... no
Iconv support .......... no
Glib support ........... no
GStreamer support ...... no
PulseAudio support ..... no
Large File support ..... yes
GIF support ............ plugin
TIFF support ........... plugin (qt)
JPEG support ........... plugin (qt)
PNG support ............ yes (qt)
MNG support ............ plugin (qt)
zlib support ........... yes
Session management ..... no
Embedded support ....... armv6
Freetype2 support ...... auto (yes)
Graphics (qt) .......... linuxfb multiscreen linuxfb
Graphics (plugin) ......
Decorations (qt) ....... styled windows default
Decorations (plugin) ...
Keyboard driver (qt) ... tty linuxinput
Keyboard driver (plugin) ..
Mouse driver (qt) ...... pc linuxtp linuxinput
Mouse driver (plugin) ..
OpenGL support ......... no
OpenVG support ......... no
SQLite support ......... plugin (qt)
OpenSSL support ........ no
Alsa support ........... no
ICD support ............ no

-----------------------------------------------------------------------------------

d.第4次错误
再次运行,这次不再报inuxFB: driver not found.上次的问题得到解决
但由于缺必需的libweboxj.so,需要编译weboxjlib工程,生成so文件

$qmake weboxjlib.pro -r -spec /usr/local/arm/qte4.7.4/mkspecs/qws/linux-arm-gnueabi-g++
$make
出现下面错误:
---------------------------------------------------------------------------------
bookmarksdrv.h:8:27: error: libxml/parser.h: No such file or directory
bookmarksdrv.h:9:26: error: libxml/xpath.h: No such file or directory
In file included from weboxjlib.cpp:14:
----------------------------------------------------------------------------------

从信息中可看出,需要交叉编译libxml2库
我编译的版本是libxml2-2.7.8.tar.gz,交叉编译支持很好,只要在configure时设置正确的--host就搞定了
交叉编译安装后,问题解决,当然要修改weboxjlib.pro文件中的INCLUDEPATH路径,添加安装的libxml2的头文件路径

e.第5次错误
---------------------------------------------------------------------------------
mycurl.cpp:4:24: error: curl/multi.h: No such file or directory
mycurl.cpp: In member function 'void DownloadThread::init_easy_curl(CURLM*, my_curl_quest*)':
mycurl.cpp:33: error: 'CURL' was not declared in this scope
---------------------------------------------------------------------------------
这次是Curl库未交叉编译过,
下载curl-7.22.0.tar.bz2源码包进行交叉编译并安装

f.第6次错误
---------------------------------------------------------------------------------
des3drv.cpp:3:25: error: openssl/des.h: No such file or directory
des3drv.cpp: In member function 'void Des3Drv::Des3Encrypt(const QString&, const QString&, QString&)':
des3drv.cpp:103: error: 'DES_key_schedule' was not declared in this scope
---------------------------------------------------------------------------------
是openssl库未交叉编译
下载openssl-1.0.0e.tar.gz源码包
openssl对交叉编译支持不好,需要confiugre后修改Makefile文件

---------------------------------------------------------------------------------
CC= arm-none-linux-gnueabi-gcc
CFLAG= -DOPENSSL_THREADS  -Wa,--noexecstack
DEPFLAG= -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_STORE
PEX_LIBS=
EX_LIBS=
EXE_EXT=
ARFLAGS=
AR= arm-none-linux-gnueabi-ar $(ARFLAGS) r
RANLIB= arm-none-linux-gnueabi-ranlib
NM= arm-none-linux-gnueabi-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG=makedepend
LIBDIR=lib

---------------------------------------------------------------------------------
上面红色的部分是修改过的,应根据交叉编译器来设置。后面的make、make install没有什么问题.

g.第7次错误
----------------------------------------------------------------------------------
/usr/local/arm/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lbcti_telechips
collect2: ld returned 1 exit status
make: *** [libweboxjlib.so.1.0.0] 错误
----------------------------------------------------------------------------------
这个库是百视通提供的第三方库,将其拷贝到当前目录下就可以了

h.第8次错误
现在browser程序终于可以运行了,但是在加载libweboxj库时会抛出错误,主要是libweboxj库本身依赖的库在板子上不存在.
使用strace工具会有以下信息:
----------------------------------------------------------------------------------
open("/usr/lib/fast-mult/half/libxml2.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/fast-mult/half", 0xbec470f0) = -1 ENOENT (No such file or directory)
open("/usr/lib/fast-mult/libxml2.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/fast-mult", 0xbec470f0) = -1 ENOENT (No such file or directory)
open("/usr/lib/half/libxml2.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/half", 0xbec470f0)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libxml2.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0
munmap(0x45880000, 501536)              = 0
munmap(0x458fb000, 286544)              = 0
munmap(0x45941000, 349680)              = 0
stat64("/nand1/allapp/webox/libweboxjlib.so", {st_mode=S_IFREG|0755, st_size=471392, ...}) = 0
write(2, "terminate called after throwing "..., 48terminate called after throwing an instance of ') = 48
write(2, "JsHostMng::ExceptId", 19JsHostMng::ExceptId)     = 19
write(2, "'\n", 2'
)                      = 2
----------------------------------------------------------------------------------
从以上信息看出是libxml2库找不到,交叉编译libxml2库后下载到板子上即可。

i.第9个错误
现在程序可以运行起来了,但是发现在浏览网页时gif图片显示不出来
看来是qt的插件imageformats未编译安装到开发板
进入qte4.7.4的源码目录./qte-4.7.4/src/plugins/imageformats中,运行下面命令
qmake
make clean
make
make install
将安装目录./plugins/imageformats中的库文件拷贝到开发板中,并在qt.conf中设置正确的插件路径,我的qt.conf设置如下:
-----------------------------------------------------------------------------------
[Paths]
Prefix = /usr/qte-4.7.4
Translations = share/qtopia/translations
Plugins = lib/qtopia/plugins
Libraries = lib
#Headers = include/qtopia
------------------------------------------------------------------------------------

现在,程序应该可以正常地运行了。

总结整个的问题解决过程,qt的编译的配置比较关键,一定要配置成你希望的display模式,在我的开发板上配置的是LinuxFB,具体的配置项是-qt-gfx-linuxfb。如果要支持网页游览,一定要加上-webkit选项,imageformats插件的编译可以在后面单独进行。

其它的主要是一些依赖的库了,这和具体的应用相关。

http://blog.sina.com.cn/s/blog_8738908f0100ugsr.html

更换Qt QtEmbedded库的版本出现问题及解决(交叉编译OpenSSL)的更多相关文章

  1. linux(debian) arm-linux-g++ v4.5.1交叉编译 embedded arm 版本的QtWebkit (browser) 使用qt 4.8.6 版本

    最近需要做一个项目 在arm 架构的linux下 没有桌面环境的情况下拉起 有界面的浏览器使用. 考虑用qt 的界面和 qtwebikt 的库去实现这一系列操作. 本文参考: Qt移植到ARM Lin ...

  2. QT共享库的创建与调用(初级)(附:UI界面不能被改变的其中一个原因)

    背景: 最近在做的一个项目其中一部分既是实现PC与下位机的USB通信.windows平台下已经完成,现需移植到linux平台下. 在linux系统中,通过一段时间的工作,设备已被配置成hid类(后续再 ...

  3. linux(debian) arm-linux-g++ v4.5.1交叉编译 embedded arm 版本的QtWebkit (browser) 使用qt 4.8.6 版本 以及x64上编译qt

    最近需要做一个项目 在arm 架构的linux下 没有桌面环境的情况下拉起 有界面的浏览器使用. 考虑用qt 的界面和 qtwebikt 的库去实现这一系列操作. 本文参考: Qt移植到ARM Lin ...

  4. ZeroMQ接口函数之 :zmq_version – 返回ZMQ链接库的版本

    ZeroMQ 官方地址 :http://api.zeromq.org/4-2:zmq_version zmq_version(3)          ØMQ Manual - ØMQ/4.1.0 Na ...

  5. pip安装第三方库以及版本

    这篇blog只是写给自己看看的. 今天突然遇到sqlalchemy映射到数据库时,一个字段类型是datetime(6),我这边死活访问不上,之前一直没有问题,最后查明原因,原来是第三方库的版本问题,真 ...

  6. paip.c++ qt 共享库dll的建立

    paip.c++ qt 共享库dll的建立 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn.net/at ...

  7. 浅析GDAL库C#版本支持中文路径问题(续)

    上篇博客中主要说了GDAL库C#版本中存在的问题,其表现形式主要是:"文件名中的汉字个数是偶数,完全没有影响,读取和创建都正常,如果文件名中的汉字个数是奇数,读取和创建都会报错." ...

  8. eclipse项目更换svn共享库

    eclipse项目更换svn共享库 参考内容: http://blog.csdn.net/yang5726685/article/details/59111586 已经共享过的svn项目,更换资源库时 ...

  9. 玩转ArduinoJson库 V6版本

    1.前言     前面,博主已经讲解了ArduinoJson库的V5版本.为了节省时间以及不讨论重复内容,博主建议读者先去阅读一下 玩转ArduinoJson库 V5版本 .重点了解几个东西: JSO ...

随机推荐

  1. C++程序员经常问的11个问题

    下面的这些要点是对所有的C++程序员都适用的.我之所以说它们是最重要的,是因为这些要点中提到的是你通常在C++书中或网站上无法找到的.如:指向成员的指针,这是许多资料中都不愿提到的地方,也是经常出错的 ...

  2. 【心情】2016ICPC青岛站打铁记

    Day0 下午到的青岛; 然后就在下面这两个地方转了很久:一直找不到公交站台 路上还看到了一个类似堡垒的东西:感觉屌屌的. 然后在落日的余晖下:我们找到了公交站台; 路上不知道他们在讨论什么:GPS什 ...

  3. hadoop 3.x 启动过程中 Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

    出现这种状况是因为当前账号没有配置ssh免密登录 进入到以下目录,查看是否生成过秘钥对,如果有的话直接ssh-copy-id 主机名 没有的话执行ssh-keygen -t rsa后再重新执行ssh- ...

  4. prototype __proto__ Function

    我们创建的每个函数都有一个prototype属性,这个属性是一个指针,指向一个对象.(注意:是函数才有prototype属性) 而__proto__属性每一个对象都有. 在js中如果A对象是由B函数构 ...

  5. java学习笔记(9)——网络

    计算机网络: 最简单的网络由两台计算机组成 计算机A ---协议---> 网络 ---协议---> 计算机B---->端口1---->A软件 192.168.0.118     ...

  6. Leetcode 104 Maximum Depth of Binary Tree 二叉树

    计算二叉树的最大深度 我的方法是找出两个子树的长度中最长的那个,然后加1 class Solution { public: int maxDepth(TreeNode* root) { ; ,maxD ...

  7. 【STL】关联容器 — hashtable

    C++ 11哈希表已被列入标准列.hashtable这是hash_set.hash_map.hash_multiset.hash_multimap的底层机制.即这四种容器中都包括一个hashtable ...

  8. Oracle 一些实用的DBA语句

    --查询LOB的大小和所在表空间 SELECT A.TABLE_NAME, A.COLUMN_NAME, B.SEGMENT_NAME, B.SEGMENT_TYPE, B.TABLESPACE_NA ...

  9. MAT 专题

    http://smallnetvisitor.iteye.com/blog/1826434 运行user任务管理器查看到的pid号:

  10. mysql/Java服务端对emoji的支持 专题

    关于utf8不支持emoji是因为emoji是用4个字节存储的字符,而mysql的utf8只能存储1-3个字节的字符.那就存不了呗 需要更改的地方:(1)Mysql服务器client,mysql,my ...