查看完整版本: [-- 开贴整理常见编译错误集锦 -- 不断更新中 --]

QTCN开发网 -> Qt嵌入式开发 -> 开贴整理常见编译错误集锦 -- 不断更新中 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

shiroki 2006-10-29 22:20

开贴整理常见编译错误集锦 -- 不断更新中

看到大家为了编译搞得这么痛苦, 实在于心不忍. 决定开篇整理在编译过程中遇到的问题. 大家有什么新问题也可申请加到本贴中.


cannot find -lqte
这个问题比较复杂, 需要从几个方面来分析. 首先要看编译的命令行, 在编译的命令行里应该正确的指定libqte.so所在的路径. 用tmake生成的makefile里, 该路径会引用QTDIR/lib, 如果报该错, 则是QTDIR环境变量设定有误; 另外, tmake引用TMAKEDIR和TMAKEPATH变量。 TMAKEDIR设定tmake目录的路径, TMAKEPATH设定你使用的tmakespec位置, 当编译qt-x11程序时设为TMAKEPATH=$TMAKEDIR/lib/linux-g++, 编译qte程序时设为TMAKEPATH=$TMAKEDIR/lib/qws/linux-generic-g++

qmake则依据QMAKESPEC环境变量的值生成makefile, 对应qte/qtopia应用需要将QMAKESPEC设定为QPEDIR/mkspecs/qws/linux-generic-g++

该问题的解决方案就是设置好相应的环境变量, 重新用tmake或者qmake去生成Makefile, 然后编译. 肯定能行, 呵呵

uuid/uuid.h
桌面环境需要安装e2fsprogs的开发包(-devel包), 如果是交叉编译环境, 则需要找到源码包进行交叉编译. 装好开发包再make即可.

jpeg.h
需要安装libjpeg的开发包或用源码包交叉编译, 网上搜jpegsrc即可找到

cups/cups.h
安装 cups-devel*.rpm包

GL/glu.h
安装 mesa-libGLU-devel*.rpm包

undefined reference xxx
这是个链接错误,意思是说在你的程序里引用了某个函数或变量, 但是链接器找不到该变量的定义.
最容易出现此错误的情况是, 你的头文件和库文件不匹配. 比如你用了x11版本的头文件, 而链接到嵌入式版本的qt;或者有头文件但找不到库文件等. 具体问题具体分析.

如果报的符号是在某个第三方库里的, 比如uuid的什么什么函数, 则要检查你的libqte是不是编译得正确. 本来这些库应该正确链接到libqte.so上, 这样在qtopia链接的时候就不需要显式的加上这些库了. 有的时候libqte没有正确链接好, 但是在编译libqte阶段不会报错, 到后面qtopia或者其他应用编译的时候就出错了.

解决方案是把报错的库删除, 重新编译库. 如果是libqte, 要把你环境里的出现libqte的地方都检查检查, 有可能存在不同的libqte互相影响.

wicoo401 2006-11-16 17:25
TO: cannot find -lqte
变量QTDIR指向QTE对吗?
QTDIR=$TROLLTECHDIR/qt-embedded-free-2.3.10-debug

我是这么做的export QTDIR=$HOME/Trolltech/qt-embedded-free-2.3.10-debug
结果出现如下错误
..........
/root/Trolltech/qt-embedded-free-2.3.10-debug/lib/libqte.so: undefined reference
to `QComboBox::setAutoCompletion(bool)'
/root/Trolltech/qt-embedded-free-2.3.10-debug/lib/libqte.so: undefined reference
to `QComboBox::setEditText(QString const&)'
/root/Trolltech/qt-embedded-free-2.3.10-debug/lib/libqte.so: undefined reference
to `QMotifStyle::drawIndicator(QPainter*, int, int, int, int, QColorGroup const
&, int, bool, bool)'
collect2: ld returned 1 exit status
make: *** [qvfb] Error 1
是libqte.so没装好吗?

shiroki 2006-11-16 18:18
undefined reference的问题我的帖子里也提到了, 恩, 建议你把lib下的libqte*删掉, 然后
cd qtedir
export QTDIR=$PWD
make

把libqte再生成一遍看看

jinliang516 2006-11-17 15:40
No rule to make target `all', needed by `default'
我编译qpe的 时候遇到的 ,
qte已经编译好了,qconfig-qpe.h也考过去了,
在qpe 的src下make的 时候出现,是在qtopia-free-1.7.0/src/libraries/qtopia下面
有点莫明奇妙,板主救人!!!

wicoo401 2006-11-17 15:45
再详细问一下编译qvfb时变量QTDIR=$DTEDIR 还是 QTDIR=$QT2DIR
解决编译qvfb时出现cannot find -lqte问题时将TMAKEPATH改为TMAKEPATH=/root/Trolltech/tmake-1.13/lib/linux-g++吗?
随后出现了undefined reference还有什么解决办法(重新生成libqte不管用阿)
export QTDIR=$QT2DIR后出现的undefined reference
moc_config.o(.gnu.linkonce.d._ZTV6Config+0x1c4): undefined reference to `non-virtual thunk [nv:-36] to QWidget::bytesPerLine() const'
moc_config.o(.gnu.linkonce.d._ZTV6Config+0x1c8): undefined reference to `non-virtual thunk [nv:-36] to QWidget::graphicsContext(bool) const'
collect2: ld returned 1 exit status

