We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4987 - Can't build on MinGW a recent state (15'th February, 2020): conflicting types
Summary: Can't build on MinGW a recent state (15'th February, 2020): conflicting types
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.1
Hardware: All Windows (All)
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-15 15:39 UTC by Vitaly Novichkov
Modified: 2020-02-27 16:18 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Novichkov 2020-02-15 15:39:35 UTC
Recent attempt to build a recent HG state of SDL2 via AppVeyor gives the failure:

https://ci.appveyor.com/project/Wohlstand/sdl-mixer-x/builds/30821858/job/359gqvypi2f18nok

```
C:\projects\sdl-mixer-x\build-MinGW-w32-MinSizeRel-Win32-VB6-Binding\external\AudioCodecs\src\AudioCodecs-build\external\SDL2\src\SDL2HG\src\dynapi\SDL_dynapi_procs.h:56:29: error: conflicting types for 'SDL_CreateThread'
 SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThread,(SDL_ThreadFunction a, const char *b, void *c),(a,b,c),return)
                             ^
C:\projects\sdl-mixer-x\build-MinGW-w32-MinSizeRel-Win32-VB6-Binding\external\AudioCodecs\src\AudioCodecs-build\external\SDL2\src\SDL2HG\src\dynapi\SDL_dynapi.c:160:16: note: in definition of macro 'SDL_DYNAPI_PROC'
     rc SDLCALL fn params { ret jump_table.fn args; }
                ^~
In file included from C:/projects/sdl-mixer-x/build-MinGW-w32-MinSizeRel-Win32-VB6-Binding/external/AudioCodecs/src/AudioCodecs-build/external/SDL2/src/SDL2HG/include/SDL_audio.h:35:0,
                 from C:/projects/sdl-mixer-x/build-MinGW-w32-MinSizeRel-Win32-VB6-Binding/external/AudioCodecs/src/AudioCodecs-build/external/SDL2/src/SDL2HG/include/SDL.h:36,
                 from C:\projects\sdl-mixer-x\build-MinGW-w32-MinSizeRel-Win32-VB6-Binding\external\AudioCodecs\src\AudioCodecs-build\external\SDL2\src\SDL2HG\src\dynapi\SDL_dynapi.c:34:
C:/projects/sdl-mixer-x/build-MinGW-w32-MinSizeRel-Win32-VB6-Binding/external/AudioCodecs/src/AudioCodecs-build/external/SDL2/src/SDL2HG/include/SDL_thread.h:112:1: note: previous declaration of 'SDL_CreateThread' was here
 SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
 ^~~~~~~~~~~~~~~~
C:\projects\sdl-mixer-x\build-MinGW-w32-MinSizeRel-Win32-VB6-Binding\external\AudioCodecs\src\AudioCodecs-build\external\SDL2\src\SDL2HG\src\dynapi\SDL_dynapi_procs.h:752:29: error: conflicting types for 'SDL_CreateThreadWithStackSize'
 SDL_DYNAPI_PROC(SDL_Thread*,SDL_CreateThreadWithStackSize,(SDL_ThreadFunction a, const char *b, const size_t c, void *d),(a,b,c,d),return)
                             ^
C:\projects\sdl-mixer-x\build-MinGW-w32-MinSizeRel-Win32-VB6-Binding\external\AudioCodecs\src\AudioCodecs-build\external\SDL2\src\SDL2HG\src\dynapi\SDL_dynapi.c:160:16: note: in definition of macro 'SDL_DYNAPI_PROC'
     rc SDLCALL fn params { ret jump_table.fn args; }
                ^~
In file included from C:/projects/sdl-mixer-x/build-MinGW-w32-MinSizeRel-Win32-VB6-Binding/external/AudioCodecs/src/AudioCodecs-build/external/SDL2/src/SDL2HG/include/SDL_audio.h:35:0,
                 from C:/projects/sdl-mixer-x/build-MinGW-w32-MinSizeRel-Win32-VB6-Binding/external/AudioCodecs/src/AudioCodecs-build/external/SDL2/src/SDL2HG/include/SDL.h:36,
                 from C:\projects\sdl-mixer-x\build-MinGW-w32-MinSizeRel-Win32-VB6-Binding\external\AudioCodecs\src\AudioCodecs-build\external\SDL2\src\SDL2HG\src\dynapi\SDL_dynapi.c:34:
C:/projects/sdl-mixer-x/build-MinGW-w32-MinSizeRel-Win32-VB6-Binding/external/AudioCodecs/src/AudioCodecs-build/external/SDL2/src/SDL2HG/include/SDL_thread.h:117:1: note: previous declaration of 'SDL_CreateThreadWithStackSize' was here
 SDL_CreateThreadWithStackSize(int (SDLCALL * fn) (void *),
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

It fails on any MinGW, include MinGW-w64 of both 32 and 64 bits:
https://ci.appveyor.com/project/Wohlstand/sdl-mixer-x/builds/30821858
Comment 1 Sam Lantinga 2020-02-16 00:39:56 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/85e63c05b8f8
Comment 2 Vitaly Novichkov 2020-02-18 15:46:51 UTC
I did try a recent state, and it was failed again:

https://ci.appveyor.com/project/Wohlstand/sdl-mixer-x/builds/30879263/job/6qo4kh7hvavr02ym#L1027

I guess, you did miss up the `SDL_CreateThreadWithStackSize`, but `SDL_CreateThread` is no more appears in the error, that is good :)
Comment 3 Vitaly Novichkov 2020-02-25 12:42:10 UTC
The build is still faililng:
https://ci.appveyor.com/project/Wohlstand/sdl-mixer-x/build/job/6gm8l8k01yso275l#L1030
Comment 4 Vitaly Novichkov 2020-02-25 12:43:20 UTC
It's at another line: the first line that has been reported here is fixed, however, there are other lines that are still failing.
Comment 5 Sam Lantinga 2020-02-27 16:18:56 UTC
(In reply to Vitaly Novichkov from comment #4)
> It's at another line: the first line that has been reported here is fixed,
> however, there are other lines that are still failing.

Whoops, fixed now, thanks!
https://hg.libsdl.org/SDL/rev/4518dbd47100