1. The configure configuration used is:
. /Configure-embedded MIPS-little-Endian-xplatform qws/Linux-MIPS-G ++-Prefix/opt/qte462-mips-release-opensource-confirm-license-WebKit-QT-zlib -QT-libpng-QT-libjpeg-QT-GIF-I $ qtdir/include/libz-L $ qtdir/lib-no-qt3support-make libs-nomake examples-nomake demos-no- multimedia-no-phonon-backend-no-Accessibility-no-script-no-scripttools-qconfig Ranger
Previously used:
. /Configure-embedded MIPS-little-Endian-xplatform qws/Linux-MIPS-G ++-Prefix/opt/qte450-mips-confirm-license-QT-zlib-QT-libpng-QT -libjpeg-QT-GIF-I $ qtdir/include/libz-L $ qtdir/lib-no-qt3support-no-phonon-backend-no-Accessibility-no-scripttools -qconfig Ranger
For version 4.5.0
. /Configure-embedded MIPS-little-Endian-xplatform qws/Linux-MIPS-G ++-Prefix/opt/qte450-mips-confirm-license-QT-zlib-QT-libpng-QT -libjpeg-QT-GIF-I $ qtdir/include/libz-L $ qtdir/lib-no-qt3support-nomake examples-nomake demos-no-WebKit-no-phonon -backend-no-Accessibility-no-scripttools-qconfig Ranger
. /Configure-Embedded ARM-little-Endian-xplatform qws/Linux-arm-G ++-Prefix/opt/qte450-3560e-confirm-license-QT-zlib-QT-libpng-QT -libjpeg-QT-GIF-no-qt3support-nomake examples-nomake demos-no-WebKit-no-phonon-backend-no-Accessibility-no-scripttools-qconfig Ranger
2. It is encountered when compiling the qtgui part, but not every time. It does not exist during the first compilation.
Mipsel-Linux-G ++-C-include. PCH/release-shared-Emb-MIPS/qtgui-pipe-mips32-fno-tions-O2-fvisibility = hidden-fvisibility-inlines-hidden-wall-w-d_reentrant-FPIC- dqt_shared-benchmark-dqt_moc_compat-compute-dqt_no_fontconfig-dft2_build_library-metadata-dqt_no_opentype-extract-transform-extract-ignore- dqt_network_lib-dqt_core_lib-d_largefile64_source-d_largefile_source-ihttp: // www.cnblogs.com/mkspecs/qws/linux-mips-g++-I. -ihttp: // www.cnblogs.com/include/qtcore-ihttp: // www.cnblogs.com/include/qtnetwork-ihttp: // www.cnblogs.com/include-ihttp: // your-I. RCC/release-shared-Emb-MIPS-I .. /3 rdparty/libpng-I .. /3 rdparty/zlib-I .. /3 rdparty/zlib-I .. /3 rdparty/FreeType/builds/Unix-I .. /3 rdparty/FreeType/src-I .. /3 rdparty/FreeType/include-I .. /3 rdparty/harfbuzz/src-idialogs-I. MOC/release-shared-Emb-MIPS-I. UIC/release-shared-Emb-MIPS-o. OBJ/release-shared-Emb-MIPS/qpnghandler. o image/qpnghandler. CPP
In file encoded ded from ../3 rdparty/libpng/PNG. h: 501,
From image/qpnghandler. cpp: 53:
../3 rdparty/libpng/pngconf. h: 338: Error: Expected constructor, destructor, or type conversion before '. 'token
../3 rdparty/libpng/pngconf. h: 339: Error: '_ dont _' does not name a type
Make [1]: *** [. OBJ/release-shared-Emb-MIPS/qpnghandler. O] Error 1
Make [1]: Leaving directory '/home/yuchao/qte-4.6.2/src/gu'
Online prompt:
Http://forum.soft32.com/linux/conflict-ftstdlib-freetype-library-pngconf-ftopict439998.html
|/* If you encounter a compiler error here, see the explanation
| * Near the end of install.
| */
Do anyone of you have a idea how to work around und such problem? I read
Install file. There are two suggestion:
1. Comment out following two lines:
| _ PNG. H _ already des setjmp. h;
| _ Dont _ include it again .;
2. Use c0000t interface but I don't understand that.
I will comment out the two lines.
3. Compiling qtscript
Mipsel-Linux-G ++-wl,-rpath-link,/home/yuchao/qte-4.6.2/lib-fno-exceptions-wl, -- no-undefined-wl, -O1-wl,-rpath,/opt/qte462-mips/lib-wl,-rpath,/opt/qte462-mips/lib-shared-wl,-soname, libqtscript. so.4-O libqtscript. so.4.6.2 OBJ/release/pcre_compile.o OBJ/release/pcre_exec.o OBJ/release/pcre_tables.o OBJ/release/eclipobj/release/pcre_xclass.o OBJ/release/assertions. o obj/release/bytearray. o obj/release/hashtable. o obj/release/mainthread. o obj/release/randomnumber. o obj/release/refcountedleakcounter. o obj/release/typetraits. o obj/release/collatordefault. o obj/release/collatoricu. o obj/release/utf8.o OBJ/release/jsbase. o obj/release/jscallbackconstructor. o obj/release/jscallbackfunction. o obj/release/jscallbackobject. o obj/release/jsclassref. o obj/release/jscontextref. o obj/release/jsobjectref. o obj/release/jsstringref. o obj/release/jsvalueref. o obj/release/opaquejsstring. o obj/release/initializethreading. o obj/release/jsglobaldata. o obj/release/jsglobalobject. o obj/release/jsstaticscopeobject. o obj/release/jsvariableobject. o obj/release/jsactivation. o obj/release/jsnotanobject. o obj/release/jsonobject. o obj/release/literalparser. o obj/release/markstack. o obj/release/timeoutchecker. o obj/release/codeblock. o obj/release/structurestubinfo. o obj/release/jumptable. o obj/release/armassembler. o obj/release/macrow.erarm. o obj/release/JIT. o obj/release/jitcall. o obj/release/jitarithmetic. o obj/release/jitopcodes. o obj/release/jitpropertyaccess. o obj/release/executableallocator. o obj/release/jitstubs. o obj/release/bytecodegenerator. o obj/release/exceptionhelpers. o obj/release/jspropertynameiterator. o obj/release/interpreter. o obj/release/opcode. o obj/release/samplingtool. o obj/release/regexcompiler. o obj/release/regexinterpreter. o obj/release/regexjit. o obj/release/registerfile. o obj/release/executableallocatorposix. o obj/release/markstackposix. o obj/release/tcsystemalloc. o obj/release/Arglist. o obj/release/arguments. o obj/release/arrayconstructor. o obj/release/arrayprototype. o obj/release/booleanconstructor. o obj/release/booleanobject. o obj/release/booleanprototype. o obj/release/calldata. o obj/release/collector. o obj/release/commonidentifiers. o obj/release/constructdata. o obj/release/currenttime. o obj/release/dateconstructor. o obj/release/dateconversion. o obj/release/dateinstance. o obj/release/dateprototype. o obj/release/debugger. o obj/release/debuggercallframe. o obj/release/debuggeractivation. o obj/release/dtoa. o obj/release/error. o obj/release/errorconstructor. o obj/release/errorinstance. o obj/release/errorprototype. o obj/release/callframe. o obj/release/executable. o obj/release/functionconstructor. o obj/release/functionprototype. o obj/release/gettersetter. o obj/release/globalevalfunction. o obj/release/identifier. o obj/release/internalfunction. o obj/release/completion. o obj/release/jsarray. o obj/release/jsapivaluewrapper. o obj/release/jsbytearray. o obj/release/jscell. o obj/release/jsfunction. o obj/release/jsglobalobjectfunctions. o obj/release/jsimmediate. o obj/release/jslock. o obj/release/jsnumbercell. o obj/release/jsobject. o obj/release/jsstring. o obj/release/jsvalue. o obj/release/jswrapperobject. o obj/release/lexer. o obj/release/lookup. o obj/release/mathobject. o obj/release/nativeerrorconstructor. o obj/release/nativeerrorprototype. o obj/release/nodes. o obj/release/numberconstructor. o obj/release/numberobject. o obj/release/numberprototype. o obj/release/objectconstructor. o obj/release/objectprototype. o obj/release/operations. o obj/release/parser. o obj/release/parserarena. o obj/release/propertydescriptor. o obj/release/propertynamearray. o obj/release/propertyslot. o obj/release/prototypefunction. o obj/release/Regexp. o obj/release/regexpconstructor. o obj/release/regexpobject. o obj/release/regexpprototype. o obj/release/scopechain. o obj/release/smallstrings. o obj/release/stringconstructor. o obj/release/stringobject. o obj/release/stringprototype. o obj/release/structure. o obj/release/structurechain. o obj/release/ustring. o obj/release/heavyprofile. o obj/release/profile. o obj/release/profilegenerator. o obj/release/profilenode. o obj/release/profiler. o obj/release/treeprofile. o obj/release/datemath. o obj/release/fastmalloc. o obj/release/threading. o obj/release/mainthreadqt. o obj/release/threadingqt. o obj/release/grammar. o obj/release/qscriptclass. o obj/release/qscriptclasspropertyiterator. o obj/release/qscriptcontext. o obj/release/qscriptcontextinfo. o obj/release/qscriptengine. o obj/release/qscriptengineagent. o obj/release/qscriptextensionplugin. o obj/release/qscriptprogram. o obj/release/qscriptstring. o obj/release/qscriptvalue. o obj/release/qscriptvalueiterator. o obj/release/qscriptable. o obj/release/qscriptfunction. o obj/release/qscriptobject. o obj/release/qscriptclassobject. o obj/release/qscriptvariant. o obj/release/qscriptqobject. o obj/release/qscriptglobalobject. o obj/release/qscriptactivationobject. o obj/release/qscriptdeclarativeobject. o obj/release/qscriptdeclarativeclass. o obj/release/qscriptast. o obj/release/qscriptastvisitor. o obj/release/qscriptgrammar. o obj/release/qscriptsyntaxchecker. o obj/release/qscriptlexer. o obj/release/qscriptdate. o obj/release/moc_qscriptextensionplugin.o-L/home/yuchao/qte-4.6.2/lib-lqtcore-L/home/yuchao/qte-4.6.2/lib-lpthread
OBJ/release/jsvalue. O: In function 'qtjsc: touint32slowcase (double, bool &)':
Jsvalue. cpp: (. Text + 0x114): Undefined reference to 'trunc'
OBJ/release/jsvalue. O: In function 'qtjsc: toint32slowcase (double, bool &)':
Jsvalue. cpp: (. Text + 0x244): Undefined reference to 'trunc'
OBJ/release/jsvalue. O: In function 'qtjsc: jsvalue: tointeger (qtjsc: execstate *) const ':
Jsvalue. cpp: (. Text + 0x374): Undefined reference to 'trunc'
OBJ/release/jsvalue. O: In function 'qtjsc: jsvalue: tointegerpreservenan (qtjsc: execstate *) const ':
Jsvalue. cpp :(. Text + 0x3ec): Undefined reference to 'trunc'
OBJ/release/datemath. O: In function 'qtwtf: timeclip (double )':
Datemath. cpp :(. Text + 0x30c): Undefined reference to 'trunc'
Collect2: LD returned 1 exit status
Make: *** [http://www.cnblogs.com/lib/libqtscript.so.4.6.2] Error 1
The file src/3 dparty/javascriptcore is referenced in qtscript, so the trunc problem is OK after the trunc definition is opened in the corresponding directory */javascriptcore/WTF/mathextras. h.
4. WebKit Library link:
And you can see that it only needs to link to the QT Library:-L/home/yuchao/qte-4.6.2/lib-lqtgui-L/home/yuchao/qte-4.6.2/lib-lqtnetwork-lqtcore
Rm-F libqtwebkit. so.4.6.2 libqtwebkit. So libqtwebkit. so.4 libqtwebkit. so.4.6
MIPs-Linux-G ++-wl,-rpath-link,/home/yuchao/qte-4.6.2/lib-fno-exceptions-wl, -- no-undefined-wl, -- GC-sections-wl,-O1-wl,-rpath,/opt/qte462-mips/lib-wl,-rpath,/opt/qte462-mips/lib-shared-wl, -soname, libqtwebkit. so.4-O libqtwebkit. so.4.6.2 OBJ/release/pcre_compile.o OBJ/release/pcre_exec.o OBJ/release/pcre_tables.o OBJ/release/eclipobj/release/pcre_xclass.o OBJ/release/assertions. o obj/release/bytearray. o obj/release/hashtable. o obj/release/mainthread. o obj/release/randomnumber. o obj/release/refcountedleakcounter. o obj/release/typetraits. o obj/release/collatordefault. o obj/release/collatoricu. o obj/release/utf8.o OBJ/release/jsbase. o obj/release/jscallbackconstructor. o obj/release/jscallbackfunction. o obj/release/jscallbackobject. o obj/release/jsclassref. o obj/release/jscontext
.....................
.....................
J/release/jssvgtransform. o obj/release/jssvgtransformlist. o obj/release/jssvgtrefelement. o obj/release/jssvgtspanelement. o obj/release/jssvgunittypes. o obj/release/jssvguseelement. o obj/release/jssvgviewelement. o obj/release/jswebsocket. o obj/release/js?actworker. o obj/release/jsdedicatedworkercontext. o obj/release/jssharedworker. o obj/release/jssharedworkercontext. o obj/release/jsworker. o obj/release/jsworkercontext. o obj/release/jsworkerlocation. o obj/release/jsdomparser. o obj/release/jsxmlhttprequest. o obj/release/jsxmlhttprequestexception. o obj/release/jsxmlhttprequestprogressevent. o obj/release/jsxmlhttprequestupload. o obj/release/jsxmlserializer. o obj/release/jsxpathnsresolver. o obj/release/jsxpathexception. o obj/release/jsxpathexpression. o obj/release/jsxpathresult. o obj/release/jsxpathevaluator. o obj/release/js1_tprocessor. o obj/release/cssgrammar. o obj/release/htmlnames. o obj/release/htmlelementfactory. o obj/release/jshtmlelementwrapperfactory. o obj/release/xmlnames. o obj/release/useragentstylesheetsdata. o obj/release/xpathgrammar. o obj/release/moc_qwebframe.o OBJ/release/moc_qwebinspector.o OBJ/release/qrc_webcore.o OBJ/release/ qrc_webkit.o-L/home/yuchao/qte-4.6.2/lib-lqtgui-L/home/yuchao/qte-4.6.2/lib-lqtnetwork-lqtcore-lpthread
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. _ values + 0x4d0): More undefined references to 'trunc 'follow
Collect2: LD returned 1 exit status
Make [1]: *** [http://www.cnblogs.com/http://www.cnblogs.com/lib/libqtwebkit.so.4.6.2] Error 1
Make [1]: Leaving directory '/home/yuchao/qte-4.6.2/src/3 rdparty/WebKit/webcore'
Make: *** [sub-webkit-make_default-ordered] Error 2
(1) After the trunc definition is enabled in src/3 rdparty/WebKit/javascriptcore/WTF/mathextras. H
Trunc problem OK
(2) undefined reference to '_ libc_stack_end
Disable uclibc_use_proc_self_maps in collector. cpp.
If this problem occurs in version 4.5, other macros such as _ uclibc __:
# Ifdef _ uclibc __
// Versions of uclibc 0.9.28 and below do not have // pthread_getattr_np or pthread_attr_getstack.
# If _ uclibc_major _ = 0 &&\
(_ Uclibc_minor _ <9 | \
(_ Uclibc_minor _ = 9 & _ uclibc_sublevel _ <= 30 ))
# Define uclibc_use_proc_self_maps 1
# Include <stdio_ext.h>
Extern int * _ libc_stack_end;
# Endif
# Endif
++ ++ ++
Online Reference: a common error in qtembedded compilation on the MIPs Platform
Http://www.cuteqt.com/blog? P = 911
Also see http://www.qtcn.org/bbs/read.php? Tid = 26709 & page = 2
All posts on this site are reserved by this site and the original author. This article can only be reproduced if the copyright information, original article links, and original article authors are retained. Do not delete or modify the original article content for reprinting, it is not intended for commercial purposes. Thank you for your cooperation.
Original article: A common error in qtembedded compilation on the MIPs Platform
Error output:
Libqtwebkit. So: Undefined reference to 'trunc'
Libqtwebkit. So: Undefined reference to 'lroundf'
Libqtwebkit. So: Undefined reference to 'roundf'
Libqtwebkit. So: Undefined reference to 'lround'
These functions are defined in the mathematical library in Linux, that is, libm. So or libm.. However, some toolchina does not include these functions when creating the basic library. You can use
$ Nm libm. So | grep trunc
Or
$ Strings libm. So | grep trunc
Check whether the corresponding function is defined.
The most intuitive solution is to re-compile a mathematical library with functions such as trunc/roundf. It can also benefit other applications or application frameworks that reference the libm library.
If you only compile QT, another solution is to implement these functions by yourself. Because the Windows version of the math library does not contain these functions, the QT code already comes with the implementation code of these functions. I take QtEmbedded-4.5.2 as an example to see the code
Src/3 rdparty/WebKit/javascriptcore/WTF/mathextras. h
105 # If Compiler (msvc) | Compiler (rvct)
106
107 inline long lround (double num) {return static_cast <long> (Num> 0? Num + 0.5: Ceil (Num-0.5 ));}
108 inline long lroundf (float num) {return static_cast <long> (Num> 0? Num + 0.5f: ceilf (Num-0.5f ));}
109 inline double round (double num) {return num> 0? Floor (Num + 0.5): Ceil (Num-0.5 );}
110 inline float roundf (float num) {return num> 0? Floopen-end (Num + 0.5f): ceilf (Num-0.5f );}
111 inline double trunc (double num) {return num> 0? Floor (Num): Ceil (Num );}
112
113 # endif
The code shown above can be compiled only when msvc is used. We can naturally control whether the macro is compiled by ourselves. This macro can be used in qmake. add the qmake_cxxflags or qmake_cflags environment variable in Conf
++ ++ ++
4. Problems with using the new WebKit Library:
Swapp: can't resolve symbol' _ zn9qhashdata14detach_helper2epfvpns_4nodeepvepfvs1_eii 'in lib'/mnt/lib/libqtwebkit. so.4'
Apparently, the new version of WebKit does not merge the original modifications.