[vlc-devel] report from the Win32 front
John Freed
john.freed.paris at gmail.com
Sun Jan 29 20:14:25 CET 2012
I wanted to work on a Win32 DVB bug under Fedora 16 and ran into several
issues.
1) upgrading to Qt 4.8
Fedora 16 uses Qt 4.8. I had hoped I could fool MOC into using the 4.7.4
libs, but failed. Not wanting to downgrade to Qt 4.7 (essentially moving
back to Fedora 15) and too lazy to use a virtual machine, I upgraded my
contribs to Qt 4.8. I figured VLC will eventually move there anyhow, so why
not try? The good news is, this required only a couple of tiny patches to
work. I'll be happy to submit if you want.
2) building using Mingw32 under Fedora
It was necessary to
set PKG_CONFIG_LIBDIR=../contrib/i686-pc-mingw32/lib/pkgconfig for building
both the vlc.exe binary and the installation package. I'll note that in the
Fedora build wiki page.
There was a new error introduced that did not appear in the Linux build.
Specifically, the mingw compiler barfed at this line in
modules/gui/qt4/components/playlist/playlist_model.cpp:
const PlMimeData *plMimeData = qobject_cast<const PlMimeData*>( data );
This needed to be changed to reinterpret_cast. (Same problem
in modules/gui/qt4/components/playlist/selector.cpp.) After that, the build
went fine.
3) building the win32 installation package.
Even with the correct PKG_CONFIG_LIBDIR, "make package-win-common"
complained that it could not find LIBVLC. I'm guessing there is some
interim problem with the build process or there is a workaround used on the
buildbot machine. In any case, I found the .pc file and tried to tell
pkg-config to use it, but that didn't work for me, so I manually set the
CFLAGS and LIBS environment variables as follows:
LIBVLC_CFLAGS=-I/usr/src/winvlc/win32/_win32/include
LIBVLC_LIBS="-L/usr/src/winvlc/win32/_win32/lib -lvlc" make
package-win-common
/usr/src/winvlc/win32/ is the directory I was building from, so these are
in the _win32/include and _win32/lib relative directories.
ONE final problem, that's finding the two files libstdc++-6.dll and
libgcc_s_sjlj-1.dll
The file Makefile.in in the build root directory uses this formula to find
them:
gcc_lib_dir=`$(CXX) -v /dev/null 2>&1 | grep ^LIBRARY_PATH|cut -d= -f2|cut
-d: -f1`
A couple of observations: 1) the current nightly builds don't include those
files, so I suspect they're not being found even by the VLC buildbots, 2)
that formula does not produce the location specified in Fedora.
The formula just takes the first directory in LIBRARY_PATH and assumes
that's the right spot. But under Fedora
16, LIBRARY_PATH=/usr/lib64/gcc/i686-pc-mingw32/4.6.1/:/usr/lib64/gcc/i686-pc-mingw32/4.6.1/../../../../i686-pc-mingw32/lib/:/usr/i686-pc-mingw32/sys-root/mingw/lib/
... and the DLLs in question are
in /usr/i686-pc-mingw32/sys-root/mingw/bin/.
This formula worked for me:
cc_lib_dir = `$(CXX) -v /dev/null 2>&1 | grep ^LIBRARY_PATH|cut -d= -f2|
$(AWK) -F: '/sys-root/{for(i=1;i<=NF;++i)if($$i~/sys-root/)print $$i}'| sed
's/lib/bin/'`
...but this is just appending "mingw/bin/" to the sysroot. The sysroot is
correctly found by:
$(CXX) -print-sysroot
I have no idea, however, if my formula would work for other distros. So
perhaps the solution is to provide a Makefile.in.fedora, and/or I can
update the wiki.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120129/32b6d95b/attachment.html>
More information about the vlc-devel
mailing list