Problem compiling the latest Windows 3.0 from GIT.

This forum is about all development around libVLC.
Wildcopper
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Jun 2016 16:45

Problem compiling the latest Windows 3.0 from GIT.

Postby Wildcopper » 21 Jun 2016 17:28

Hello,

I could use some help with a problem I have compiling the latest GIT VLC version.
I'm in a VM with Ubuntu 16.04 LTS 64 bits, to cross-compile for Windows.

When arrives the moment to build the contribs, it doesn't work with the "prebuilt" ones.
So I proceed to compile the whole stuff.

During "make fetch", following happens:

Code: Select all

--2016-06-21 17:22:28-- http://downloads.videolan.org/pub/contrib/dshow-headers-oss.tar.bz2 Resolving downloads.videolan.org (downloads.videolan.org)... 88.191.250.2, 2a01:e0d:1:3:58bf:fa02:c0de:5 Connecting to downloads.videolan.org (downloads.videolan.org)|88.191.250.2|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 40833 (40K) [application/octet-stream] Saving to: ‘../../contrib/tarballs/dshow-headers-oss.tar.bz2.tmp’ ../../contrib/tarballs/dshow-headers-o 100%[==========================================================================>] 39,88K --.-KB/s in 0,03s 2016-06-21 17:22:28 (1,22 MB/s) - ‘../../contrib/tarballs/dshow-headers-oss.tar.bz2.tmp’ saved [40833/40833] FINISHED --2016-06-21 17:22:28-- Total wall clock time: 0,2s Downloaded: 1 files, 40K in 0,03s (1,22 MB/s) grep -- " dshow-headers-oss.tar.bz2$" "../../contrib/src/dshow/SHA512SUMS" && (cd ../../contrib/tarballs && sha512sum --check /dev/stdin) < "../../contrib/src/dshow/SHA512SUMS" 779c4a36a4276c6e18017b898903cdf162c186b2f8de22ac12d995b316fe40d8277374eb88c695e8a760497239ad176a85ea4ecccd0df841283f95ff591997a7 dshow-headers-oss.tar.bz2 dshow-headers-oss.tar.bz2: OK sha512sum: d2d_headers.zip: No such file or directory d2d_headers.zip: FAILED open or read sha512sum: WARNING: 1 listed file could not be read Makefile:498: recipe for target '.sum-dshow' failed make: *** [.sum-dshow] Error 1
Any hints?
Thanks.

Wildcopper
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Jun 2016 16:45

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby Wildcopper » 22 Jun 2016 10:58

Update: I managed to fix that problem by using Ubuntu 16.04 32 bits.
Now I'm getting another error during the "make" phase of the contribs:

cp ../../contrib/tarballs/dxgi1_2.idl dxgi12 && cd dxgi12 && patch -fp1 < ../../../contrib/src/d3d11/dxgi12.patch
patching file dxgi1_2.idl
mkdir -p -- "/home/vlc/vlc/contrib/i686-w64-mingw32/include/"
i686-w64-mingw32-widl -DBOOL=WINBOOL -I/usr/include/wine/windows/ -h -o /home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgi1_2.h dxgi12/dxgi1_2.idl
dxgi12/dxgi1_2.idl:43: error: syntax error, unexpected aKNOWNTYPE, expecting tIMPORT
../../contrib/src/d3d11/rules.mak:63: recipe for target '/home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgi1_2.h' failed
make: *** [/home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgi1_2.h] Error 1

I'd be thankful for any advice.

chouquette
Developer
Developer
Posts: 291
Joined: 15 Apr 2010 00:54

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby chouquette » 22 Jun 2016 11:27

Hi,

That looks like you are using an outdated version of mingw-w64
VLC requires version 5.0 (which only has release candidate so far, sadly). IIRC you need a mingw-w64 from after mid January 2016

Wildcopper
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Jun 2016 16:45

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby Wildcopper » 22 Jun 2016 14:59

Hi,

That looks like you are using an outdated version of mingw-w64
VLC requires version 5.0 (which only has release candidate so far, sadly). IIRC you need a mingw-w64 from after mid January 2016
Hi,

Thanks for the suggestion.
Looks like I'm going to have to build one myself...

chouquette
Developer
Developer
Posts: 291
Joined: 15 Apr 2010 00:54

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby chouquette » 22 Jun 2016 15:57

it should be pretty straight forward, IIRC you don't need to build all mingw-w64 projects individually, simply run to toplevel configure script, which should install everything you need.

Feel free to ask for more help here if it proves to be more complicated though!

Wildcopper
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Jun 2016 16:45

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby Wildcopper » 22 Jun 2016 18:00

It's ok, I managed to compile and install the 5.0. Thanks for your kind offer!

Now I get this...

Code: Select all