shiroki 2006-11-18 21:20
qvfb是x11应用, 所以qtdir要设成qt-x11-2 dir
另外qtdir和tmakepath要互相配合
设好tmakepath之后要用tmake重新生成makefile
最后make clean;make
你这个应该是没有重新生成makefile

wicoo401 2006-11-20 14:40
再提一个问题:关于编译qtopia时的配置问题:
./configure -debug -edition pda -no-qtopiadesktop -displaysize 240x320
出现错误ERROR: Missing file /usr/lib/qt3/include/qglobal.h
          Did you pass a valid location to -dqt?
/usr/lib/下没有qt3 只有qt-3.1和qt2修改路径QT3DIR指向qt-3.1或qt2后再重新编译:
Expecting Qt to be at least version 3.3.0,
found only version 2.3.1, aborting configure.

精华贴中提到configure qtopia的时候没有加-no-qtopiadesktop选项或者用到了-languages参数就得准备qt-x11-3.x了
具体该怎么配置呢 才不用装qt-x11-3.x

shiroki 2006-11-20 19:25
加-no-qtopiadesktop选项应该就不需要qt3了
那个指定qt3的环境变量不是qt3dir , 是DQTDIR

wicoo401 2006-11-23 16:24
另一种解决办法,更改configure文件中Permanent settings:
my $mindqtVersion = "3.3.0"->"3.1.0"

编译通过,qtopia-2.1.1能用了,谢谢shiroki一直来的帮忙

cavendish 2006-11-23 16:28
qtopia中用到Qt3的东西有
一个是qtopiadesktop
一个是国际化
qtopia中使用的是qt3中的lupdate, lrelease

slient 2007-03-31 19:38
/usr/local/arm/2.95.3/arm-linux/bin/ld: cannot find -lqassistantclient
collect2: ld returned 1 exit status
make[3]: *** [helpdemo] Error 1
make[3]: Leaving directory `/usr/local/QTarm/qt-embedded-free-3.2.1/examples/helpdemo'
make[2]: *** [sub-helpdemo] Error 2
make[2]: Leaving directory `/usr/local/QTarm/qt-embedded-free-3.2.1/examples'
make[1]: *** [sub-examples] Error 2
make[1]: Leaving directory `/usr/local/QTarm/qt-embedded-free-3.2.1'
make: *** [init] Error 2

交叉编译QT/e库的时候出现上述错误,有谁知道原因吗?谢谢

wslmcu 2007-04-05 17:11
在RedHat9下编译Qtopia2.2.0时,报以下错误/usr/bin/ld: cannot find -luuid
可是在/lib有uuid的相关的动态库,搞了三天没搞定,请版主帮忙分析一下。

wslmcu 2007-04-05 17:13
re:10楼。
qassistantclient 库路径不对

slient 2007-04-10 19:14
qassistantclient 库路径该怎么设置,谢谢!

mviolet 2007-05-28 15:11
交叉编译时,其他按照实验书上做一切正常,但在板子上执行./progressbar -qws出现问题:
Qt Embedded data directory has incorrect permissions : /tmp/qtembedded-0
请高手帮忙啊,如何解决...

mviolet 2007-05-28 15:32
漏了说了,我chmod 777试过了

ljqiankun 2007-09-15 15:12
qt-x11-2.3.2 ,run:
export TMAKEPATH=$TMAKEDIR/lib/linux-g++
export QTDIR=$QT2DIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
make clean
./configure -no-xft
make

~~~~
/qt/qt-2.3.2/include/qvaluestack.h:57: 错误:不能从 ‘QValueListIterator<QMap<QString, QString> >’ 转换到 ‘const char*’,为实参 ‘1’(属于 ‘int remove(const char*)’)
/qt/qt-2.3.2/include/qvaluestack.h: In member function ‘T QValueStack<T>::pop() [with T = QString]’:
xml/qxml.cpp:2502:  instantiated from here
/qt/qt-2.3.2/include/qvaluestack.h:57: 错误:不能从 ‘QValueListIterator<QString>’ 转换到 ‘const char*’,为实参 ‘1’(属于 ‘int remove(const char*)’)
make[2]: *** [xml/qxml.o] 错误 1
make[2]: Leaving directory `/qt/qt-2.3.2/src'
make[1]: *** [sub-src] 错误 2
make[1]: Leaving directory `/qt/qt-2.3.2'
make: *** [init] 错误 2

why?????

luxiaodong 2008-02-15 17:01
qassistantclient库属于一个单独的类库,要使用该类库,需要在.pro中添加下面一行: CONFIG    +=assistant



   

luxiaodong 2008-02-16 19:02
11楼的问题解决了没有?

kyleyi 2008-04-14 16:23
编译器: Default compiler
Building Makefile: "C:\Documents and Settings\Kyleyi\桌面\TestApp1[1].0.0\TestApp1.0.0\Makefile.win"
执行  make...
make.exe -f "C:\Documents and Settings\Kyleyi\桌面\TestApp1[1].0.0\TestApp1.0.0\Makefile.win" all
g++.exe main.o moc_form.o test_private.res -o "test.exe" -L"D:/Dev-Cpp/lib" -L"D:/Qt/4.3.3/lib" -mwindows D:/Qt/4.3.3/lib/libQt3Support4.a D:/Qt/4.3.3/lib/libQtAssistantClient4.a D:/Qt/4.3.3/lib/libQtCore4.a D:/Qt/4.3.3/lib/libQtDesigner4.a D:/Qt/4.3.3/lib/libQtDesignerComponents4.a D:/Qt/4.3.3/lib/libQtGui4.a D:/Qt/4.3.3/lib/libqtmain.a D:/Qt/4.3.3/lib/libQtNetwork4.a D:/Qt/4.3.3/lib/libQtOpenGL4.a D:/Qt/4.3.3/lib/libQtSql4.a D:/Qt/4.3.3/lib/libQtXml4.a 

main.o(.text+0x1aa):main.cpp: undefined reference to `Form::Form()'
moc_form.o(.text+0x1a5):moc_form.cpp: undefined reference to `Form::compute()'
collect2: ld returned 1 exit status

make.exe: *** [test.exe] Error 1

执行结束

liuwx 2008-04-15 14:04
引用第14楼mviolet于2007-05-28 15:11发表的  :
交叉编译时,其他按照实验书上做一切正常,但在板子上执行./progressbar -qws出现问题:
Qt Embedded data directory has incorrect permissions : /tmp/qtembedded-0
请高手帮忙啊,如何解决...


我也碰到了,把tmp文件夹删掉,重启就可以了,呵呵

萧萧 2008-07-31 12:46
版主搭建过qtopia主机的虚拟平台吗?qtopia4的
帮帮忙阿,做了几天了还是错的 [s:6]

萧萧 2008-07-31 16:08
编译qt-x11-opensource-src-4.2.2遇到的问题:请问时怎么回事????

gmake[1]: Entering directory `/qt/QT4DIR/src'
cd tools/moc && gmake -f Makefile
gmake[2]: Entering directory `/qt/QT4DIR/src/tools/moc'


gmake[2]: *** wait: 没有子进程。 停止。
gmake[2]: *** 正在等待未完成的任务....
gmake[2]: *** wait: 没有子进程。 停止。
gmake[1]: *** [sub-tools_moc-make_default] 错误 2
gmake: *** [sub-src-make_default-ordered] 中断

0001 2008-08-08 11:09
编译出错,大家帮忙看看
nputmethod/qwsinputcontext_qws.cpp:181: 错误:‘qt_sendSpontaneousEvent’ 在此作用域中尚未声明
gmake[3]: *** [.obj/debug-shared-emb-x86/qwsinputcontext_qws.o] 错误 1
gmake[3]: Leaving directory `/root/QT/qt-embedded-preview-src-4.0.1/src/gui'
gmake[2]: *** [debug-all] 错误 2
gmake[2]: Leaving directory `/root/QT/qt-embedded-preview-src-4.0.1/src/gui'
gmake[1]: *** [sub-gui-make_default-ordered] 错误 2
gmake[1]: Leaving directory `/root/QT/qt-embedded-preview-src-4.0.1/src'
gmake: *** [sub-src-make_default-ordered] 错误 2

