Problem with cross-compiling for win32

*nix specific usage questions
SCF
New Cone
New Cone
Posts: 3
Joined: 12 Jul 2010 14:31

Problem with cross-compiling for win32

Postby SCF » 12 Jul 2010 19:16

In order to compile a customized version of vlc for Windows I started setting up a build environment. After reading into the wiki, I figured that using Linux to cross-compile for win32 would be the best option as this is what the official binary distribution is compiled with (afaik).

So I set up Debian Linux in a VM. I installed from the lenny CD, though I updated to the testing branch squeeze later on to get more recent packages. Then I installed the required packages as outlined in Win32Compile. I also manually updated mingw32-runtime and w32api as explained in some blog (I used runtime 3.18 and w32api 3.14 and later also tested with 3.15.2 and 3.13 though that didn't change anything), though I'm not 100% sure whether this was actually required as I'm not building ffmpeg myself.

Command to check compiler version:

Code: Select all

i586-mingw32msvc-gcc --ver
Since the command reported that I had version 4.2.1,I downloaded the respective contrib package. I later also tried a more recent version of the compiler in conjunction with the most recent contribs though the problem persisted.

I extracted the contribs using

Code: Select all

tar jxf <archive> -C /
I also double checked they were in /usr/win32.

I then downloaded the 1.1.0 source tarball from the VLC Website. Apparently it doesn't contain the config scripts as explained in the wiki, though I could retrieve them from Git.

However when I started the configure with

Code: Select all

sh extras/package/configure-mingw.sh

Code: Select all

configure: error: Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.
Just in case that's relevant, I did all this as root (yeah I know it's evil).

I'm totally at a loss as to why it is not working. Did I forget something important? Any ideas would be appreciated.

Rémi Denis-Courmont
Developer
Developer
Posts: 15133
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Problem with cross-compiling for win32

Postby Rémi Denis-Courmont » 12 Jul 2010 20:34

That script is in the git repository. I don't understand why you use the source tarball. If you just want VLC for Windows, you can download it precompiled from the website. If you want to modify VLC, then you really should use the source-controlled version from git.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Problem with cross-compiling for win32

Postby xtophe » 12 Jul 2010 20:41

Are the .pc correctly in /usr/win32/lib/pkgconfig/ ?

try running PKG_CONFIG_LIBDIR= ..... pkg-config libavcodec
Xtophe

SCF
New Cone
New Cone
Posts: 3
Joined: 12 Jul 2010 14:31

Re: Problem with cross-compiling for win32

Postby SCF » 13 Jul 2010 01:38

I don't understand why you use the source tarball. If you just want VLC for Windows, you can download it precompiled from the website. If you want to modify VLC, then you really should use the source-controlled version from git.
Guess I didn't know any better. Of course I want to modify it, otherwise all the hassle wouldn't be necessary.
Are the .pc correctly in /usr/win32/lib/pkgconfig/ ?

try running PKG_CONFIG_LIBDIR= ..... pkg-config libavcodec
When I run that (with the correct path entered of course), it says

Code: Select all

-bash: pkg-config: command not found
I also checked the config.log again and apparently these programs are not there

Code: Select all

configure:23883: checking for i586-mingw32msvc-pkg-config configure:23916: result: no configure:23926: checking for pkg-config configure:23959: result: no
Am I supposed to have these programs? If yes, why doesn't the configure script complain about that?

Edit: Apparently I am supposed to have pkg-config. Thanks to xtophe for explaining this on IRC.

SCF
New Cone
New Cone
Posts: 3
Joined: 12 Jul 2010 14:31

Re: Problem with cross-compiling for win32

Postby SCF » 13 Jul 2010 19:28

Ok after that configure worked. During make I ran into another error:

Code: Select all

/bin/sh: moc: command not found
I was able to resolve this by installing qt4 via

Code: Select all

apt-get install libqt4-dev
However now I run into another error which is somewhat less descriptive:

Code: Select all

LUAC lua/extensions/allocine-fr.luac make[2]: *** [lua/extensions/allocine-fr.luac] Error 1 make[2]: Leaving directory `/root/vlc/vlc-1.1.0/share' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/vlc/vlc-1.1.0' make: *** [all] Error 2

Rémi Denis-Courmont
Developer
Developer
Posts: 15133
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Problem with cross-compiling for win32

Postby Rémi Denis-Courmont » 14 Jul 2010 21:23

Missing lua binaries.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 13 guests