1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 <2016> 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Problem in 3.14.12.5 with osd/WIN32/osdTime.h with latest version of MinGW |
From: | Mark Rivers <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Tue, 27 Sep 2016 13:23:15 +0000 |
I found a problem compiling 3.14.12.5 (with the msvs-timespec.patch) when building with the latest version of MinGW on Windows, which is gcc 5.3.0. This is the error: **************************************************** g++ -c -D_MINGW -O3 -Wall -m32 -D_DLL -MMD -I. -I../O.Common -I. -I../../../src/libCom/osi/os/WIN32 -I../../../src/libCom/osi/os/posix -I../../../src/ libCom/osi/os/default -I.. -I../../../src/libCom/bucketLib -I../../../src/libCom/ring -I../../../src/libCom/calc -I../../../src/libCom/cvtFast -I../../../src/libCom/cppStd -I../../ ../src/libCom/cxxTemplates -I../../../src/libCom/dbmf -I../../../src/libCom/ellLib -I../../../src/libCom/env -I../../../src/libCom/error -I../../../src/libCom/fdmgr -I../../../src/ libCom/freeList -I../../../src/libCom/gpHash -I../../../src/libCom/iocsh -I../../../src/libCom/logClient -I../../../src/libCom/macLib -I../../../src/libCom/misc -I../../../src/libC om/osi -I../../../src/libCom/taskwd -I../../../src/libCom/timer -I../../../src/libCom/tsDefs -I../../../include/os/WIN32 -I../../../include ../../../src/libCom/fdmgr/fdmgr. cpp In file included from ../../../src/libCom/osi/epicsTime.h:19:0, from ../../../src/libCom/fdmgr/fdManager.h:27, from ../../../src/libCom/fdmgr/fdmgr.cpp:29: ../../../src/libCom/osi/os/WIN32/osdTime.h:26:8: error: redefinition of 'struct timespec' struct timespec { ^ In file included from ../../../src/libCom/osi/epicsTime.h:15:0, from ../../../src/libCom/fdmgr/fdManager.h:27, from ../../../src/libCom/fdmgr/fdmgr.cpp:29: c:\mingw\include\time.h:102:8: error: previous definition of 'struct timespec' struct timespec ^ ../../../configure/RULES_BUILD:218: recipe for target 'fdmgr.o' failed make[1]: *** [fdmgr.o] Error 1 make[1]: Leaving directory 'P:/epics/epics/base-3.14.12.5/src/libCom/O.win32-x86-mingw' ../../configure/RULES_ARCHS:64: recipe for target 'install.win32-x86-mingw' failed make: *** [install.win32-x86-mingw] Error 2 **************************************************** I was able to fix the problem by using the version of osdTime.h from base-3.15.4. Also, to build areaDetector with MinGW the following change is needed in configure/os/, adding the winmm library. -CONFIG.win32-x86-mingw.win32-x86-mingw:OP_SYS_LDLIBS = -lws2_32 +CONFIG.win32-x86-mingw.win32-x86-mingw:OP_SYS_LDLIBS = -lws2_32 –lwinmm Mark |