[Mingw-w64-public] Trouble cross-compiling SDL2
Hi! I've got trouble cross compiling SDL2 with the latest and greatest gcc, binutils and mingw-w64. gcc version 5.1.0 (GCC) GNU ld (GNU Binutils) 2.25 and mingw-w64 v4.x (from git) I don't what is to blame. But I'm pretty sure the cross compiler it self is in good shape, since I can cross compile SDL1 without any issues. This is what SDL2 gives me: CC build/SDL_render_d3d11.lo /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:140:19: error: static declaration of 'IID_IDXGIFactory2' follows non-static declaration static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; ^ In file included from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/combaseapi.h:156:0, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/objbase.h:14, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/ole2.h:17, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11_1.h:12, from /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:34: /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/dxgi1_2.h:759:1: note: previous declaration of 'IID_IDXGIFactory2' was here DEFINE_GUID(IID_IDXGIFactory2, 0x50c83a1c, 0xe072, 0x4c48, 0x87,0xb0, 0x36,0x30,0xfa,0x36,0xa6,0xd0); ^ /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:141:19: error: static declaration of 'IID_IDXGIDevice1' follows non-static declaration static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } }; ^ In file included from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/combaseapi.h:156:0, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/objbase.h:14, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/ole2.h:17, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11_1.h:12, from /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:34: /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/dxgi.h:2501:1: note: previous declaration of 'IID_IDXGIDevice1' was here DEFINE_GUID(IID_IDXGIDevice1, 0x77db970f, 0x6276, 0x48ba, 0xba,0x28, 0x07,0x01,0x43,0xb4,0x39,0x2c); ^ /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:143:19: error: static declaration of 'IID_ID3D11Texture2D' follows non-static declaration static const GUID IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c } }; ^ In file included from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/combaseapi.h:156:0, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/objbase.h:14, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/ole2.h:17, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11_1.h:12, from /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:34: /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11.h:4533:1: note: previous declaration of 'IID_ID3D11Texture2D' was here DEFINE_GUID(IID_ID3D11Texture2D, 0x6f15aaf2, 0xd208, 0x4e89, 0x9a,0xb4, 0x48,0x95,0x35,0xd3,0x4f,0x9c); ^ /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:144:19: error: static declaration of 'IID_ID3D11Device1' follows non-static declaration static const GUID IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } }; ^ In file included from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/combaseapi.h:156:0, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/objbase.h:14, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/ole2.h:17, from /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11_1.h:12, from /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:34: /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11_1.h:2351:1: note: previous declaration of 'IID_ID3D11Device1' was here DEFINE_GUID(IID_ID3D11Device1, 0xa04bfb29, 0x08ef, 0x43d6, 0xa4,0x9c, 0xa9,0xbd,0xbd,0xcb,0xe6,0x86); . I've tried both the latest SDL2 release (2.0.3) and the latest from mercurial. Any hints? -- chs -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility w
Re: [Mingw-w64-public] Trouble cross-compiling SDL2
On 27.04.2015 20:37, Christer Solskogen wrote: > Hi! > > I've got trouble cross compiling SDL2 with the latest and greatest gcc, > binutils and mingw-w64. > > gcc version 5.1.0 (GCC) > GNU ld (GNU Binutils) 2.25 > and mingw-w64 v4.x (from git) > > I don't what is to blame. But I'm pretty sure the cross compiler it self > is in good shape, since I can cross compile SDL1 without any issues. > > This is what SDL2 gives me: > >CC build/SDL_render_d3d11.lo > /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:140:19: > > error: static declaration of 'IID_IDXGIFactory2' follows non-static > declaration > static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { > 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; > ^ > In file included from > /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/combaseapi.h:156:0, > from > /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/objbase.h:14, > from > /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/ole2.h:17, > from > /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/d3d11_1.h:12, > from > /home/solskogen/mingw-w64-builder/trunk/lib/sdl2/src/render/direct3d11/SDL_render_d3d11.c:34: > /tmp/obj/cross-mingw-w64/x86_64-w64-mingw32/include/dxgi1_2.h:759:1: > note: previous declaration of 'IID_IDXGIFactory2' was here > DEFINE_GUID(IID_IDXGIFactory2, 0x50c83a1c, 0xe072, 0x4c48, 0x87,0xb0, > 0x36,0x30,0xfa,0x36,0xa6,0xd0); > ^ At a glance it looks like SDL_render_d3d11.c declares and defines IID_IDXGIFactory2, and mingw's dxgi1_2.h declares IID_IDXGIFactory2 as well (and defines it in some library, likely libuuid.a). Apparently, SDL2 was written against a SDK (likely mingw.org) that has no IID_IDXGIFactory2. The fix is to remove static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; from SDL2 (or at least ifdef it out based on some macro from dxgi1_2.h). At a glance, anyway. -- O< ascii ribbon - stop html email! - www.asciiribbon.org 0x922360B0.asc Description: application/pgp-keys signature.asc Description: OpenPGP digital signature -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] GCC 5.1.0/4.9 lto linking errors (and bootstrap-lto GCC builds)
I originally posted this to GCC's gcc-help ML but felt I should do the same here: https://gcc.gnu.org/ml/gcc-help/2015-04/msg00167.html This is in regards to PR 65559 and 65582 which is keeping GCC 5.1.0 LTO linking from completing due to the "lto1.exe: internal compiler error: in read_cgraph_and_symbols, at lto/lto.c:2947" error and seems to impact 4.9 although non-fatally. I'll be following both lists so if any questions need answering, feel free to ask on whichever list seems most appropriate. -- Matt Breedlove -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Trouble cross-compiling SDL2
On 27.04.2015 20:16, LRN wrote: > At a glance it looks like SDL_render_d3d11.c declares and defines > IID_IDXGIFactory2, and mingw's dxgi1_2.h declares IID_IDXGIFactory2 as well > (and defines it in some library, likely libuuid.a). > > Apparently, SDL2 was written against a SDK (likely mingw.org) that has no > IID_IDXGIFactory2. > > The fix is to remove > static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, > 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; > from SDL2 (or at least ifdef it out based on some macro from dxgi1_2.h). > > At a glance, anyway. > Okay? Compiling SDL2 using v3.x (git) works just fine. -- chs -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Trouble cross-compiling SDL2
On Tue, 2015-04-28 at 08:08 +0200, Christer Solskogen wrote: > On 27.04.2015 20:16, LRN wrote: > > > At a glance it looks like SDL_render_d3d11.c declares and defines > > IID_IDXGIFactory2, and mingw's dxgi1_2.h declares IID_IDXGIFactory2 as well > > (and defines it in some library, likely libuuid.a). > > > > Apparently, SDL2 was written against a SDK (likely mingw.org) that has no > > IID_IDXGIFactory2. > > > > The fix is to remove > > static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, > > 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; > > from SDL2 (or at least ifdef it out based on some macro from dxgi1_2.h). > > > > At a glance, anyway. > > > > Okay? Compiling SDL2 using v3.x (git) works just fine. > This is nothing surprising. The UIDs and interface definitions are constantly added to the MinGW source (includes). For example, I have an application using MSXML. There were no definitions for MSXML interfaces so I had to add my own. It compiled fine with MinGW 3.x, but the MSXML UIDs and interfaces has been added in MinGW 4.x. So I had to remove my definitions in order to compile my project with MinGW 4.x. This is called "progress" or "evolution" :-) Pavel -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public