Page 1 of 1

x86_64-w64-mingw32 exception style, contrib errors

Posted: 11 Nov 2013 06:09
by rendaw
The x86_64-w64-mingw32-gcc provided with the AUR package maintained by rubenvb uses SEH exceptions, but it appears that the contrib binaries use SJLJ exceptions. I'm not able to say for sure, since I haven't yet compiled successfully, but I was seeing many errors about undefined SJLJ methods, gxx personality, etc.

After rebuilding gcc with sjlj exceptions, I'm hitting a lot of other compile/link errors:

With vlc disabled:

Code: Select all

CXXLD liblive555_plugin.la vlc/contrib/x86_64-w64-mingw32/lib/libliveMedia.a:Locale.cpp:(.data$_ZTI6Medium[_ZTI6Medium]+0x0): multiple definition of `typeinfo for Medium' access/.libs/liblive555_plugin_la-live555.o:live555.cpp:(.rdata$_ZTI6Medium[_ZTI6Medium]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libliveMedia.a:Locale.cpp:(.data$_ZTI10RTSPClient[_ZTI10RTSPClient]+0x0): multiple definition of `typeinfo for RTSPClient' access/.libs/liblive555_plugin_la-live555.o:live555.cpp:(.rdata$_ZTI10RTSPClient[_ZTI10RTSPClient]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libliveMedia.a:Media.cpp:(.data$_ZTI6Medium[_ZTI6Medium]+0xffa44a68cab16a40): Cannot get section contents - auto-import exception vlc/contrib/x86_64-w64-mingw32/lib/libliveMedia.a:Media.cpp:(.data$_ZTI16MediaLookupTable[_ZTI16MediaLookupTable]+0xff4894d19562d470): Cannot get section contents - auto-import exception vlc/contrib/x86_64-w64-mingw32/lib/libliveMedia.a:Media.cpp:(.data$_ZTI7_Tables[_ZTI7_Tables]+0xfe9129a32ac5a8d0): Cannot get section contents - auto-import exception vlc/contrib/x86_64-w64-mingw32/lib/libliveMedia.a:Media.cpp:(.data$_ZTI14AudioPortNames[_ZTI14AudioPortNames]+0x68cab16a27200060): Cannot get section contents - auto-import exception ...
With vlc + live555 disabled:

Code: Select all

CXXLD libmkv_plugin.la vlc/contrib/x86_64-w64-mingw32/lib/libmatroska.a(KaxSegment.o):KaxSegment.cpp:(.data$_ZTIN11libmatroska10KaxSegmentE[_ZTIN11libmatroska10KaxSegmentE]+0x0): multiple definition of `typeinfo for libmatroska::KaxSegment' demux/mkv/.libs/libmkv_plugin_la-demux.o:demux.cpp:(.rdata$_ZTIN11libmatroska10KaxSegmentE[_ZTIN11libmatroska10KaxSegmentE]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libmatroska.a(KaxSegment.o):KaxSegment.cpp:(.data$_ZTIN7libebml10EbmlMasterE[_ZTIN7libebml10EbmlMasterE]+0x0): multiple definition of `typeinfo for libebml::EbmlMaster' demux/mkv/.libs/libmkv_plugin_la-matroska_segment.o:matroska_segment.cpp:(.rdata$_ZTIN7libebml10EbmlMasterE[_ZTIN7libebml10EbmlMasterE]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libmatroska.a(KaxSegment.o):KaxSegment.cpp:(.data$_ZTIN7libebml11EbmlElementE[_ZTIN7libebml11EbmlElementE]+0x0): multiple definition of `typeinfo for libebml::EbmlElement' demux/mkv/.libs/libmkv_plugin_la-matroska_segment.o:matroska_segment.cpp:(.rdata$_ZTIN7libebml11EbmlElementE[_ZTIN7libebml11EbmlElementE]+0x0): first defined here ...
+ mkv disabled:

Code: Select all