0001 2008-08-08 11:13
编译出错,大家帮忙看看
nputmethod/qwsinputcontext_qws.cpp:181: 错误:‘qt_sendSpontaneousEvent’ 在此作用域中尚未声明
gmake[3]: *** [.obj/debug-shared-emb-x86/qwsinputcontext_qws.o] 错误 1
gmake[3]: Leaving directory `/root/QT/qt-embedded-preview-src-4.0.1/src/gui'
gmake[2]: *** [debug-all] 错误 2
gmake[2]: Leaving directory `/root/QT/qt-embedded-preview-src-4.0.1/src/gui'
gmake[1]: *** [sub-gui-make_default-ordered] 错误 2
gmake[1]: Leaving directory `/root/QT/qt-embedded-preview-src-4.0.1/src'
gmake: *** [sub-src-make_default-ordered] 错误 2

yuchttp 2008-08-08 18:06
我编译qtopia-opensource-4.3.2出现这样的问题,请大家帮帮忙
/mnt/qtopia/lib/libqtopia.so: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
gmake[6]: *** [qpe] 错误 1
gmake[6]: Leaving directory `/mnt/qtopia/src/server'
gmake[5]: *** [all] 错误 2
gmake[5]: Leaving directory `/mnt/qtopia/src/server'
gmake[4]: *** [all] 错误 2
gmake[4]: Leaving directory `/mnt/qtopia/src/server'
gmake[3]: *** [sub-server] 错误 2
gmake[3]: Leaving directory `/mnt/qtopia/src'
gmake[2]: *** [all] 错误 2
gmake[2]: Leaving directory `/mnt/qtopia/src'
gmake[1]: *** [qtopia_all] 错误 2
gmake[1]: Leaving directory `/mnt/qtopia'
gmake: *** [all] 错误 2

oneke 2008-09-05 15:24
我的编译错误倒是没有,但在运行显示一个Label的时候却提示:

Initializing QFontEngineQPF failed for /home/oneke/Application/lib/fonts/DejaVuSans.ttf

这个字体我已经拷到相应的路径里面去了呀,初始化字体引擎失败~ 不明白

fychit 2008-11-21 19:40
好多问题都是我遇到过的

fychit 2008-11-21 19:42
cannot find -lqte
这个问题比较复杂, 需要从几个方面来分析. 首先要看编译的命令行, 在编译的命令行里应该正确的指定libqte.so所在的路径. 用tmake生成的makefile里, 该路径会引用QTDIR/lib, 如果报该错, 则是QTDIR环境变量设定有误; 另外, tmake引用TMAKEDIR和TMAKEPATH变量。 TMAKEDIR设定tmake目录的路径, TMAKEPATH设定你使用的tmakespec位置, 当编译qt-x11程序时设为TMAKEPATH=$TMAKEDIR/lib/linux-g++, 编译qte程序时设为TMAKEPATH=$TMAKEDIR/lib/qws/linux-generic-g++
什么时候用linux-arm-g++ ??

bliuzw 2008-12-05 13:23
为什么就 没有launching error呢?

dacong301 2008-12-13 20:52
版主救救我啊,整了快一星期了,就下面这个问题一直困扰着我!
make[3]: Entering directory `/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/examples/desktop/screenshot'
linking screenshot
/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/lib/libQtCore.so: undefined reference to `QInotifyFileSystemWatcherEngine::create()'
/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/lib/libQtCore.so: undefined reference to `clock_gettime'
/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/lib/libQtCore.so: undefined reference to `QDnotifyFileSystemWatcherEngine::create()'
/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/lib/libQtGui.so: undefined reference to `QLinuxFbScreen::QLinuxFbScreen(int)'
collect2: ld returned 1 exit status
make[3]: *** [screenshot] Error 1
make[3]: Leaving directory `/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/examples/desktop/screenshot'
make[2]: *** [sub-screenshot-make_default-ordered] Error 2
make[2]: Leaving directory `/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/examples/desktop'
make[1]: *** [sub-desktop-make_default] Error 2
make[1]: Leaving directory `/root/arm-qt4.4.0/qt-embedded-linux-opensource-src-4.4.0/examples'
make: *** [sub-examples-make_default-ordered] Error 2
请各位路过走过的大侠指点指点啊!

mavis_y83 2009-02-17 18:46
我也遇到了这个问题,用的ARM编译器交叉编译器,不知道怎么回事?请高手指点一下!

dancyz 2009-03-06 15:30
gmake[1]: *** wait: 没有子进程。 停止。
gmake[1]: *** 正在等待未完成的任务....
gmake[1]: *** wait: 没有子进程。 停止。
gmake: *** [sub-corelib-make_default-ordered] 错误 2


碰到了和22楼同样的问题,
我是在CentOS 下编译QT-Embedded-4.4.3
交叉编译器是:arm-926ejs-linux-gcc

在gmake时发生的错误。

各位大虾遇到过这种问题么?

winstones 2009-03-07 11:54
我碰到和30楼一样的问题,请大家帮忙,怎么解决啊?
/usr/local/qt-embedded-linux-opensource-src-4.5.0-rc1/lib/libQtCore.so: undefined reference to `QInotifyFileSystemWatcherEngine::create()'
/usr/local/qt-embedded-linux-opensource-src-4.5.0-rc1/lib/libQtCore.so: undefined reference to `QDnotifyFileSystemWatcherEngine::create()'
collect2: ld returned 1 exit status
make[3]: *** [screenshot] 错误 1
make[3]: Leaving directory `/usr/local/qt-embedded-linux-opensource-src-4.5.0-rc1/examples/desktop/screenshot'
make[2]: *** [sub-screenshot-make_default-ordered] 错误 2
make[2]: Leaving directory `/usr/local/qt-embedded-linux-opensource-src-4.5.0-rc1/examples/desktop'
make[1]: *** [sub-desktop-make_default] 错误 2
make[1]: Leaving directory `/usr/local/qt-embedded-linux-opensource-src-4.5.0-rc1/examples'
make: *** [sub-examples-make_default-ordered] 错误 2

