MinGW 32 build broken for gcc 4.8.1

Bug #1352832 reported by Ralph Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
Medium
Ralph Lange

Bug Description

The EPICS 3.15 build using 32bit MinGW on Windows (mingw32-gcc-4.8.1-4) is broken.

[...]
gcc -DDONT_USE_POSIX_THREAD_PRIORITY_SCHEDULING -D_MINGW -O3 -Wall -m32 -DEPICS_BUILD_DLL -DEPICS_CALL_DLL -I. -I../O.Common -I. -I../../../src/libCom/osi/compiler/gcc -I../../../src/libCom/osi/compiler/default -I. -I../../../src/libCom/osi/os/WIN32 -I../../../src/libCom/osi/os/default -I.. -I../../../src/libCom/as -I../../../src/libCom/bucketLib -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/flex -I../../../src/libCom/freeList -I../../../src/libCom/gpHash -I../../../src/libCom/iocsh -I../../../src/libCom/log -I../../../src/libCom/macLib -I../../../src/libCom/misc -I../../../src/libCom/osi -I../../../src/libCom/ring -I../../../src/libCom/taskwd -I../../../src/libCom/timer -I../../../src/libCom/yacc -I../../../src/libCom/yacc -I../../../src/libCom/yajl -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include -o osdThread.obj -c ../../../src/libCom/osi/os/WIN32/osdThread.c
../../../src/libCom/osi/os/WIN32/osdThread.c:100:13: error: conflicting types for 'DllMain'
 BOOL WINAPI DllMain (
             ^
In file included from c:\mingw\include\windows.h:62:0,
                 from ../../../src/libCom/osi/os/WIN32/osdThread.c:28:
c:\mingw\include\winbase.h:1051:13: note: previous declaration of 'DllMain' was here
 BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID);
             ^
../../../configure/RULES_BUILD:219: recipe for target 'osdThread.obj' failed
mingw32-make[3]: *** [osdThread.obj] Error 1
mingw32-make[3]: Leaving directory 'C:/Users/langer/Documents/Work/EPICS/V3/3.15/fix-nan-inf-updates/src/libCom/O.win32-x86-mingw'

This was first reported by Anindya Roy <email address hidden> on Tech-Talk back in February.
http://www.aps.anl.gov/epics/tech-talk/2014/msg00313.php

Revision history for this message
Ralph Lange (ralph-lange) wrote :

The attached patch fixes the issue.

Careful, though:
I have no idea what kind of #ifdef'ization this fix might need to be portable across Windows version and compilers.

Revision history for this message
Ralph Lange (ralph-lange) wrote :

Fix does work on Windows7 for MinGW (32bit) and MSVC 12.0 (Visual Studio 2013) (32bit and 64bit)

Changed in epics-base:
status: New → Fix Committed
assignee: nobody → Ralph Lange (ralph-lange)
importance: Undecided → Medium
status: Fix Committed → In Progress
Revision history for this message
Andrew Johnson (anj) wrote :

Doesn't break my MinGW or MSVS 2010 builds, so please apply.

Changed in epics-base:
status: In Progress → Fix Committed
Andrew Johnson (anj)
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.