在fedora15上编译pc版的qtopia2.2所遇到的问题
2014-06-15 13:50
316 查看
在fedora15下编译qtopia问题,遇到了很多问题,都无法解决,感觉很无赖。经过不断的google收集,这些问题得到了解决
首先要 vim build
cd qtopia-2.2.0-FriendlyARM
echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 240x320 -fontfamilies "helvetica fixed micro smallsmooth smoothtimes"' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'
make
make install
cd ..
#/bin/rm qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/lib/fonts/helvetica_*
mkdir qtopia-2.2.0-FriendlyARM/qtopia/image
tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image
错误1:
backend/vobject.cpp: In function ‘VObject* addGroup(VObject*, const char*)’:
backend/vobject.cpp:419: error: invalid conversion from ‘const char*’ to ‘char*’
修改/x86-qtopia-2.2.0/qtopia-2.2.0-Friendly/qtopia/src/libraries/qtopia/backend/vobject.cpp:419行
char *dot = strrchr(g,'.');
为 char *dot = (char*)strrchr(g,'.');
错误2:
videocaptureview.cpp:54:28: 致命错误: linux/videodev.h:没有那个文件或目录
编译中断。
make[6]: *** [.obj/release-shared/videocaptureview.o] 错误 1
解决方法
yum install libv4l-devel
ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
错误3:
../include/qvaluelist.h:88:13: error: ‘ptrdiff_t’ does not name a type
../include/qvaluelist.h:164:13: error: ‘ptrdiff_t’ does not name a type
In file included from ../include/qmap.h:46:0,
from kernel/qmime.h:43,
from kernel/qevent.h:45,
from kernel/qobject.h:45,
from kernel/qwidget.h:43,
from kernel/qdesktopwidget.h:40,
from kernel/qapplication.h:42,
from kernel/qapplication_x11.cpp:64:
../include/qvaluelist.h:424:13: error: ‘ptrdiff_t’ does not name a type
In file included from kernel/qmime.h:43:0,
from kernel/qevent.h:45,
from kernel/qobject.h:45,
from kernel/qwidget.h:43,
from kernel/qdesktopwidget.h:40,
from kernel/qapplication.h:42,
from kernel/qapplication_x11.cpp:64:
../include/qmap.h:107:13: error: ‘ptrdiff_t’ does not name a type
../include/qmap.h:223:13: error: ‘ptrdiff_t’ does not name a type
In file included from kernel/qmime.h:43:0,
from kernel/qevent.h:45,
from kernel/qobject.h:45,
from kernel/qwidget.h:43,
from kernel/qdesktopwidget.h:40,
from kernel/qapplication.h:42,
from kernel/qapplication_x11.cpp:64:
../include/qmap.h:604:13: error: ‘ptrdiff_t’ does not name a type
解决方法
在qtopia-2.2.0-FriendlyARM/dqt/include/qvaluelist.h文件下增加两个头文件:#include "stddef.h"和#include <cstddef>
错误4:
wavplugin.cpp: In member function ‘virtual bool WavPlugin::isFileSupported(const QString&)’:
wavplugin.cpp:435:45: error: invalid conversion from ‘const char*’ to ‘char*’
修改
char *ext = strrchr( path.latin1(), '.' );
为
char *ext = (char*)strrchr( path.latin1(), '.' );
错误5:
/usr/bin/ld: .obj/release-shared/transferserver.o: undefined reference to symbol 'crypt@@GLIBC_2.0'
/usr/bin/ld: note: 'crypt@@GLIBC_2.0' is defined in DSO /lib/libcrypt.so.1 so try adding it to the linker command line
这个找了好久发现用了crypt函数 而没使用-lcrypt, qtopia-2.2.0-FriendlyARM/qtopia/configure 1373行加入
print CONFIG_PRI "LIBS+=-lcrypt\n";
错误6:
x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/bin/qpe: error while loading shared libraries: libqtopia2.so.2: cannot open shared object file: No such file or directory
解决方法:
cd x86-qtopia
mv run qtopia-2.2.0-FriendlyARM/ 下修改 run
vim run
qt2/bin/qvfb -width 480 -height 272 -depth 16 &
cd /qtopia/image
mkdir root 2>/dev/null || true
echo $PWD
export HOME=$PWD/root
#cd opt/Qtopia
#export PATH=$PWD/qtopia/bin:$PATH
export LD_LIBRARY_PATH=$PWD/qtopia/lib:$LD_LIBARAY_PATH
export QTDIR=$PWD/qt2
export QPEDIR=$PWD/qtopia
#export KDEDIR=$PWD/../kde
sleep 3
$PWD/qtopia/bin/qpe
再运行 run
错误7:
[root@localhome bin]# ./qpe
Cannot find font definition file /usr/lib/qt-3.3/lib/fonts/fontdir - is $QTDIR set correctly?
修改 /etc/profile
vim /etc/profile
QTDIR=x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2
PATH=$PATH:$QTDIR/bin
QT_QWS_FONTDIR=$QTDIR/lib/fonts
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib
export PATH QTDIR LD_LIBRARY_PATH QT_QWS_FONTDIR
然后
source /etc/profile
首先要 vim build
cd qtopia-2.2.0-FriendlyARM
echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 240x320 -fontfamilies "helvetica fixed micro smallsmooth smoothtimes"' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'
make
make install
cd ..
#/bin/rm qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/lib/fonts/helvetica_*
mkdir qtopia-2.2.0-FriendlyARM/qtopia/image
tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image
错误1:
backend/vobject.cpp: In function ‘VObject* addGroup(VObject*, const char*)’:
backend/vobject.cpp:419: error: invalid conversion from ‘const char*’ to ‘char*’
修改/x86-qtopia-2.2.0/qtopia-2.2.0-Friendly/qtopia/src/libraries/qtopia/backend/vobject.cpp:419行
char *dot = strrchr(g,'.');
为 char *dot = (char*)strrchr(g,'.');
错误2:
videocaptureview.cpp:54:28: 致命错误: linux/videodev.h:没有那个文件或目录
编译中断。
make[6]: *** [.obj/release-shared/videocaptureview.o] 错误 1
解决方法
yum install libv4l-devel
ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
错误3:
../include/qvaluelist.h:88:13: error: ‘ptrdiff_t’ does not name a type
../include/qvaluelist.h:164:13: error: ‘ptrdiff_t’ does not name a type
In file included from ../include/qmap.h:46:0,
from kernel/qmime.h:43,
from kernel/qevent.h:45,
from kernel/qobject.h:45,
from kernel/qwidget.h:43,
from kernel/qdesktopwidget.h:40,
from kernel/qapplication.h:42,
from kernel/qapplication_x11.cpp:64:
../include/qvaluelist.h:424:13: error: ‘ptrdiff_t’ does not name a type
In file included from kernel/qmime.h:43:0,
from kernel/qevent.h:45,
from kernel/qobject.h:45,
from kernel/qwidget.h:43,
from kernel/qdesktopwidget.h:40,
from kernel/qapplication.h:42,
from kernel/qapplication_x11.cpp:64:
../include/qmap.h:107:13: error: ‘ptrdiff_t’ does not name a type
../include/qmap.h:223:13: error: ‘ptrdiff_t’ does not name a type
In file included from kernel/qmime.h:43:0,
from kernel/qevent.h:45,
from kernel/qobject.h:45,
from kernel/qwidget.h:43,
from kernel/qdesktopwidget.h:40,
from kernel/qapplication.h:42,
from kernel/qapplication_x11.cpp:64:
../include/qmap.h:604:13: error: ‘ptrdiff_t’ does not name a type
解决方法
在qtopia-2.2.0-FriendlyARM/dqt/include/qvaluelist.h文件下增加两个头文件:#include "stddef.h"和#include <cstddef>
错误4:
wavplugin.cpp: In member function ‘virtual bool WavPlugin::isFileSupported(const QString&)’:
wavplugin.cpp:435:45: error: invalid conversion from ‘const char*’ to ‘char*’
修改
char *ext = strrchr( path.latin1(), '.' );
为
char *ext = (char*)strrchr( path.latin1(), '.' );
错误5:
/usr/bin/ld: .obj/release-shared/transferserver.o: undefined reference to symbol 'crypt@@GLIBC_2.0'
/usr/bin/ld: note: 'crypt@@GLIBC_2.0' is defined in DSO /lib/libcrypt.so.1 so try adding it to the linker command line
这个找了好久发现用了crypt函数 而没使用-lcrypt, qtopia-2.2.0-FriendlyARM/qtopia/configure 1373行加入
print CONFIG_PRI "LIBS+=-lcrypt\n";
错误6:
x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/bin/qpe: error while loading shared libraries: libqtopia2.so.2: cannot open shared object file: No such file or directory
解决方法:
cd x86-qtopia
mv run qtopia-2.2.0-FriendlyARM/ 下修改 run
vim run
qt2/bin/qvfb -width 480 -height 272 -depth 16 &
cd /qtopia/image
mkdir root 2>/dev/null || true
echo $PWD
export HOME=$PWD/root
#cd opt/Qtopia
#export PATH=$PWD/qtopia/bin:$PATH
export LD_LIBRARY_PATH=$PWD/qtopia/lib:$LD_LIBARAY_PATH
export QTDIR=$PWD/qt2
export QPEDIR=$PWD/qtopia
#export KDEDIR=$PWD/../kde
sleep 3
$PWD/qtopia/bin/qpe
再运行 run
错误7:
[root@localhome bin]# ./qpe
Cannot find font definition file /usr/lib/qt-3.3/lib/fonts/fontdir - is $QTDIR set correctly?
修改 /etc/profile
vim /etc/profile
QTDIR=x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2
PATH=$PATH:$QTDIR/bin
QT_QWS_FONTDIR=$QTDIR/lib/fonts
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib
export PATH QTDIR LD_LIBRARY_PATH QT_QWS_FONTDIR
然后
source /etc/profile
相关文章推荐
- 在Fedora15编译PC版的qtopia的总结
- MPlayer fedora 15编译问题解决
- 最近编译qtopia4.4.3遇到的一个问题及解决方法
- Fedora 15 降级安装GCC-4.5.3 全过程以及遇到的问题和解决办法总结
- Fedora14下编译qtopia问题
- [转]Fedora 15搭建LAMP环境中可能遇到的问题
- QT SDK 4.8.4 fedora中安装与编译遇到的小问题与解决,经验分享
- fedora14下编译qtopia问题. uuid, X11
- Fedora 15搭建LAMP环境中可能遇到的问题
- fedora14下编译qtopia问题
- 在Fedora 15 下安装pdksh时所遇到的问题
- fedora13编译Qtopia问题
- 前一段时间编译xmms后运行遇到libmpg123.so权限不够,不能播放mp3的问题
- 静态库编译和连接遇到的奇怪问题
- 交叉编译D-BUS时遇到abstract socket的问题。
- 今天遇到的一个编译问题
- 编译py2exe遇到问题
- C++ 调用C 文件遇到的编译问题
- 利用暴力反编译的程序处理ArcXML数据遇到的问题小结(纯粹研究目的)
- linux下用gcc编译c程序时遇到的问题: error: stdio.h: 没有那个文件或目录