Bug 354289

Summary: Error while compiling khtml with mingw4 on Windows 7 x64
Product: kde-windows Reporter: Asuka Langley <AsukaLangleyfag>
Component: generalAssignee: KDE-Windows <kde-windows>
Status: RESOLVED FIXED    
Severity: grave    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Asuka Langley 2015-10-24 04:12:36 UTC
Took the 7 hours to build to this stage, khtml, but at first I've got a problem with qtwebkit. Somehow it wasn't exist, but emerge thinks it's compiled, so I've updated it. And then I've got this problem,  conflicting declaration of 'tm* localtime_
r(const time_t*, tm*)' with 'C' linkage
 KDEWIN_EXPORT struct tm *localtime_r(const time_t *clock, struct tm *result);


Reproducible: Always

Steps to Reproduce:
0. Set options to mingw4, x64
1. emerge qt
2. emerge frameworks
3. khtml is the part of stage3

Actual Results:  
emerge warning: while running make cmd: jom
emerge error: fatal error: package frameworks/khtml all failed

Expected Results:  
khtml built

Actual output:
In file included from R:/mingw64/x86_64-w64-mingw32/include/sys/time.h:10:0,
                 from R:/include/mingw/sys/time.h:24,
                 from Q:/khtml/src/ecma/kjs_proxy.h:26,
                 from Q:\khtml\src\xml\dom_nodeimpl.cpp:47:
R:/include/mingw/time.h:35:76: error: conflicting declaration of 'tm* localtime_
r(const time_t*, tm*)' with 'C' linkage
 KDEWIN_EXPORT struct tm *localtime_r(const time_t *clock, struct tm *result);
                                                                            ^
In file included from R:/include/mingw/time.h:28:0,
                 from R:/mingw64/x86_64-w64-mingw32/include/sys/time.h:10,
                 from R:/include/mingw/sys/time.h:24,
                 from Q:/khtml/src/ecma/kjs_proxy.h:26,
                 from Q:\khtml\src\xml\dom_nodeimpl.cpp:47:
R:/mingw64/x86_64-w64-mingw32/include/time.h:269:34: note: previous declaration
with 'C++' linkage
 __forceinline struct tm *__cdecl localtime_r(const time_t *_Time, struct tm *_T
m) {
                                  ^
In file included from R:/mingw64/x86_64-w64-mingw32/include/sys/time.h:10:0,
                 from R:/include/mingw/sys/time.h:24,
                 from Q:/khtml/src/ecma/kjs_proxy.h:26,
                 from Q:\khtml\src\xml\dom_nodeimpl.cpp:47:
R:/include/mingw/time.h:39:73: error: conflicting declaration of 'tm* gmtime_r(c
onst time_t*, tm*)' with 'C' linkage
 KDEWIN_EXPORT struct tm *gmtime_r(const time_t *clock, struct tm *result);
                                                                         ^
In file included from R:/include/mingw/time.h:28:0,
                 from R:/mingw64/x86_64-w64-mingw32/include/sys/time.h:10,
                 from R:/include/mingw/sys/time.h:24,
                 from Q:/khtml/src/ecma/kjs_proxy.h:26,
                 from Q:\khtml\src\xml\dom_nodeimpl.cpp:47:
R:/mingw64/x86_64-w64-mingw32/include/time.h:272:34: note: previous declaration
with 'C++' linkage
 __forceinline struct tm *__cdecl gmtime_r(const time_t *_Time, struct tm *_Tm)
{