Windows cross-compilation problem with Qt4

This forum is about all development around libVLC.
wolfgang
New Cone
New Cone
Posts: 6
Joined: 04 Oct 2014 18:20

Windows cross-compilation problem with Qt4

Postby wolfgang » 04 Oct 2014 20:05

Hi everybody,

I am currently trying to compile VLC player for Windows on a Ubuntu 14.04 virtual machine for development of a new audio filter module. Cross-compilation already worked with VLC 2.1.0, but buildling the latest 3.0.0-git fails with the same setup (even without my new module).
I followed the instructions on https://wiki.videolan.org/Win32Compile/ which works fine, until I try to run the configure shell script (last before the last step), which strangely cannot be found (although it exists). Using the propsed alternative "../configure --host=..." works but produces some errors related to x265 and taglib. So I disable them and use:

Code: Select all

../configure --host=i686-w64-mingw32 --disable-x265 --disable-taglib
This works. However, when I run "make" I get the following error after about 10 minutes (posting the last couple of lines here):

Code: Select all

# if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP ^ CXX util/buttons/libqt4_plugin_la-RoundButton.moc.lo CXX util/buttons/libqt4_plugin_la-DeckButtonsLayout.moc.lo CXX util/buttons/libqt4_plugin_la-BrowseButton.moc.lo CXX styles/libqt4_plugin_la-seekstyle.moc.lo In file included from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/qsystemdetection.h:1:0, from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/../src/corelib/global/qglobal.h:72, from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/qglobal.h:1, from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/../src/corelib/tools/qchar.h:45, from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/qchar.h:1, from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/../src/corelib/tools/qstring.h:45, from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/qstring.h:1, from /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/QString:1, from ../../../../modules/gui/qt4/qt4.hpp:37, from styles/../../../../../modules/gui/qt4/styles/seekstyle.hpp:26, from styles/seekstyle.moc.cpp:9: /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/include/qt5/QtCore/../src/corelib/global/qsystemdetection.h:116:24: warning: "WINAPI_FAMILY_PHONE_APP" is not defined [-Wundef] # if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP ^ CXX libqt4_plugin_la-resources.lo CXXLD libqt4_plugin.la /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/lib/libQt5Core.a(qcoreapplication.o):qcoreapplication.cpp:(.text+0x35c8): undefined reference to `__cxa_throw_bad_array_new_length' /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/lib/libQt5Core.a(qobject.o):qobject.cpp:(.text+0xbe2): undefined reference to `__cxa_throw_bad_array_new_length' /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/lib/libQt5Core.a(qobject.o):qobject.cpp:(.text+0x8d9c): undefined reference to `__cxa_throw_bad_array_new_length' /usr/bin/i686-w64-mingw32-ld: /home/andreasfuchs/vlc_nosofa/vlc/contrib/i686-w64-mingw32/lib/libQt5Core.a(qobject.o): bad reloc address 0x350 in section `.rdata' collect2: error: ld returned 1 exit status make[7]: *** [libqt4_plugin.la] Error 1 make[7]: Leaving directory `/home/andreasfuchs/vlc_nosofa/vlc/win32/modules/gui/qt4' make[6]: *** [all] Error 2 make[6]: Leaving directory `/home/andreasfuchs/vlc_nosofa/vlc/win32/modules/gui/qt4' make[5]: *** [all-recursive] Error 1 make[5]: Leaving directory `/home/andreasfuchs/vlc_nosofa/vlc/win32/modules/gui' make[4]: *** [all] Error 2 make[4]: Leaving directory `/home/andreasfuchs/vlc_nosofa/vlc/win32/modules/gui' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/andreasfuchs/vlc_nosofa/vlc/win32/modules' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/andreasfuchs/vlc_nosofa/vlc/win32/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/andreasfuchs/vlc_nosofa/vlc/win32' make: *** [all] Error 2
libqt4_plugin.la does not exist anywhere in the vlc folder. As a workaround, I already tried copying it from an older project (VLC 2.1.0) and the associated dll's as well, but this didn't help either (compiler got a few steps further then exited with a similar error message).
I assume it is some kind of mess-up between Qt4 and Qt5, because libQt5core.a seems to try to call something related to Qt4. And the Qt5-related-steps before the error seem to work fine.

I have already done a lot of research etc. but without any success. Could someone please advise me how to resolve this issue?

Thanks a lot and best regards,
Wolfgang

rusxg
New Cone
New Cone
Posts: 1
Joined: 30 Mar 2015 18:29

Re: Windows cross-compilation problem with Qt4

Postby rusxg » 30 Mar 2015 18:37

Hi Wolfgang,

I have come to the similar issue recently. In my case it was enough to rebuild qt4 contribs. To do that, you need to go to vlc/contrib/win32 and run

Code: Select all

make .qt
there.

Hope this helps
Ivan


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 51 guests