CXXLD libtaglib_plugin.la vlc/contrib/x86_64-w64-mingw32/lib/libtag.a(mp4item.cpp.obj):mp4item.cpp:(.data$_ZTVN6TagLib4ListINS_3MP48CoverArtEEE[_ZTVN6TagLib4ListINS_3MP48CoverArtEEE]+0x0): multiple definition of `vtable for TagLib::List<TagLib::MP4::CoverArt>' meta_engine/.libs/libtaglib_plugin_la-taglib.o:taglib.cpp:(.rdata$_ZTVN6TagLib4ListINS_3MP48CoverArtEEE[_ZTVN6TagLib4ListINS_3MP48CoverArtEEE]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libtag.a(mp4item.cpp.obj):mp4item.cpp:(.data$_ZTIN6TagLib4ListINS_3MP48CoverArtEEE[_ZTIN6TagLib4ListINS_3MP48CoverArtEEE]+0x0): multiple definition of `typeinfo for TagLib::List<TagLib::MP4::CoverArt>' meta_engine/.libs/libtaglib_plugin_la-taglib.o:taglib.cpp:(.rdata$_ZTIN6TagLib4ListINS_3MP48CoverArtEEE[_ZTIN6TagLib4ListINS_3MP48CoverArtEEE]+0x0): first defined here ...
+ taglib disabled:

Code: Select all

CXXLD libqt4_plugin.la vlc/contrib/x86_64-w64-mingw32/lib/libqjpeg.a(main.o):main.cpp:(.data$_ZTI7QObject[_ZTI7QObject]+0x0): multiple definition of `typeinfo for QObject' .libs/libqt4_plugin_la-main_interface.o:main_interface.cpp:(.rdata$_ZTI7QObject[_ZTI7QObject]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libqtaccessiblewidgets.a(complexwidgets.o):complexwidgets.cpp:(.data$_ZTI6QEvent[_ZTI6QEvent]+0x0): multiple definition of `typeinfo for QEvent' .libs/libqt4_plugin_la-qt4.o:qt4.cpp:(.rdata$_ZTI6QEvent[_ZTI6QEvent]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libQtGui.a(qapplication.o):qapplication.cpp:(.data$_ZTI12QApplication[_ZTI12QApplication]+0x0): multiple definition of `typeinfo for QApplication' util/.libs/libqt4_plugin_la-qvlcapp.moc.o:qvlcapp.moc.cpp:(.rdata$_ZTI12QApplication[_ZTI12QApplication]+0x0): first defined here vlc/contrib/x86_64-w64-mingw32/lib/libQtGui.a(qapplication.o):qapplication.cpp:(.data$_ZTI16QCoreApplication[_ZTI16QCoreApplication]+0x0): multiple definition of `typeinfo for QCoreApplication' util/.libs/libqt4_plugin_la-qvlcapp.moc.o:qvlcapp.moc.cpp:(.rdata$_ZTI16QCoreApplication[_ZTI16QCoreApplication]+0x0): first defined here ...
+ qt + qt4 + skins2

Code: Select all

CXXLD libprojectm_plugin.la vlc/contrib/x86_64-w64-mingw32/lib/libprojectM.a(projectM.cpp.obj):projectM.cpp:(.data$_ZTI8projectM[_ZTI8projectM]+0x0): multiple definition of `typeinfo for projectM' .libs/libprojectm_plugin_la-projectm.o:projectm.cpp:(.rdata$_ZTI8projectM[_ZTI8projectM]+0x0): first defined here
+ projectm

Code: Select all

CXXLD libstream_out_chromaprint_plugin.la vlc/contrib/x86_64-w64-mingw32/lib/libchromaprint.a(fft_lib_avfft.cpp.obj): In function `FFTLib': /home/funman/vlc/contrib/w64/chromaprint/src/fft_lib_avfft.cpp:31: undefined reference to `av_mallocz' /home/funman/vlc/contrib/w64/chromaprint/src/fft_lib_avfft.cpp:37: undefined reference to `av_rdft_init' vlc/contrib/x86_64-w64-mingw32/lib/libchromaprint.a(fft_lib_avfft.cpp.obj): In function `~FFTLib': /home/funman/vlc/contrib/w64/chromaprint/src/fft_lib_avfft.cpp:42: undefined reference to `av_rdft_end' /home/funman/vlc/contrib/w64/chromaprint/src/fft_lib_avfft.cpp:43: undefined reference to `av_free' vlc/contrib/x86_64-w64-mingw32/lib/libchromaprint.a(fft_lib_avfft.cpp.obj): In function `Chromaprint::FFTLib::ComputeFrame(Chromaprint::_CombinedBufferIterator<short>, double*)': /home/funman/vlc/contrib/w64/chromaprint/src/fft_lib_avfft.cpp:49: undefined reference to `av_rdft_calc'
+ chromaprint
... finished building.