mkdir -p -- /home/vlc/vlc/contrib/i686-w64-mingw32/share/aclocal && cd a52dec && autoreconf -fiv -I/home/vlc/vlc/contrib/i686-w64-mingw32/share/aclocal autoreconf: Entering directory `.' autoreconf: configure.in: not using Gettext autoreconf: running: aclocal -I /home/vlc/vlc/contrib/i686-w64-mingw32/share/aclocal --force aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in' autoreconf: configure.in: tracing autoreconf: configure.in: not using Libtool autoreconf: running: /usr/bin/autoconf --include=/home/vlc/vlc/contrib/i686-w64-mingw32/share/aclocal --force configure.in:74: error: possibly undefined macro: AC_DISABLE_SHARED If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.in:75: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL configure.in:76: error: possibly undefined macro: AC_PROG_LIBTOOL autoreconf: /usr/bin/autoconf failed with exit status: 1 ../../contrib/src/a52/rules.mak:26: recipe for target '.a52' failed make: *** [.a52] Error 1
Fixed by installing "libtool".

Wildcopper
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Jun 2016 16:45

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby Wildcopper » 23 Jun 2016 08:57

New problem, yeah! :)

Code: Select all

configure: Library configuration: external zlib: yes (pkg-config) bzip2: no libpng: no harfbuzz: no make[1]: Nothing to be done for 'unix'. make[1]: Leaving directory '/home/wildcopper/vlc/contrib/win32/freetype' cd freetype && make && make install make[1]: Entering directory '/home/wildcopper/vlc/contrib/win32/freetype' gcc -o /home/wildcopper/vlc/contrib/win32/freetype/objs/apinames /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c In file included from /usr/local/include/crtdefs.h:10:0, from /usr/local/include/stdio.h:9, from /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:19: /usr/local/include/_mingw.h:264:2: error: #error Only Win32 target is supported! #error Only Win32 target is supported! ^ In file included from /usr/local/include/crtdefs.h:10:0, from /usr/local/include/stdio.h:9, from /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:19: /usr/local/include/_mingw.h:539:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__debugbreak’ void __cdecl __debugbreak(void); ^ /usr/local/include/_mingw.h:540:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__debugbreak’ __MINGW_INTRIN_INLINE void __cdecl __debugbreak(void) ^ In file included from /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:19:0: /usr/local/include/stdio.h:141:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_sscanf’ int __cdecl __mingw_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...); ^ /usr/local/include/stdio.h:144:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_vsscanf’ int __cdecl __mingw_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp); ^ /usr/local/include/stdio.h:147:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__mingw_scanf’ int __cdecl __mingw_scanf(const char * __restrict__ _Format,...); ^
it continues that way for ages, and then:

^

Code: Select all

/home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:444:9: warning: incompatible implicit declaration of built-in function ‘fprintf’ fprintf( stderr, "unable to open '%s'\n", argv[0] ); ^ /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:444:9: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’ /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:448:11: warning: incompatible implicit declaration of built-in function ‘fprintf’ fprintf( stderr, "opening '%s'\n", argv[0] ); ^ /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:448:11: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’ /home/wildcopper/vlc/contrib/win32/freetype/src/tools/apinames.c:451:9: warning: implicit declaration of function ‘fclose’ [-Wimplicit-function-declaration] fclose( file ); ^ /home/wildcopper/vlc/contrib/win32/freetype/builds/exports.mk:54: recipe for target '/home/wildcopper/vlc/contrib/win32/freetype/objs/apinames' failed make[1]: *** [/home/wildcopper/vlc/contrib/win32/freetype/objs/apinames] Error 1 make[1]: Leaving directory '/home/wildcopper/vlc/contrib/win32/freetype' ../../contrib/src/freetype2/rules.mak:25: recipe for target '.freetype2' failed make: *** [.freetype2] Error 2 wildcopper@pat-dev-VM:~/vlc/contrib/win32$ ^

Wildcopper
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Jun 2016 16:45

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby Wildcopper » 23 Jun 2016 18:00

@Chouquette:
I was wondering if it was possible to get a virtual machine configured to compile VLC properly.
I really need the 3.0 for a project since I need DX11 for HDCP and DRM management.

Thanks in advance.

chouquette
Developer
Developer
Posts: 291
Joined: 15 Apr 2010 00:54

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby chouquette » 27 Jun 2016 14:30

I'm sure it's possible, but I don't have any available.

That error message you posted seems like you either compiled mingw-w64 with a wrong target/host parameter(s); or that you're compiling the contribs with the wrong --host parameter.

As an exemple of proper mingw-w64, you can look at this dockerfile which we use to generate our winrt toolchains (which is almost a vanilla mingw-w64): https://code.videolan.org/thresh/docker ... Dockerfile

Once this is done, following the https://wiki.videolan.org/Win32Compile/ tutorial should work out of the box.

Wildcopper
Blank Cone
Blank Cone
Posts: 19
Joined: 21 Jun 2016 16:45

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby Wildcopper » 28 Jun 2016 11:52

Thank you very much, chouquette.
I've done exactly what you said, used the dockerfile to compile mingw-w64, worked just fine including the two patches.

But I'm still back to point one:

Code: Select all

mkdir -p d3d11 cp ../../contrib/tarballs/d3d11.idl d3d11 && cd d3d11 && patch -fp1 < ../../../contrib/src/d3d11/processor_format.patch patching file d3d11.idl mkdir -p -- "/home/vlc/vlc/contrib/i686-w64-mingw32/include/" i686-w64-mingw32-widl -DBOOL=WINBOOL -I/usr/include/wine/windows/ -h -o /home/vlc/vlc/contrib/i686-w64-mingw32/include/d3d11.h d3d11/d3d11.idl mkdir -p -- "/home/vlc/vlc/contrib/i686-w64-mingw32/include/" i686-w64-mingw32-widl -DBOOL=WINBOOL -I/usr/include/wine/windows/ -h -o /home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgidebug.h ../../contrib/tarballs/dxgidebug.idl mkdir -p -- "/home/vlc/vlc/contrib/i686-w64-mingw32/include/" cp ../../contrib/tarballs/dxgitype.h /home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgitype.h touch .dxgitype mkdir -p dxgi12 cp ../../contrib/tarballs/dxgi1_2.idl dxgi12 && cd dxgi12 && patch -fp1 < ../../../contrib/src/d3d11/dxgi12.patch patching file dxgi1_2.idl mkdir -p -- "/home/vlc/vlc/contrib/i686-w64-mingw32/include/" i686-w64-mingw32-widl -DBOOL=WINBOOL -I/usr/include/wine/windows/ -h -o /home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgi1_2.h dxgi12/dxgi1_2.idl dxgi12/dxgi1_2.idl:43: error: syntax error, unexpected aKNOWNTYPE, expecting tIMPORT ../../contrib/src/d3d11/rules.mak:63: recipe for target '/home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgi1_2.h' failed make: *** [/home/vlc/vlc/contrib/i686-w64-mingw32/include/dxgi1_2.h] Error 1
Could it be a bad wine library problem?

runner0502
Blank Cone
Blank Cone
Posts: 27
Joined: 25 Jun 2012 12:35
VLC version: 2.1.0-git
Operating System: windows, MacOS,linux
Location: China

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby runner0502 » 08 Jul 2016 05:06

i have the same problem, I compile and install mingw-w64 from git , the dx11 error still exist.
the error below
dxgi12/dxgi1_2.idl:43: error: syntax error, unexpected aKNOWNTYPE, expecting tIMPORT

anyone can help? thanks a lot
code for fun

runner0502
Blank Cone
Blank Cone
Posts: 27
Joined: 25 Jun 2012 12:35
VLC version: 2.1.0-git
Operating System: windows, MacOS,linux
Location: China

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby runner0502 » 12 Jul 2016 08:03

I got it , it is wine problem
code for fun

richardy
New Cone
New Cone
Posts: 8
Joined: 03 Aug 2016 16:15

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby richardy » 08 Aug 2016 23:11

What did you do to fix it?

runner0502
Blank Cone
Blank Cone
Posts: 27
Joined: 25 Jun 2012 12:35
VLC version: 2.1.0-git
Operating System: windows, MacOS,linux
Location: China

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby runner0502 » 16 Aug 2016 13:26

apt-get install wine64-development-tools
motify contib\src\d3d9\rules.mak and contrib\src\d3d11\rules.mak IDL_INC_PATH = /usr/include/wine/windows/ to IDL_INC_PATH = /usr/include/wine-development/windows/
code for fun

runner0502
Blank Cone
Blank Cone
Posts: 27
Joined: 25 Jun 2012 12:35
VLC version: 2.1.0-git
Operating System: windows, MacOS,linux
Location: China

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby runner0502 » 16 Aug 2016 13:26

apt-get install wine64-development-tools
motify contib\src\d3d9\rules.mak and contrib\src\d3d11\rules.mak IDL_INC_PATH = /usr/include/wine/windows/ to IDL_INC_PATH = /usr/include/wine-development/windows/
code for fun

richardy
New Cone
New Cone
Posts: 8
Joined: 03 Aug 2016 16:15

Re: Problem compiling the latest Windows 3.0 from GIT.

Postby richardy » 18 Aug 2016 18:07

@runner0502 Thank you very much! This was the missing piece. I still needed to install packages not mentioned in the docs, remove all the qt4 packages and stuff from Ubuntu and install the qt5 packages. When packaging VLC for windows, I needed to modify the Makefile so that make would use todos and not unix2dos when changing the line endings on text files.

I will post more exact steps here https://forum.videolan.org/viewtopic.php?f=32&t=134885

If I had this much trouble cross compiling VLC, I am not sure we will be able to modify it to meet our requirements; but, thanks to your help, I can at least cross compile for Windows.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 10 guests