chenliangzhu 2009-03-12 16:04
遇到楼上同样的问题 没人解决吗?
谁解决了 留个解决方法在上面阿!!!!!!!!1

superyongzhe 2009-03-14 15:49
不够详细

crazier 2009-03-25 19:40
你好,我在ubuntu8.04上安装Qtopia,安装到最后一步,出现下面的提示,找不到原因,请问该怎么解决?
make[1]: Entering directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/src/applications/mediarecorder'
cd /opt/FriendlyARM/mini2440/x86-qtopia/qtopia/bin ; ln -sf quicklauncher mediarecorder
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/src/applications/mediarecorder'
make -C applications/sysinfo
make[1]: Entering directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/src/applications/sysinfo'
gcc -L/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/lib -Wl,-rpath,/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/lib -L/opt/FriendlyARM/mini2440/x86-qtopia/qt/lib -Wl,-rpath,/opt/FriendlyARM/mini2440/x86-qtopia/qt/lib   -o /opt/FriendlyARM/mini2440/x86-qtopia/qtopia/bin/sysinfo .obj/linux-generic-g++//memory.o .obj/linux-generic-g++//graph.o .obj/linux-generic-g++//load.o .obj/linux-generic-g++//storage.o .obj/linux-generic-g++//versioninfo.o .obj/linux-generic-g++//sysinfo.o .obj/linux-generic-g++//main.o .obj/linux-generic-g++//moc_memory.o .obj/linux-generic-g++//moc_graph.o .obj/linux-generic-g++//moc_load.o .obj/linux-generic-g++//moc_storage.o .obj/linux-generic-g++//moc_versioninfo.o .obj/linux-generic-g++//moc_sysinfo.o  -lqpe -lqtopia -lqte 
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/lib/libqpe.so: undefined reference to `__cxa_guard_release'
/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/lib/libqpe.so: undefined reference to `__cxa_guard_acquire'
collect2: ld returned 1 exit status
make[1]: *** [/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/bin/sysinfo] Error 1
make[1]: Leaving directory `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia/src/applications/sysinfo'
make: *** [applications/sysinfo] Error 2

gejunxiao1 2009-04-14 13:12
-lcrypt -luuid -lm -ldl -ldl -L/home/gjx/qtopia-free-2.1.1/lib -L/home/gjx/qt-2.3.10/lib -lqte
/usr/bin/ld: skipping incompatible /home/gjx/qtopia-free-2.1.1/lib/libuuid.so when searching for -luuid
/usr/bin/ld: skipping incompatible /home/gjx/qtopia-free-2.1.1/lib/libuuid.a when searching for -luuid
/usr/bin/ld: skipping incompatible /home/gjx/qt-2.3.10/lib/libuuid.so when searching for -luuid
/usr/bin/ld: skipping incompatible /home/gjx/qt-2.3.10/lib/libuuid.a when searching for -luuid
/usr/bin/ld: skipping incompatible /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libuuid.so when searching for -luuid
/usr/bin/ld: skipping incompatible /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libuuid.a when searching for -luuid
/usr/bin/ld: skipping incompatible /usr/lib/libuuid.so when searching for -luuid/usr/bin/ld: skipping incompatible /usr/lib/libuuid.a when searching for -luuid
/usr/bin/ld: cannot find -luuid
collect2: ld returned 1 exit status
make[4]: *** [../../../lib/libqpe.so.1.5.3] Error 1
make[4]: Leaving directory `/home/gjx/qtopia-free-2.1.1/src/libraries/qtopia'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/gjx/qtopia-free-2.1.1/src/libraries/qtopia'
make[2]: *** [sub-libraries-qtopia] Error 2
make[2]: Leaving directory `/home/gjx/qtopia-free-2.1.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/gjx/qtopia-free-2.1.1/src'
make: *** [all] Error 2
帮主求救啊!我把libuuid拷过去了还是这样!

qiang1985 2009-05-05 22:01
我在编译qt-embedded-linux-opensource-src-4.5.1-arm时出错:
Creating qmake. Please wait...
make: 没有什么可以做的为 `first'。

