Page 1 of 1

Issues with compiling VLC 1.2 on Windows XP/MSYS

Posted: 23 Jul 2012 18:07
by gnosygnu
Hi all. I spent some time yesterday trying to compile VLC 1.2 on my Windows XP machine. I used the VLC 2.0.3 source tar and followed the guide in http://wiki.videolan.org/Win32CompileMSYS, but still ran into several issues. After much debugging, I managed to get it working on my machine. I want to update the wiki with "correct" instructions, but I'd like someone else to review, especially since this is an area in which I am admittedly inexperienced.

I list all issues below. If anyone can confirm/correct, I'd appreciate it.

Thanks.
  • "make prebuilt" fails with tar error

Code: Select all

tar: i586-mingw32msvc/lib/libdts.a: Cannot create symlink to `/home/jb/vlc-2.0/contrib/i586-mingw32msvc/lib/libdca.a': No such file or directory tar: Error exit delayed from previous errors make: *** [prebuilt] Error 2
According to the wiki, this is normal. I'm just listing it here b/c of the next issues.
  • "stat" errors for i586-pc-something

Code: Select all

$ mv i586-pc-something .. $ cd ../i586-pc-something $ change_prefix.sh
This looks like a typo. Instead of "i586-pc-something", it should be "i586-mingw32msvc". I will update this accordingly.

There is one thing I want to confirm though. After the above executes, the contrib directory will be C:\msys\1.0\home\gnosygnu\vlc\contrib\i586-mingw32msvc. This differs from 1.1 wherein the contrib directory ended up in C:\msys\1.0\win32.
  • "change_prefix.sh" reports Permission denied error

Code: Select all

mv: cannot move `./change_prefix.sh.tmp' to `./change_prefix.sh': Permission denied
This appears to be harmless. The script continues to execute afterwards. Note for others: there will be no status updates for a few minutes, so it may appear frozen. Don't Ctrl-Break.
  • "Bootstrap" section fails for "cp -v /usr/win32/share/aclocal/* m4/"

Code: Select all

cp: cannot stat `/usr/win32/share/aclocal/*': No such file or directory
This may be a relic from the 1.1 process. I don't have a win32 directory (C:\msys\1.0\win32 does not exist). I believe this line should be removed.
  • "Bootstrap" section omits "bootstrap"
This may be obvious to others, but there should be a 4th line in the "Bootstrap" section that explicitly says to run "bootstrap". Otherwise the configure process will fail.
  • configure fails with "Could not find lua"

Code: Select all

configure: error: Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.
This took me a while to figure out, and I'm not sure if it is correct. I tried to do disable-lua, but then ended up running into errors with live555 and mad. I added --disable-live555 and --disable-mad, but then got libfaad errors.

Eventually I realized that it was not seeing my contribs. As I indicated above, they are in C:\msys\1.0\home\gnosygnu\vlc\contrib\i586-mingw32msvc. In order for configure to pick up the location, I added a --with-contrib=contrib/i586-mingw32msvc

Code: Select all

sh extras/package/win32/configure.sh --host=i586-pc-mingw32msvc --with-contrib=contrib/i586-mingw32msvc --disable-nls
configure then completed without any errors.
  • make fails b/c of missing libpng files

Code: Select all

/bin/sed: can't read /home/gnosygnu/vlc/contrib/i586-mingw32msvc/lib/libpng.la: No such file or directory libtool: link: `/home/gnosygnu/vlc/contrib/i586-mingw32msvc/lib/libpng.la' is not a valid libtool archive
There were no libpng.la or libpng.a files, but there were libpng15.la and libpng15.a ones. I copied these files and renamed them accordingly and was able to proceed.
  • make fails b/c of missing commands for moc, rcc, uic

Code: Select all

/bin/sh: moc: command not found make[5]: *** [main_interface.moc.cpp] Error 127 /bin/sh: rcc: command not found make[5]: *** [resources.cpp] Error 127 /bin/sh: uic: command not found make[5]: *** [ui/equalizer.h] Error 127
I sequentially got each of the above after running "PATH=/usr/win32/bin:$PATH make". I resolved each by copying the corresponding command.exe from the contrib directory to my bin directory

Code: Select all

source: C:\msys\1.0\home\gnosygnu\vlc\contrib\i586-mingw32msvc\moc.exe target: C:\msys\1.0\bin\moc.exe
Again, this may be an issue with how the contribs were set up above.
  • make fails with compile error in gui/qt with "expected unqualified-id before 'char'"

Code: Select all

In file included from dialogs_provider.cpp:42:0: dialogs/preferences.hpp: At global scope: dialogs/preferences.hpp:72:19: error: expected unqualified-id before 'char' dialogs/preferences.hpp:72:18: error: expected ';' at end of member declaration dialogs/preferences.hpp:72:24: error: expected unqualified-id before ',' token
After some searching I found the following thread, viewtopic.php?f=14&t=102257. SENCO's suggestion works on my machine.
Explicitly, I did the following
- opened up C:\msys\1.0\home\gnosygnu\vlc\include\vlc_windows_interfaces.h
- added "#undef small" on a new line directly underneath "#include <objbase.h>"
  • make package-win32-base does not exist

Code: Select all

make: *** No rule to make target `package-win32-base'. Stop.
I checked the Makefile and there is no rule. I ended up running package-win32-exe
  • make package-win32-exe fails due to misssing commands for git, svn, makensis

Code: Select all

git clone git://git.videolan.org/npapi-vlc.git npapi-vlc make: git: Command not found etc...
I copied the git.exe from my Git installation to C:\msys\1.0\bin\. For svn, I copied over the entire bin folder from http://svn.collab.net/repos/svn/branches/1.7.x/CHANGES.
For makensis I got tired and ended up commenting the lines in Makefile

Code: Select all

# Create package # if makensis -VERSION >/dev/null 2>&1; then \ # MAKENSIS="makensis"; \ # elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \ # MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis"; \ # elif [ -x "$(PROGRAMFILES)/NSIS/makensis" ]; then \ # MAKENSIS="$(PROGRAMFILES)/NSIS/makensis"; \ # elif wine --version >/dev/null 2>&1; then \ # MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe"; \ # else \ # echo 'Error: cannot locate makensis tool'; exit 1; \ # fi; \ # eval "$$MAKENSIS $(win32_destdir)/spad.nsi"; \ # eval "$$MAKENSIS $(win32_destdir)/vlc.win32.nsi"

Re: Issues with compiling VLC 1.2 on Windows XP/MSYS

Posted: 27 Jul 2012 17:25
by Jean-Baptiste Kempf
This looks like a typo. Instead of "i586-pc-something", it should be "i586-mingw32msvc". I will update this accordingly.
i586-mingw32msvc is a i586-pc-something :)

There is one thing I want to confirm though. After the above executes, the contrib directory will be C:\msys\1.0\home\gnosygnu\vlc\contrib\i586-mingw32msvc. This differs from 1.1 wherein the contrib directory ended up in C:\msys\1.0\win32.
Indeed, this allows one contrib per VLC version.
  • "Bootstrap" section fails for "cp -v /usr/win32/share/aclocal/* m4/"

Code: Select all

cp: cannot stat `/usr/win32/share/aclocal/*': No such file or directory
This may be a relic from the 1.1 process. I don't have a win32 directory (C:\msys\1.0\win32 does not exist). I believe this line should be removed.
Probably.
  • "Bootstrap" section omits "bootstrap"
This may be obvious to others, but there should be a 4th line in the "Bootstrap" section that explicitly says to run "bootstrap". Otherwise the configure process will fail.
Yes.
  • configure fails with "Could not find lua"

Code: Select all

configure: error: Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.
This took me a while to figure out, and I'm not sure if it is correct. I tried to do disable-lua, but then ended up running into errors with live555 and mad. I added --disable-live555 and --disable-mad, but then got libfaad errors.

Eventually I realized that it was not seeing my contribs. As I indicated above, they are in C:\msys\1.0\home\gnosygnu\vlc\contrib\i586-mingw32msvc. In order for configure to pick up the location, I added a --with-contrib=contrib/i586-mingw32msvc

Code: Select all

sh extras/package/win32/configure.sh --host=i586-pc-mingw32msvc --with-contrib=contrib/i586-mingw32msvc --disable-nls
configure then completed without any errors.
This is not normal. it works for me. But feel free to update the wiki.
  • make fails b/c of missing libpng files

Code: Select all

/bin/sed: can't read /home/gnosygnu/vlc/contrib/i586-mingw32msvc/lib/libpng.la: No such file or directory libtool: link: `/home/gnosygnu/vlc/contrib/i586-mingw32msvc/lib/libpng.la' is not a valid libtool archive
There were no libpng.la or libpng.a files, but there were libpng15.la and libpng15.a ones. I copied these files and renamed them accordingly and was able to proceed.
  • make fails b/c of missing commands for moc, rcc, uic

Code: Select all

/bin/sh: moc: command not found make[5]: *** [main_interface.moc.cpp] Error 127 /bin/sh: rcc: command not found make[5]: *** [resources.cpp] Error 127 /bin/sh: uic: command not found make[5]: *** [ui/equalizer.h] Error 127
I sequentially got each of the above after running "PATH=/usr/win32/bin:$PATH make". I resolved each by copying the corresponding command.exe from the contrib directory to my bin directory

Code: Select all

source: C:\msys\1.0\home\gnosygnu\vlc\contrib\i586-mingw32msvc\moc.exe target: C:\msys\1.0\bin\moc.exe
Again, this may be an issue with how the contribs were set up above.
No, this should just work and take moc from contribs/.../bin/
  • make fails with compile error in gui/qt with "expected unqualified-id before 'char'"

Code: Select all

In file included from dialogs_provider.cpp:42:0: dialogs/preferences.hpp: At global scope: dialogs/preferences.hpp:72:19: error: expected unqualified-id before 'char' dialogs/preferences.hpp:72:18: error: expected ';' at end of member declaration dialogs/preferences.hpp:72:24: error: expected unqualified-id before ',' token
After some searching I found the following thread, viewtopic.php?f=14&t=102257. SENCO's suggestion works on my machine.
Explicitly, I did the following
- opened up C:\msys\1.0\home\gnosygnu\vlc\include\vlc_windows_interfaces.h
- added "#undef small" on a new line directly underneath "#include <objbase.h>"
Yep.

  • make package-win32-base does not exist

Code: Select all

make: *** No rule to make target `package-win32-base'. Stop.
I checked the Makefile and there is no rule. I ended up running package-win32-exe
or make package-win-base or -common

Re: Issues with compiling VLC 1.2 on Windows XP/MSYS

Posted: 29 Jul 2012 05:31
by gnosygnu
Okay. Thanks for the confirmation. I agree with your points above. However, I do want to expand on the following:

In order for configure to pick up the location, I added a --with-contrib=contrib/i586-mingw32msvc

Code: Select all

sh extras/package/win32/configure.sh --host=i586-pc-mingw32msvc --with-contrib=contrib/i586-mingw32msvc --disable-nls
Again, this may be an issue with how the contribs were set up above.
This is not normal. it works for me. But feel free to update the wiki.
I was able to repeat it though. I deleted my old 1.1 installation and finally got 1.2 working by doing the above. Then I deleted 1.2 again and walked through the steps before starting this thread.

The only thing I can think of is that I used a non-standard path location for my installation. Instead of C:\msys\1.0, I used something like C:\dev\msys\1.0. If I do it a 3rd time, I'll try again with C:\msys\1.0.

At any rate, I made some minor changes to the main Win32CompileMSYSNew and dumped the rest of the detail in Win32CompileMSYSTroubleShooting. Hopefully it will help someone else.

Thanks again for the help.

Re: Issues with compiling VLC 1.2 on Windows XP/MSYS

Posted: 31 Jul 2012 01:09
by Jean-Baptiste Kempf
Cool.