<div>I wanted to work on a Win32 DVB bug under Fedora 16 and ran into several issues. </div><div><br></div><div>1) upgrading to Qt 4.8</div>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.<div>
<br></div><div>2) building using Mingw32 under Fedora</div><div>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.</div>
<div><br></div><div>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:</div><div><div>const PlMimeData *plMimeData = qobject_cast<const PlMimeData*>( data );</div>
</div><div>This needed to be changed to reinterpret_cast. (Same problem in modules/gui/qt4/components/playlist/selector.cpp.) After that, the build went fine.</div><div><br></div><div>3) building the win32 installation package.</div>
<div>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:</div>
<div><br></div><div>LIBVLC_CFLAGS=-I/usr/src/winvlc/win32/_win32/include LIBVLC_LIBS="-L/usr/src/winvlc/win32/_win32/lib -lvlc" make package-win-common </div><div><br></div><div>/usr/src/winvlc/win32/ is the directory I was building from, so these are in the _win32/include and _win32/lib relative directories.</div>
<div><br></div><div>ONE final problem, that's finding the two files libstdc++-6.dll and libgcc_s_sjlj-1.dll<br></div><div><br></div><div>The file Makefile.in in the build root directory uses this formula to find them:</div>
<div><br></div><div>gcc_lib_dir=`$(CXX) -v /dev/null 2>&1 | grep ^LIBRARY_PATH|cut -d= -f2|cut -d: -f1`</div><div><br></div><div>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.</div>
<div><br></div><div>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/</div>
<div><br></div><div>... and the DLLs in question are in /usr/i686-pc-mingw32/sys-root/mingw/bin/.</div><div><br></div><div>This formula worked for me:</div><div>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/'`</div>
<div><br></div><div>...but this is just appending "mingw/bin/" to the sysroot. The sysroot is correctly found by:</div><div>$(CXX) -print-sysroot</div><div><br></div><div>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.</div>
<div><br></div><div><br></div>