I managed to build libvlc with mingw32 (i486-mingw32) although I had to edit a number of files as described here: https://forum.videolan.org/viewtopic.php?f=32&t=113974 . Unfortunately, I realized later that I need some windows system calls and stuff that mingw32 doesn't support.

I also tried compiling the contrib packages myself but I hit errors after the first 1-2 packages and I couldn't figure out how to disable contrib packages and move on. I'm going to try building taglib myself since I need that for the metadata methods, although I don't have any particular idea what's causing the errors above.

I used the git vlc. I'm on Arch Linux, x86_64.

Re: x86_64-w64-mingw32 exception style, contrib errors

Posted: 12 Nov 2013 19:18
by Jean-Baptiste Kempf
Use mingw-w64 from AUR

Re: x86_64-w64-mingw32 exception style, contrib errors

Posted: 15 Nov 2013 02:52
by rendaw
Thanks. I tried that package, but it uses SEH exceptions and appears to be incompatible with the binary contrib packages, which use SJLJ exceptions. I'm not sure if the SEH thing is new, but it may be a version incompatbility.

I actually backtracked and tried compiling the contrib packages on my own again. Harfbuzz failed to build with a static assert that sizeof(in64_t) == 8, so I had to disable that and all it's dependants. Since I wanted to avoid trouble, I also disabled every purely graphical contrib package I could identify since I only need audio playback. I managed to build the (remaining) contrib packages successfully, I haven't yet gotten vlc to build though.

Re: x86_64-w64-mingw32 exception style, contrib errors

Posted: 01 Dec 2013 01:09
by rendaw
Just for reference...

Here's the contrib bootstrap I used:

Code: Select all

../bootstrap --host=x86_64-w64-mingw32 --disable-harfbuzz --disable-freetype2 --disable-disc --disable-SDL_image --disable-vncserver --disable-goom --disable-png --disable-qt4 --disable-chromaprint --disable-projectM --disable-a52 --disable-ass --disable-caca --disable-crystalhd --disable-fontconfig --disable-gmp --disable-nettle --disable-gnutls
Here's the VLC config I used:

Code: Select all

export PKG_CONFIG_PATH_CUSTOM="`pwd`/../contrib/x86_64-w64-mingw32/lib/pkgconfig" && echo $PKG_CONFIG_PATH_CUSTOM && ../configure --host=x86_64-w64-mingw32 --disable-vlc --disable-live555 --disable-mkv --disable-taglib --disable-qt --disable-qt4 --disable-skins2 --disable-projectm --disable-chromaprint --disable-dbus
I finally got everything to build and link, however libvlc fails when I run libvlc_media_new_path and libvlc_errmsg returns "Not enough memory" for any filename. I have plenty of memory and none of the other libraries I use have any memory issues. libvlc_media_new_fd works fine.

Re: x86_64-w64-mingw32 exception style, contrib errors

Posted: 21 Jul 2014 19:10
by kc7bfi
Did you ever resolve this issue? I'm having the same problem. David

Re: x86_64-w64-mingw32 exception style, contrib errors

Posted: 01 Sep 2014 17:28
by rendaw
Did you ever resolve this issue? I'm having the same problem. David
It looks like you can link directly to libvlc.dll provided here now: http://download.videolan.org/pub/videol ... ast/win64/ - I used vlc-2.1.5-win64.7z

I haven't tried it on windows TBH but I tested with Wine and it worked (opening files, playback, etc). If you need to rebuild for some reason, I imagine the updated contrib binaries work too.