WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
15773
Compile support for mingw with QtWebKit on windows
https://bugs.webkit.org/show_bug.cgi?id=15773
Summary
Compile support for mingw with QtWebKit on windows
Muzaffar Mahkamov
Reported
2007-10-31 00:00:59 PDT
I'm not able to compile Webkit on QT windows open source version (Qt 4.3.2). There's neither localtime_r nor localtime_s in MinGW. g++ -c -Wreturn-type -fno-strict-aliasing -O2 -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -DBUILDING_QT__=1 -DUSE_SYSTEM_MALLOC -DNDEBUG -DBUILD_WEBKIT -DENABLE_ICONDATABASE=0 -DENABLE_DATABASE=0 -DENABLE_XPATH=1 -DENABLE_SVG=1 -DWTF_CHANGES=1 -DBUILDING_QT__ -DWTF_USE_JAVASCRIPTCORE_BINDINGS=1 -DQT_DLL -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\4.3.2\include\QtCore" -I"c:\Qt\4.3.2\include\QtCore" -I"c:\Qt\4.3.2\include\QtNetwork" -I"c:\Qt\4.3.2\include\QtNetwork" -I"c:\Qt\4.3.2\include\QtGui" -I"c:\Qt\4.3.2\include\QtGui" -I"c:\Qt\4.3.2\include\QtXml" -I"c:\Qt\4.3.2\include\QtXml" -I"c:\Qt\4.3.2\include" -I"..\..\..\WebKit\qt\Api" -I"..\..\..\JavaScriptCore" -I"..\..\..\JavaScriptCore\kjs" -I"..\..\..\JavaScriptCore\bindings" -I"..\..\..\JavaScriptCore\bindings\c" -I"..\..\..\JavaScriptCore\wtf" -I"..\..\..\JavaScriptCore\ForwardingHeaders" -I"..\..\..\WebCore" -I"..\..\..\WebCore\ForwardingHeaders" -I"..\..\..\WebCore\platform" -I"..\..\..\WebCore\platform\network" -I"..\..\..\WebCore\platform\graphics" -I"..\..\..\WebCore\loader" -I"..\..\..\WebCore\page" -I"..\..\..\WebCore\css" -I"..\..\..\WebCore\dom" -I"..\..\..\WebCore\bridge" -I"..\..\..\WebCore\editing" -I"..\..\..\WebCore\rendering" -I"..\..\..\WebCore\history" -I"..\..\..\WebCore\xml" -I"..\..\..\WebCore\html" -I"tmp" -I"tmp" -I"tmp" -I"..\..\..\JavaScriptCore" -I"..\..\..\JavaScr iptCore\kjs" -I"..\..\..\JavaScriptCore\bindings" -I"..\..\..\JavaScriptCore\bindings\c" -I"..\..\..\JavaScriptCore\wtf" -I"..\..\..\JavaScriptCore\bindings\qt" -I"..\..\..\JavaScriptCore\pcre" -I"..\JavaScriptCore\kjs\tmp" -I"..\..\..\WebCore\platform\qt" -I"..\..\..\WebCore\platform\network\qt" -I"..\..\..\WebCore\platform\graphics\qt" -I"..\..\..\WebCore\platform\graphics\svg\qt" -I"..\..\..\WebCore\loader\qt" -I"..\..\..\WebCore\page\qt" -I"..\..\..\WebKit\qt\WebCoreSuppo rt" -I"..\..\..\WebKit\qt\Api" -I"..\..\..\WebCore" -I"..\..\..\WebCore\ForwardingHeaders" -I"..\..\..\..\WebKit" -I"..\..\..\JavaScriptCore\kjs" -I"..\..\..\JavaScriptCore\bindings" -I"..\..\..\JavaScriptCore\wtf" -I"..\..\..\WebCore\platform" -I"..\..\..\WebCore\platform\network" -I"..\..\..\WebCore\platform\graphics " -I"..\..\..\WebCore\platform\graphics\svg" -I"..\..\..\WebCore\platform\graphics\svg\filters" -I"..\..\..\WebCore\platform\sql" -I"..\..\..\WebCore\storage" -I"..\..\..\WebCore\loader" -I"..\..\..\WebCore\loader\icon" -I"..\..\..\WebCore\css" -I"..\..\..\WebCore\dom" -I"..\..\..\WebCore\page" -I"..\..\..\WebCore\bridge" -I"..\..\..\WebCore\editing" -I"..\..\..\WebCore\rendering" -I"..\..\..\WebC ore\history" -I"..\..\..\WebCore\xml" -I"..\..\..\WebCore\html" -I"..\..\..\WebCore\bindings\js" -I"..\..\..\WebCore\ksvg2" -I"..\..\..\WebCore\ksvg2\css" -I"..\..\..\WebCore\ksvg2\svg" -I"..\..\..\WebCore\ksvg2\misc" -I"..\..\..\WebCore\ksvg2\events" -I"..\..\..\WebCore\platform\image-decoders" -I"c:\Qt\4.3.2\include\ActiveQt" -I"release" -I"..\..\..\WebCore" -I"." -I"c:\Qt\4.3.2\mkspecs\win32-g+ +" -o tmp\FTPDirectoryDocument.o ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp: In function `WebCore::String WebCore::processFileDateString(const WebCore::FTPTime&)': ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp:236: error: `localtime_s' undeclared (first use this function) ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp:236: error: (Each undeclared identifier is reported only once for each function it appears in.) mingw32-make[2]: *** [tmp\FTPDirectoryDocument.o] Error 1 mingw32-make[2]: Leaving directory `C:/dev/WebKit/WebKitBuild/Release/WebCore' mingw32-make[1]: *** [release] Error 2 mingw32-make[1]: Leaving directory `C:/dev/WebKit/WebKitBuild/Release/WebCore' mingw32-make: *** [sub-WebCore-make_default-ordered] Error 2
Attachments
Add attachment
proposed patch, testcase, etc.
William Lee
Comment 1
2007-11-24 01:11:27 PST
I think you can use localtime instead of localtime_s and also gettime_s I remember that there be other issues, for example UChar etc. you need to define them as wchar_t for example. Hope it helps (In reply to
comment #0
)
> I'm not able to compile Webkit on QT windows open source version (Qt 4.3.2). > There's neither localtime_r nor localtime_s in MinGW. > > g++ -c -Wreturn-type -fno-strict-aliasing -O2 -frtti -fexceptions -mthreads > -DUNICODE -DQT_LARGEFILE_SUPPORT -DBUILDING_QT__=1 -DUSE_SYSTEM_MALLOC -DNDEBUG > -DBUILD_WEBKIT -DENABLE_ICONDATABASE=0 -DENABLE_DATABASE=0 -DENABLE_XPATH=1 > -DENABLE_SVG=1 -DWTF_CHANGES=1 -DBUILDING_QT__ > -DWTF_USE_JAVASCRIPTCORE_BINDINGS=1 -DQT_DLL -DQT_NO_DEBUG -DQT_XML_LIB > -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT > -I"c:\Qt\4.3.2\include\QtCore" -I"c:\Qt\4.3.2\include\QtCore" > -I"c:\Qt\4.3.2\include\QtNetwork" -I"c:\Qt\4.3.2\include\QtNetwork" > -I"c:\Qt\4.3.2\include\QtGui" -I"c:\Qt\4.3.2\include\QtGui" > -I"c:\Qt\4.3.2\include\QtXml" -I"c:\Qt\4.3.2\include\QtXml" > -I"c:\Qt\4.3.2\include" -I"..\..\..\WebKit\qt\Api" -I"..\..\..\JavaScriptCore" > -I"..\..\..\JavaScriptCore\kjs" -I"..\..\..\JavaScriptCore\bindings" > -I"..\..\..\JavaScriptCore\bindings\c" -I"..\..\..\JavaScriptCore\wtf" > -I"..\..\..\JavaScriptCore\ForwardingHeaders" -I"..\..\..\WebCore" > -I"..\..\..\WebCore\ForwardingHeaders" -I"..\..\..\WebCore\platform" > -I"..\..\..\WebCore\platform\network" -I"..\..\..\WebCore\platform\graphics" > -I"..\..\..\WebCore\loader" -I"..\..\..\WebCore\page" -I"..\..\..\WebCore\css" > -I"..\..\..\WebCore\dom" -I"..\..\..\WebCore\bridge" > -I"..\..\..\WebCore\editing" -I"..\..\..\WebCore\rendering" > -I"..\..\..\WebCore\history" -I"..\..\..\WebCore\xml" -I"..\..\..\WebCore\html" > -I"tmp" -I"tmp" -I"tmp" -I"..\..\..\JavaScriptCore" -I"..\..\..\JavaScr > iptCore\kjs" -I"..\..\..\JavaScriptCore\bindings" > -I"..\..\..\JavaScriptCore\bindings\c" -I"..\..\..\JavaScriptCore\wtf" > -I"..\..\..\JavaScriptCore\bindings\qt" -I"..\..\..\JavaScriptCore\pcre" > -I"..\JavaScriptCore\kjs\tmp" -I"..\..\..\WebCore\platform\qt" > -I"..\..\..\WebCore\platform\network\qt" > -I"..\..\..\WebCore\platform\graphics\qt" > -I"..\..\..\WebCore\platform\graphics\svg\qt" -I"..\..\..\WebCore\loader\qt" > -I"..\..\..\WebCore\page\qt" -I"..\..\..\WebKit\qt\WebCoreSuppo > rt" -I"..\..\..\WebKit\qt\Api" -I"..\..\..\WebCore" > -I"..\..\..\WebCore\ForwardingHeaders" -I"..\..\..\..\WebKit" > -I"..\..\..\JavaScriptCore\kjs" -I"..\..\..\JavaScriptCore\bindings" > -I"..\..\..\JavaScriptCore\wtf" -I"..\..\..\WebCore\platform" > -I"..\..\..\WebCore\platform\network" -I"..\..\..\WebCore\platform\graphics > " -I"..\..\..\WebCore\platform\graphics\svg" > -I"..\..\..\WebCore\platform\graphics\svg\filters" > -I"..\..\..\WebCore\platform\sql" -I"..\..\..\WebCore\storage" > -I"..\..\..\WebCore\loader" -I"..\..\..\WebCore\loader\icon" > -I"..\..\..\WebCore\css" -I"..\..\..\WebCore\dom" -I"..\..\..\WebCore\page" > -I"..\..\..\WebCore\bridge" -I"..\..\..\WebCore\editing" > -I"..\..\..\WebCore\rendering" -I"..\..\..\WebC > ore\history" -I"..\..\..\WebCore\xml" -I"..\..\..\WebCore\html" > -I"..\..\..\WebCore\bindings\js" -I"..\..\..\WebCore\ksvg2" > -I"..\..\..\WebCore\ksvg2\css" -I"..\..\..\WebCore\ksvg2\svg" > -I"..\..\..\WebCore\ksvg2\misc" -I"..\..\..\WebCore\ksvg2\events" > -I"..\..\..\WebCore\platform\image-decoders" -I"c:\Qt\4.3.2\include\ActiveQt" > -I"release" -I"..\..\..\WebCore" -I"." -I"c:\Qt\4.3.2\mkspecs\win32-g+ > +" -o tmp\FTPDirectoryDocument.o > ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp > ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp: In function `WebCore::String > WebCore::processFileDateString(const WebCore::FTPTime&)': > ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp:236: error: `localtime_s' > undeclared (first use this function) > ..\..\..\WebCore\loader\FTPDirectoryDocument.cpp:236: error: (Each undeclared > identifier is reported only once for each function it appears in.) > mingw32-make[2]: *** [tmp\FTPDirectoryDocument.o] Error 1 > mingw32-make[2]: Leaving directory `C:/dev/WebKit/WebKitBuild/Release/WebCore' > mingw32-make[1]: *** [release] Error 2 > mingw32-make[1]: Leaving directory `C:/dev/WebKit/WebKitBuild/Release/WebCore' > mingw32-make: *** [sub-WebCore-make_default-ordered] Error 2 >
Muzaffar Mahkamov
Comment 2
2007-11-24 02:54:07 PST
Yes, localtime works and this is actually how I declared localtime_s to compile QtWebKit: inline int localtime_s(struct tm* _tm, const time_t *time) { if(!_tm || !time) return EINVAL; tm* tmp = localtime(time); if(!tmp) return EINVAL; else { memcpy(_tm, tmp, sizeof(tm)); return 0; } } But the problem is that localtime() is not reentrant, because localtime() stores the result in a static variable, and may (will) create problems in a multi-threaded application. A correct version of this function should use some locking mechanism (critical section or mutex) to avoid two threads calling localtime() simultaneously. (In reply to
comment #1
)
> I think you can use localtime instead of localtime_s and also gettime_s > I remember that there be other issues, for example UChar etc. you need to > define them as wchar_t for example. > > Hope it helps >
Simon Hausmann
Comment 3
2009-11-20 07:31:46 PST
Fixed in
r29558
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug