回复: 请问在Broadcom 7405的板子上如何编译qt-everywhere-opensource-src-4.6.2.tar.gz?
#6 [davidchiu 03-18 14:53]
qt-everywhere-opensource-src-4.6.2.tar.gz中的lib里面的so库文件,都是big endian版本的,导致example无法编译,又得回去修改configure参数,郁闷。
==================
说错了,这些so文件是早期自己用big endian的mips-linux-g++编译的,修改congfigure,将-static去掉,执行之后,重新生产Makefile,然后跑到src目录的corelib、network、xml等目录下面重新make,将生产相关的新的little endian的so文件就可以用了。
然后可以继续gmake了。
#7 [davidchiu 03-18 19:05]
有出现如下的问题:
obj/release/Collector.o: In function `JSC::Heap::markCurrentThreadConservativelyInternal(JSC::MarkStack&)':
Collector.cpp:(.text._ZN3JSC4Heap39markCurrentThreadConservativelyInternalERNS_9MarkStackE+0x74): undefined reference to `__libc_stack_end'
obj/release/JSValue.o: In function `JSC::toUInt32SlowCase(double, bool&)':
JSValue.cpp:(.text._ZN3JSC16toUInt32SlowCaseEdRb+0xf8): undefined reference to `trunc'
obj/release/JSValue.o: In function `JSC::toInt32SlowCase(double, bool&)':
JSValue.cpp:(.text._ZN3JSC15toInt32SlowCaseEdRb+0xc0): undefined reference to `trunc'
obj/release/JSValue.o: In function `JSC::JSValue::toInteger(JSC::ExecState*) const':
JSValue.cpp:(.text._ZNK3JSC7JSValue9toIntegerEPNS_9ExecStateE+0xc0): undefined reference to `trunc'
obj/release/JSValue.o: In function `JSC::JSValue::toIntegerPreserveNaN(JSC::ExecState*) const':
JSValue.cpp:(.text._ZNK3JSC7JSValue20toIntegerPreserveNaNEPNS_9ExecStateE+0x3c): undefined reference to `trunc'
obj/release/DateMath.o: In function `WTF::timeClip(double)':
DateMath.cpp:(.text._ZN3WTF8timeClipEd+0x5c): undefined reference to `trunc'
obj/release/qt_runtime.o:qt_runtime.cpp:(.text._ZN3JSC8Bindings22convertQVariantToValueEPNS_9ExecStateEN3WTF10PassRefPtrINS0_10RootObjectEEERK8QVariant+0x4d0): more undefined references to `trunc' follow
===============================================
莫非mipse-linux-g++的版本太低导致的?
mipse-linux-g++ 版本4.2看样子真的不行~
#8 [davidchiu 03-19 14:55]
编译最终通过了!
gmake
gmake install
都完成了!
但是所有的例子程序在开发板上运行都是Segmentation fault,原因,原因何在?
#9 [davidchiu 03-20 15:51]
终于知道原因了,
所有example编译时带上-lpthread
就是导致Segmentation fault,具体原因不知道!
去掉-lpthread,重新编译,生成的example终于能跑起来了,不再出现Segmentation fault!
但是
但是
但是
..........
但是执行
./app -qws -display directfb
没有任何反应(屏幕不显示任何东西),似乎死掉了,极度郁闷呀!
#10 [davidchiu 03-23 11:15]
去掉-static,编译到libQtScript.so.4.6.2时,出现如下错误:
/opt/toolchains/crosstools_hf-linux-2.6.18.0_gcc-4.2-10ts_uclibc-nptl-0.9.29-20070423_20080721/bin/../lib/gcc/mipsel-linux-uclibc/4.2.0/../../../../mipsel-linux-uclibc/bin/ld: non-dynamic relocations refer to dynamic symbol floor
/opt/toolchains/crosstools_hf-linux-2.6.18.0_gcc-4.2-10ts_uclibc-nptl-0.9.29-20070423_20080721/bin/../lib/gcc/mipsel-linux-uclibc/4.2.0/../../../../mipsel-linux-uclibc/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
gmake: *** [../../lib/libQtScript.so.4.6.2]1
已经带上了-g -fPIC -shared,咋还是有问题呢?