[kde-windows] [Bug 326398] New: Compilation of rasqal fails with error: redefinition of struct 'timezone'

dasaan.san at gmail.com dasaan.san at gmail.com
Mon Oct 21 18:36:06 UTC 2013


https://bugs.kde.org/show_bug.cgi?id=326398

            Bug ID: 326398
           Summary: Compilation of rasqal fails with error: redefinition
                    of struct 'timezone'
    Classification: Unclassified
           Product: kde-windows
           Version: unspecified
          Platform: MS Windows
                OS: MS Windows
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: buildsystem
          Assignee: kde-windows at kde.org
          Reporter: dasaan.san at gmail.com

Whilst trying to emerge kdelibs rasqal fails to compile with the following
output:
←[0m←[32mBuilding C object CMakeFiles/rasqal.dir/src/rasqal_algebra.c.obj
←[0m[  2%] ←[32mBuilding C object
CMakeFiles/rasqal.dir/src/rasqal_bindings.c.obj
←[0m←[32mBuilding C object CMakeFiles/rasqal.dir/src/rasqal_dataset.c.obj
←[0mIn file included from
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/sys/time.h:10,
                 from
C:/kdeRoot/build/win32libs/rasqal-0.9.26-20110726/work/mingw4-RelWithDebInfo-0.9.30/rasqal.h:116,
                 from
c:\kdeRoot\build\win32libs\rasqal-0.9.26-20110726\work\rasqal-0.9.30\src\rasqal_algebra.c:39:
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/time.h:260:
error: redefinition of 'struct timezone'
In file included from
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/sys/time.h:10,
                 from
C:/kdeRoot/build/win32libs/rasqal-0.9.26-20110726/work/mingw4-RelWithDebInfo-0.9.30/rasqal.h:116,
                 from
c:\kdeRoot\build\win32libs\rasqal-0.9.26-20110726\work\rasqal-0.9.30\src\rasqal_bindings.c:39:
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/time.h:260:
error: redefinition of 'struct timezone'
In file included from
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/sys/time.h:10,
                 from
C:/kdeRoot/build/win32libs/rasqal-0.9.26-20110726/work/mingw4-RelWithDebInfo-0.9.30/rasqal.h:116,
                 from
c:\kdeRoot\build\win32libs\rasqal-0.9.26-20110726\work\rasqal-0.9.30\src\rasqal_dataset.c:43:
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/time.h:260:
error: redefinition of 'struct timezone'
In file included from
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/sys/time.h:10,
                 from
C:/kdeRoot/build/win32libs/rasqal-0.9.26-20110726/work/mingw4-RelWithDebInfo-0.9.30/rasqal.h:116,
                 from
c:\kdeRoot\build\win32libs\rasqal-0.9.26-20110726\work\rasqal-0.9.30\src\rasqal_data_graph.c:40:
c:\kderoot\mingw\bin\../lib/gcc/i686-w64-mingw32/4.4.7/../../../../i686-w64-mingw32/include/time.h:260:
error: redefinition of 'struct timezone'
jom:
C:\kderoot\build\win32libs\rasqal-0.9.26-20110726\work\mingw4-RelWithDebInfo-0.9.30\CMakeFiles\rasqal.dir\build.make
[CMakeFiles\rasqal.dir\src\rasqal_algebra.c.obj] Error 1
jom:
C:\kderoot\build\win32libs\rasqal-0.9.26-20110726\work\mingw4-RelWithDebInfo-0.9.30\CMakeFiles\rasqal.dir\build.make
[CMakeFiles\rasqal.dir\src\rasqal_bindings.c.obj] Error 1
jom:
C:\kderoot\build\win32libs\rasqal-0.9.26-20110726\work\mingw4-RelWithDebInfo-0.9.30\CMakeFiles\rasqal.dir\build.make
[CMakeFiles\rasqal.dir\src\rasqal_data_graph.c.obj] Error 1
jom:
C:\kderoot\build\win32libs\rasqal-0.9.26-20110726\work\mingw4-RelWithDebInfo-0.9.30\CMakeFiles\rasqal.dir\build.make
[CMakeFiles\rasqal.dir\src\rasqal_dataset.c.obj] Error 1
jom:
C:\kderoot\build\win32libs\rasqal-0.9.26-20110726\work\mingw4-RelWithDebInfo-0.9.30\CMakeFiles\Makefile2
[CMakeFiles\rasqal.dir\all] Error 2
jom:
C:\kderoot\build\win32libs\rasqal-0.9.26-20110726\work\mingw4-RelWithDebInfo-0.9.30\Makefile
[all] Error 2
emerge fatal error: while running make cmd: c:\kderoot\dev-utils\bin\jom.exe
emerge fatal error: running python
c:\kderoot\emerge\portage\win32libs\rasqal\rasqal-0.9.26-20110726.py compile
emerge debug: Task: Emerge stopped after: 0:00:49.740000


rasqal.h contains the following:
#if 1
#include <sys/time.h>
#endif
#if 1
#include <time.h>
#endif

sys/time.h contains:
#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
#define _TIMEZONE_DEFINED
...
struct timezone
{
  int tz_minuteswest; /* of Greenwich */
  int tz_dsttime;     /* type of dst correction to apply */
};

and time.h includes:
#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
#define _TIMEZONE_DEFINED
struct timezone {
  int tz_minuteswest;
  int tz_dsttime;
};


it looks like the lines:
#ifndef _TIMEZONE_DEFINED
#define _TIMEZONE_DEFINED

*should* protect against timezone getting defined twice but obviously they're
failing for some reason

Reproducible: Always

Steps to Reproduce:
1. emerge kdelibs
Actual Results:  
see fault details

Expected Results:  
rasqal should compile successfully and then emerge should continue to compile
the rest of kdelibs

c:\kdeRoot>gcc -v
Using built-in specs.
Target: i686-w64-mingw32
Configured with: ../gcc44-svn/configure --host=i686-w64-mingw32
--target=i686-w64-mingw32 --disable-multilib --enable-checking=release
--prefix=/mingw32 --with-sysroot=/mingw32
--enable-languages=c,c++,fortran,objc,obj-c++ --enable-libgomp
--with-gmp=/mingw32 --with-mpfr=/mingw32 --disable-nls --disable-win32-registry
Thread model: win32
gcc version 4.4.7 20111023 (prerelease) [svn/rev.180339 - mingw-w64/oz] (GCC)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kde-windows mailing list