Page 1 of 1

Windows Compile

Posted: 21 Feb 2015 07:18
by skillcheck
Hi,

I've been trying for the past 3 days to try to get VLC to compile on windows following the instructions on https://wiki.videolan.org/Win32Compile/ and https://wiki.videolan.org/Win32CompileMSYS/.

I've tried ubuntu 14.04 64 bit (in a virtual machine) and Window MSys. I have read other posts from people here and see similar problems and have tried some of their solutions to no avail (granted that I am not a linux expert but also not a newbie). I have tried various combinations of steps for each setup and kept a log of everything but nothing seems to work. I can't imagine the core developers have to go through this.

So my question is, what exact configuration do the core developers use? e.g. OS and version, compiler, etc. I have followed the instructions on the wiki exactly and still get errors, so would it be possible to either update the wiki to something that works out of the box for a given specific OS? I am willing to use whatever setup it takes.

Thanks for your help and looking forward to doing some actual VLC development!

Re: Windows Compile

Posted: 21 Feb 2015 09:21
by RSATom
what exactly errors did you get?

Re: Windows Compile

Posted: 21 Feb 2015 11:14
by skillcheck
I've gotten the farthest doing the Ubuntu compile with the following parameters:

Ubuntu 14.04 64 bit
host triplet: x86_64-w64-mingw32

during compilation:

Code: Select all

CCLD libjpeg_plugin.la CC codec/liblibass_plugin_la-libass.lo CCLD liblibass_plugin.la /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x8c8): undefined reference to `FT_Get_BDF_Property' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x1ae7): undefined reference to `FT_Get_PS_Font_Info' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x1b9e): undefined reference to `FT_Get_BDF_Property' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x1bf0): undefined reference to `FT_Get_BDF_Property' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x1d16): undefined reference to `FT_Get_BDF_Property' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x226d): undefined reference to `FT_Get_BDF_Property' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x2382): undefined reference to `FT_Get_BDF_Property' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x24f4): undefined reference to `FT_Get_X11_Font_Format' /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o):fcfreetype.c:(.text+0x283b): undefined reference to `FT_Has_PS_Glyph_Names' /usr/bin/x86_64-w64-mingw32-ld: /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a(fcfreetype.o): bad reloc address 0x0 in section `.data' collect2: error: ld returned 1 exit status make[4]: *** [liblibass_plugin.la] Error 1 make[4]: Leaving directory `/build/vlc/win32/modules' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/build/vlc/win32/modules' make[2]: *** [all] Error 2 make[2]: Leaving directory `/build/vlc/win32/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/build/vlc/win32' make: *** [all] Error 2
I tried reconfiguring with --disable-freetype --disable-skins2 and got the same errors.

running:

$ nm -CBo /build/vlc/contrib/x86_64-w64-mingw32/lib/libfontconfig.a | grep FT_Get_BDF_Property

libfontconfig.a:fcfreetype.o: U FT_Get_BDF_Property

Shows the function is indeed undefined.

After reading this: https://mail.gnome.org/archives/garnome ... 00408.html made me think there is maybe something wrong with the precompiled contrib libs so decided to bite the bullet and try compiling all of the contrib packages manually.

But the main point of my original post was simply to find out what is the best platform configuration I should be using to compile for Windows.

Re: Windows Compile

Posted: 22 Feb 2015 10:23
by skillcheck
Ok, Managed to get the contrib packages compiled and VLC to compile and run, but not without some modifications.

So for future reference, here's what I had to do:

Compiling contribs:
-----------------------

For some reason, pkgconfig wasn't picking up PKG_CONFIG_PATH, so I had to set the following environment variables: (i'll skip the error messages which prompted me to set these)

Code: Select all

$ export PNG_CFLAGS=-I/build/vlc/contrib/x86_64-w64-mingw32/include/libpng16 $ export PNG_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lpng16" $ export FREETYPE_CFLAGS=-I/build/vlc/contrib/x86_64-w64-mingw32/include/freetype2 $ export FREETYPE_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lfreetype -lz" $ export LIBXML2_CFLAGS="-I/build/vlc/contrib/x86_64-w64-mingw32/include/libxml2 -DLIBXML_STATIC" $ export LIBXML2_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lxml2" $ export FRIBIDI_CFLAGS=-I/build/vlc/contrib/x86_64-w64-mingw32/include/fribidi $ export FRIBIDI_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lfribidi" $ export FONTCONFIG_CFLAGS="-I/build/vlc/contrib/x86_64-w64-mingw32/include -I/build/vlc/contrib/x86_64-w64-mingw32/include/freetype2 -I/build/vlc/contrib/x86_64-w64-mingw32/include/libxml2 -DLIBXML_STATIC" $ export FONTCONFIG_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lfontconfig" $ export FT2_CFLAGS=$FREETYPE_CFLAGS $ export FT2_LIBS=$FREETYPE_LIBS $ export CSS_CFLAGS="-I/build/vlc/contrib/x86_64-w64-mingw32/include -I/build/vlc/contrib/x86_64-w64-mingw32/include/dvdcss" $ export CSS_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -ldvdcss" $ export DVDREAD_CFLAGS=-I/build/vlc/contrib/x86_64-w64-mingw32/include $ export DVDREAD_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -ldvdread -ldvdcss" $ export NETTLE_CFLAGS=-I/build/vlc/contrib/x86_64-w64-mingw32/include $ export NETTLE_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lnettle" $ export HOGWEED_CFLAGS="-I/build/vlc/contrib/x86_64-w64-mingw32/include" $ export HOGWEED_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lhogweed" $ export EBML_CFLAGS=-I/build/vlc/contrib/x86_64-w64-mingw32/include $ export EBML_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lebml" $ export ORC_CFLAGS=-I/build/vlc/contrib/x86_64-w64-mingw32/include/orc-0.4 $ export ORC_LIBS="-L/build/vlc/contrib/x86_64-w64-mingw32/lib -lorc-0.4"
Can't help but thinking that pkgconfig isn't set up correctly. This can't be necessary to set all of these, when other things seem to find the .pc files fine. Any suggestions?

Also had to install the following:

Code: Select all

$ sudo apt/get install ragel $ sudo apt-get install ant $ sudo apt-get install default-jre $ sudo apt-get install default-jdk $ sudo apt-get install protobuf-compiler from https://groups.google.com/forum/#!topic/android-ndk/rQlkSq94fuA $ sudo apt-get install g++
Compiling VLC:
------------------

in vlc/modules/access/Makefiles.am
- append ${CSS_LIBS) to the line: libdvdread_plugin_la_LIBADD = $(DVDREAD_LIBS)
- append -lgpg-error -lz to the line: libsftp_plug_la_LIBADD = ${SFTP_LIBS}

in vlc/modules/access_output/Makefile.am
- append -lvorbis -ltheora -lshout -logg -lvorbis -ltheora -lshout -logg to the line: libaccess_output_shout_plugin_la_LIBADD = $(SHOUT_LIBS) $(SOCKET_LIBS)
* actually, this didn't work so reconfigured with --disable-shout

in vlc/modules/codec/Makefile.am
- append -lfreetype to line: liblibass_plugin_la_LIBADD = $(LIBASS_LIBS) $(LIBS_libass) $(LIBS_freetype)
* actually, this didn't work so reconfigured with --disable-libass

had trouble compiling with my installed version protobuf (which had to install to get protobuf config to compile), so just to reconfigured with --disable-chromecast

After all of this, vlc compiled and I was able to run!

Now having trouble getting my own module to compile, but I'll make another post for that.