dvdread patch for gcc 4.7+ and mingw
Hello. As a note, dvdread if compiled using mingw or cross compiled for windows, seems to fail with all sorts of failure messages. This patch (from the vlc team [1], thanks!) seems necessary there: https://raw.github.com/rdp/ffmpeg-windows-build-helpers/master/patches/dvdre... I'm not sure if it affects other OS's or not. I "think" the problem stems from gcc packing structures differently with 4.7+ though I'm not certain [2] . All I really know is that, for windows with gcc 4.8, it fails without this patch and works with it. Thank you, thought I'd mention it since there was a recent call for trivial patches. -roger- [1] https://github.com/videolan/vlc/blob/master/contrib/src/dvdread/rules.mak#L3... and https://github.com/videolan/vlc/blob/master/contrib/src/dvdread/dvdread-win3... [2] http://www.bttr-software.de/forum/mix_entry.php?id=11767 apparently -mms-bitfields became default with gcc 4.7
Hi Roger, On Monday, 21 October 2013 at 14:38, Roger Pack wrote: [...]
I'm not sure if it affects other OS's or not. I "think" the problem stems from gcc packing structures differently with 4.7+ though I'm not certain [2] . All I really know is that, for windows with gcc 4.8, it fails without this patch and works with it.
This should be fixed in current SVN. I used an older patch and added configure2 code, too, to match. Regards, Dominik -- Fedora http://fedoraproject.org/wiki/User:Rathann RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
On 11/11/13, Dominik 'Rathann' Mierzejewski <dominik@greysector.net> wrote:
Hi Roger,
On Monday, 21 October 2013 at 14:38, Roger Pack wrote: [...]
I'm not sure if it affects other OS's or not. I "think" the problem stems from gcc packing structures differently with 4.7+ though I'm not certain [2] . All I really know is that, for windows with gcc 4.8, it fails without this patch and works with it.
This should be fixed in current SVN. I used an older patch and added configure2 code, too, to match.
Interesting. Thanks for applying that. Unfortunately, at least with cross compiling I get this: working patched 4.2.0 version: libdvdread-4.2.0$ grep ATTRIBUTE_PACKED src/dvdread/ifo_types.h * | grep define src/dvdread/ifo_types.h:#define ATTRIBUTE_PACKED __attribute__ ((packed,gcc_struct)) 4.2.1 (with ./autogen.sh && ./configure --host=...): libdvdread-4.2.1$ grep ATTRIBUTE_PACKED src/dvdread/ifo_types.h * | grep define grep: autom4te.cachesrc/dvdread/ifo_types.h:#define ATTRIBUTE_PACKED __attribute__ ((packed)) (it doesn't say gcc_struct with 4.2.1, and thus still fails) Thanks, sorry I don't know more here. -roger-
On Wednesday, 13 November 2013 at 19:05, Roger Pack wrote:
On 11/11/13, Dominik 'Rathann' Mierzejewski <dominik@greysector.net> wrote:
Hi Roger,
On Monday, 21 October 2013 at 14:38, Roger Pack wrote: [...]
I'm not sure if it affects other OS's or not. I "think" the problem stems from gcc packing structures differently with 4.7+ though I'm not certain [2] . All I really know is that, for windows with gcc 4.8, it fails without this patch and works with it.
This should be fixed in current SVN. I used an older patch and added configure2 code, too, to match.
Interesting. Thanks for applying that. Unfortunately, at least with cross compiling I get this:
working patched 4.2.0 version: libdvdread-4.2.0$ grep ATTRIBUTE_PACKED src/dvdread/ifo_types.h * | grep define src/dvdread/ifo_types.h:#define ATTRIBUTE_PACKED __attribute__ ((packed,gcc_struct))
4.2.1 (with ./autogen.sh && ./configure --host=...):
libdvdread-4.2.1$ grep ATTRIBUTE_PACKED src/dvdread/ifo_types.h * | grep define grep: autom4te.cachesrc/dvdread/ifo_types.h:#define ATTRIBUTE_PACKED __attribute__ ((packed))
(it doesn't say gcc_struct with 4.2.1, and thus still fails) Thanks, sorry I don't know more here.
I thought you said this was related to missing -mno-ms-bitfields flag in CFLAGS. It should appear in your CFLAGS during compilation. Could you check? Regards, Dominik -- Fedora http://fedoraproject.org/wiki/User:Rathann RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
On 11/16/13, Dominik 'Rathann' Mierzejewski <dominik@greysector.net> wrote:
On Wednesday, 13 November 2013 at 19:05, Roger Pack wrote:
On 11/11/13, Dominik 'Rathann' Mierzejewski <dominik@greysector.net> wrote:
Hi Roger,
On Monday, 21 October 2013 at 14:38, Roger Pack wrote: [...]
I'm not sure if it affects other OS's or not. I "think" the problem stems from gcc packing structures differently with 4.7+ though I'm not certain [2] . All I really know is that, for windows with gcc 4.8, it fails without this patch and works with it.
This should be fixed in current SVN. I used an older patch and added configure2 code, too, to match.
Interesting. Thanks for applying that. Unfortunately, at least with cross compiling I get this:
working patched 4.2.0 version: libdvdread-4.2.0$ grep ATTRIBUTE_PACKED src/dvdread/ifo_types.h * | grep define src/dvdread/ifo_types.h:#define ATTRIBUTE_PACKED __attribute__ ((packed,gcc_struct))
4.2.1 (with ./autogen.sh && ./configure --host=...):
libdvdread-4.2.1$ grep ATTRIBUTE_PACKED src/dvdread/ifo_types.h * | grep define grep: autom4te.cachesrc/dvdread/ifo_types.h:#define ATTRIBUTE_PACKED __attribute__ ((packed))
(it doesn't say gcc_struct with 4.2.1, and thus still fails) Thanks, sorry I don't know more here.
I thought you said this was related to missing -mno-ms-bitfields flag in CFLAGS. It should appear in your CFLAGS during compilation. Could you check?
Ok it does compile with -mno-ms-bitfields. But still causes a segfault without the gcc_struct patch (for me anyway). I think the problem is that other programs pick up and use for instance ifo_types.h (as a dependency) but then *they* don't add a -mno-ms-bitfields (perhaps they don't even want to? ) to their compilation so it still breaks when it ends up being used for method parameters, etc. If this is the problem, then I suppose possible fixes would be to just put a "gcc_struct" into the source code, or to export the -mno-ms-bitfields to the .pc file? I'm just guessing here I don't know for certain. Thank you. -roger
participants (2)
-
Dominik 'Rathann' Mierzejewski -
Roger Pack