The host system byte order could not be detected!
Turn on verbose messaging (-v) to see the final report.
You can use the -host-little-endian or -host-big-endian switch to
./configure to continue.
但是当我加上参数-host-little-endian or -host-big-endian后又出错:
TCreating qmake. Please wait...
make: 没有什么可以做的为 `first'。

The target system byte order could not be detected!
Turn on verbose messaging (-v) to see the final report.
You can use the -little-endian or -big-endian switch to
./configure to continue.
请大家多多指教,急急!

yangxue 2009-05-15 09:31
请问以下,我在交叉编译中显示找到了libqte.so,但是紧接着就出现libqte.so:?????:???,出现这种问好是因为我的libqte.so没编译好吗?

bhwbj 2009-05-18 16:50
to38楼,make: 没有什么可以做的为 `first' 是因为重复configure了,make clean一下就不提示了。
是找不到目标机器的大小端,在configure的选项里加入-little-endian就行了。总之一句话,缺啥补啥。附qt-embedded-4.5.1和qt-x11-4.5.1的配置选项:

Usage:  configure [-h] [-prefix <dir>] [-prefix-install] [-bindir <dir>] [-libdir <dir>]
        [-docdir <dir>] [-headerdir <dir>] [-plugindir <dir> ] [-datadir <dir>]
        [-translationdir <dir>] [-sysconfdir <dir>] [-examplesdir <dir>]
        [-demosdir <dir>] [-buildkey <key>] [-release] [-debug]
        [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
        [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
        [-accessibility] [-no-stl] [-stl] [-no-sql-<driver>] [-sql-<driver>]
        [-plugin-sql-<driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
        [-platform] [-D <string>] [-I <string>] [-L <string>] [-help]
        [-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
        [-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
        [-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <part>]
        [-no-make <part>] [-R <string>]  [-l <string>] [-no-rpath]  [-rpath] [-continue]
        [-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
        [-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked]
        [-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
        [-qtnamespace <namespace>] [-qtlibinfix <infix>] [-separate-debug-info] [-armfpa]
        [-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
        [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
        [-no-openssl] [-openssl] [-openssl-linked]
        [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit]
        [-no-scripttools] [-scripttools]

        [additional platform specific options (see below)]


Installation options:

These are optional, but you may specify install directories.

    -prefix <dir> ...... This will install everything relative to <dir>
                         (default /usr/local/Trolltech/QtEmbedded-4.5.1)

    -hostprefix [dir] .. Tools and libraries needed when developing
                         applications are installed in [dir]. If [dir] is
                         not given, the current build directory will be used.

  * -prefix-install .... Force a sandboxed "local" installation of
                         Qt. This will install into
                         /usr/local/Trolltech/QtEmbedded-4.5.1, if this option is
                         disabled then some platforms will attempt a
                         "system" install by placing default values to
                         be placed in a system location other than
                         PREFIX.

You may use these to separate different parts of the install:

    -bindir <dir> ......... Executables will be installed to <dir>
                            (default PREFIX/bin)
    -libdir <dir> ......... Libraries will be installed to <dir>
                            (default PREFIX/lib)
    -docdir <dir> ......... Documentation will be installed to <dir>
                            (default PREFIX/doc)
    -headerdir <dir> ...... Headers will be installed to <dir>
                            (default PREFIX/include)
    -plugindir <dir> ...... Plugins will be installed to <dir>
                            (default PREFIX/plugins)
    -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
                            (default PREFIX)
    -translationdir <dir> . Translations of Qt programs will be installed to <dir>
                            (default PREFIX/translations)
    -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
                            (default PREFIX/etc/settings)
    -examplesdir <dir> .... Examples will be installed to <dir>
                            (default PREFIX/examples)
    -demosdir <dir> ....... Demos will be installed to <dir>
                            (default PREFIX/demos)

You may use these options to turn on strict plugin loading.

    -buildkey <key> .... Build the Qt library and plugins using the specified
                         <key>.  When the library loads plugins, it will only
                         load those that have a matching key.

Configure options:

The defaults (*) are usually acceptable. A plus (+) denotes a default value
that needs to be evaluated. If the evaluation succeeds, the feature is
included. Here is a short explanation of each option:

*  -release ........... Compile and link Qt with debugging turned off.
    -debug ............. Compile and link Qt with debugging turned on.
    -debug-and-release . Compile and link two versions of Qt, with and without
                         debugging turned on (Mac only).

    -developer-build.... Compile and link Qt with Qt developer options (including auto-tests exporting)

    -opensource......... Compile and link the Open-Source Edition of Qt.
    -commercial......... Compile and link the Commercial Edition of Qt.


*  -shared ............ Create and use shared Qt libraries.
    -static ............ Create and use static Qt libraries.

*  -no-fast ........... Configure Qt normally by generating Makefiles for all
                         project files.
    -fast .............. Configure Qt quickly by generating Makefiles only for
                         library and subdirectory targets.  All other Makefiles
                         are created as wrappers, which will in turn run qmake.

    -no-largefile ...... Disables large file support.
+  -largefile ......... Enables Qt to access files larger than 4 GB.

*  -no-exceptions ..... Disable exceptions on compilers that support it.
    -exceptions ........ Enable exceptions on compilers that support it.

    -no-accessibility .. Do not compile Accessibility support.
*  -accessibility ..... Compile Accessibility support.

    -no-stl ............ Do not compile STL support.
*  -stl ............... Compile STL support.

    -no-sql-<driver> ... Disable SQL <driver> entirely.
    -qt-sql-<driver> ... Enable a SQL <driver> in the QtSql library, by default
                         none are turned on.
    -plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
                         at run time.

                         Possible values for <driver>:
                         [  db2 ibase mysql oci odbc psql sqlite sqlite2 tds ]

    -system-sqlite ..... Use sqlite from the operating system.

    -no-qt3support ..... Disables the Qt 3 support functionality.
*  -qt3support ........ Enables the Qt 3 support functionality.

    -no-xmlpatterns .... Do not build the QtXmlPatterns module.
+  -xmlpatterns ....... Build the QtXmlPatterns module.
                         QtXmlPatterns is built if a decent C++ compiler
                         is used and exceptions are enabled.

    -no-phonon ......... Do not build the Phonon module.
+  -phonon ............ Build the Phonon module.
                         Phonon is built if a decent C++ compiler is used.
    -no-phonon-backend.. Do not build the platform phonon plugin.
+  -phonon-backend..... Build the platform phonon plugin.

    -no-svg ............ Do not build the SVG module.
+  -svg ............... Build the SVG module.

    -no-webkit ......... Do not build the WebKit module.
+  -webkit ............ Build the WebKit module.
                         WebKit is built if a decent C++ compiler is used.

    -no-scripttools .... Do not build the QtScriptTools module.
+  -scripttools ....... Build the QtScriptTools module.

    -platform target ... The operating system and compiler you are building
                         on (qws/linux-x86-g++).

                         See the README file for a list of supported
                         operating systems and compilers.

    -no-mmx ............ Do not compile with use of MMX instructions.
    -no-3dnow .......... Do not compile with use of 3DNOW instructions.
    -no-sse ............ Do not compile with use of SSE instructions.
    -no-sse2 ........... Do not compile with use of SSE2 instructions.

    -qtnamespace <name>  Wraps all Qt library code in 'namespace <name> {...}'.
    -qtlibinfix <infix>  Renames all libQt*.so to libQt*<infix>.so.

    -D <string> ........ Add an explicit define to the preprocessor.
    -I <string> ........ Add an explicit include path.
    -L <string> ........ Add an explicit library path.

    -help, -h .......... Display this information.

Third Party Libraries:

    -qt-zlib ........... Use the zlib bundled with Qt.
+  -system-zlib ....... Use zlib from the operating system.
                         See http://www.gzip.org/zlib

    -no-gif ............ Do not compile the plugin for GIF reading support.
*  -qt-gif ............ Compile the plugin for GIF reading support.
                         See also src/plugins/imageformats/gif/qgifhandler.h

    -no-libtiff ........ Do not compile the plugin for TIFF support.
    -qt-libtiff ........ Use the libtiff bundled with Qt.
+  -system-libtiff .... Use libtiff from the operating system.
                         See http://www.libtiff.org

    -no-libpng ......... Do not compile in PNG support.
    -qt-libpng ......... Use the libpng bundled with Qt.
+  -system-libpng ..... Use libpng from the operating system.
                         See http://www.libpng.org/pub/png

    -no-libmng ......... Do not compile the plugin for MNG support.
    -qt-libmng ......... Use the libmng bundled with Qt.
+  -system-libmng ..... Use libmng from the operating system.
                         See http://www.libmng.com

    -no-libjpeg ........ Do not compile the plugin for JPEG support.
    -qt-libjpeg ........ Use the libjpeg bundled with Qt.
+  -system-libjpeg .... Use libjpeg from the operating system.
                         See http://www.ijg.org

    -no-openssl ........ Do not compile support for OpenSSL.
+  -openssl ........... Enable run-time OpenSSL support.
    -openssl-linked .... Enabled linked OpenSSL support.

    -ptmalloc .......... Override the system memory allocator with ptmalloc.
                         (Experimental.)

Additional options:

    -make <part> ....... Add part to the list of parts to be built at make time.
                         (libs tools examples demos docs translations)
    -nomake <part> ..... Exclude part from the list of parts to be built.

    -R <string> ........ Add an explicit runtime library path to the Qt
                         libraries.
    -l <string> ........ Add an explicit library.

    -no-rpath .......... Do not use the library install path as a runtime
                         library path.
+  -rpath ............. Link Qt libraries and executables using the library
                         install path as a runtime library path. Equivalent
                         to -R install_libpath

    -continue .......... Continue as far as possible if an error occurs.

    -verbose, -v ....... Print verbose information about each step of the
                         configure process.

    -silent ............ Reduce the build output so that warnings and errors
                         can be seen more easily.

*  -no-optimized-qmake ... Do not build qmake optimized.
    -optimized-qmake ...... Build qmake optimized.

    -no-nis ............ Do not compile NIS support.
*  -nis ............... Compile NIS support.

    -no-cups ........... Do not compile CUPS support.
*  -cups .............. Compile CUPS support.
                         Requires cups/cups.h and libcups.so.2.

    -no-iconv .......... Do not compile support for iconv(3).
*  -iconv ............. Compile support for iconv(3).

    -no-pch ............ Do not use precompiled header support.
*  -pch ............... Use precompiled header support.

    -no-dbus ........... Do not compile the QtDBus module.
+  -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
    -dbus-linked ....... Compile the QtDBus module and link to libdbus-1.

    -reduce-relocations ..... Reduce relocations in the libraries through extra
                              linker optimizations (Qt/X11 and Qt for Embedded Linux only;
                              experimental; needs GNU ld >= 2.18).

    -no-separate-debug-info . Do not store debug information in a separate file.
*  -separate-debug-info .... Strip debug information into a separate .debug file.


Qt for Embedded Linux only:

    -xplatform target ... The target platform when cross-compiling.

    -no-feature-<feature> Do not compile in <feature>.
    -feature-<feature> .. Compile in <feature>. The available features
                          are described in src/corelib/global/qfeatures.txt

    -embedded <arch> .... This will enable the embedded build, you must have a
                          proper license for this switch to work.
                          Example values for <arch>: arm mips x86 generic

    -armfpa ............. Target platform is uses the ARM-FPA floating point format.
    -no-armfpa .......... Target platform does not use the ARM-FPA floating point format.

                          The floating point format is usually autodetected by configure. Use this
                          to override the detected value.

    -little-endian ...... Target platform is little endian (LSB first).
    -big-endian ......... Target platform is big endian (MSB first).

    -host-little-endian . Host platform is little endian (LSB first).
    -host-big-endian .... Host platform is big endian (MSB first).

                          You only need to specify the endianness when
                          cross-compiling, otherwise the host
                          endianness will be used.

    -no-freetype ........ Do not compile in Freetype2 support.
    -qt-freetype ........ Use the libfreetype bundled with Qt.
*  -system-freetype .... Use libfreetype from the operating system.
                          See http://www.freetype.org/

    -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
                          default (full).

    -depths <list> ...... Comma-separated list of supported bit-per-pixel
                          depths, from: 1, 4, 8, 12, 15, 16, 18, 24, 32 and 'all'.

    -qt-decoration-<style> ....Enable a decoration <style> in the QtGui library,
                               by default all available decorations are on.
                   Possible values for <style>: [ styled windows default ]
    -plugin-decoration-<style> Enable decoration <style> as a plugin to be
                               linked to at run time.
                   Possible values for <style>: [  default styled windows ]
    -no-decoration-<style> ....Disable decoration <style> entirely.
                               Possible values for <style>: [ styled windows default ]

    -no-opengl .......... Do not support OpenGL.
    -opengl <api> ....... Enable OpenGL ES support
                          With no parameter, this will attempt to auto-detect OpenGL ES 1.x
                          or 2.x. Use es1, es1cl or es2 for <api> to override auto-detection.

                          NOTE: A QGLScreen driver for the hardware is required to support
                                OpenGL ES on Qt for Embedded Linux.

    -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 ]

    -qt-kbd-<driver> ... Enable a keyboard <driver> in the QtGui library.
                         Possible values for <driver>: [ tty usb sl5000 yopy vr41xx qvfb ]

    -plugin-kbd-<driver> Enable keyboard <driver> as a plugin to be linked to
                         at runtime.
                         Possible values for <driver>: [  linuxis sl5000 usb vr41xx yopy ]

    -no-kbd-<driver> ... Disable keyboard <driver> entirely.
                         Possible values for <driver>: [ tty usb sl5000 yopy vr41xx qvfb ]

    -qt-mouse-<driver> ... Enable a mouse <driver> in the QtGui library.
                           Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ]
    -plugin-mouse-<driver> Enable mouse <driver> as a plugin to be linked to
                           at runtime.
                           Possible values for <driver>: [  bus linuxis linuxtp pc tslib vr41xx yopy ]
    -no-mouse-<driver> ... Disable mouse <driver> entirely.
                           Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib qvfb ]

    -iwmmxt ............ Compile using the iWMMXt instruction set
                         (available on some XScale CPUs).

    -no-glib ........... Do not compile Glib support.
+  -glib .............. Compile Glib support.

leasia 2009-08-06 09:38
请问oneke有没有解决你那个问题?如果解决了,可否分享一下?

dedward 2010-03-28 23:36
ubuntu8.10下编译qtopia 4.2.4
qtopia的configure没问题
qtopia core在configure时显示
Cannot find file: /home/edward/build/qtopia/qtopia-opensource-4.2.4/qtopiacore/qt/projects.pro.
然后make的时候显示
make: *** No rule to make target `../qtopia-opensource-4.2.4/qtopiacore/qt/projects.pro', needed by `Makefile'.  Stop.
请问是什么原因?  

喃喃 2010-09-06 13:17
很好很强大,

天涯羽飞 2011-03-09 11:08
编译基于directFB后,运行例子
出现的错误提示为:
warning!!! Virtual Command queue has been activated!!
(!) [Main Thread     753.577] (  311) *** Assertion [((IAny*)thiz)->magic == D_MAGIC("DirectInterface")] failed *** [idirectfbinputbuffer.c:888 in IDirectFBEventBuffer_AttachWindow()]
[SELP COREDUMP] SIGNR:5

平台为 mips
配置为
./configure -prefix /home/MStar28/Qt_4.7.2 -embedded mips -little-endian -largefile -no-qt3support -no-phonon -no-phonon-backend -no-svg  -no-mmx  -no-3dnow  -no-sse -no-sse2  -no-opengl -no-openssl  -no-cups  -no-nis   -qt-gif  -qt-libtiff -qt-libmng  -system-libjpeg  -system-libpng   -system-zlib  -system-freetype  -nomake demos  -nomake examples -make libs  -nomake tools -no-kbd-linuxinput  -no-kbd-tty -no-kbd-qvfb  -qt-gfx-directfb -no-gfx-linuxfb -no-gfx-transformed
  -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen-no-mouse-linuxt -no-mouse-pc   -no-webkit  -no-javascript-jit  -no-glib   -no-dbus -no-sql-db  -no-sql-postgres   -no-sql-oracle  -no-sql-ibase   -no-sql-mysql   -no-sql-oci -no-sql-odbc -no-sql-psql     -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -no-multimedia -release -shared -opensource

ssrlxl 2011-12-04 14:27
/usr/local/arm/qt-everywhere-opensource-src-4.7.3/bin/uic dialogs/qpagesetupwidget.ui -o .uic/release-shared-emb-arm/ui_qpagesetupwidget.h
make[1]: *** [.uic/release-shared-emb-arm/ui_qpagesetupwidget.h] 段错误
make[1]: *** 正在删除文件“.uic/release-shared-emb-arm/ui_qpagesetupwidget.h”
make[1]:正在离开目录 `/usr/local/arm/qt-everywhere-opensource-src-4.7.3/src/gui'
make: *** [sub-gui-make_default-ordered] 错误 2
这是怎么回事,求指教啊

victoire 2014-02-26 09:24
打开项目编译后,出现 exited with code 254是什么原因

victoire 2014-02-26 10:02
[attachment=11755],新错误


查看完整版本: [-- 开贴整理常见编译错误集锦 -- 不断更新中 --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled