Issues with compiling VLC 1.2 on Windows XP/MSYS
Posted: 23 Jul 2012 18:07
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.
According to the wiki, this is normal. I'm just listing it here b/c of the next issues.
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.
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.
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.
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
configure then completed without any errors.
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.
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
Again, this may be an issue with how the contribs were set up above.
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>"
I checked the Makefile and there is no rule. I ended up running package-win32-exe
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
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
- "stat" errors for i586-pc-something
Code: Select all
$ mv i586-pc-something ..
$ cd ../i586-pc-something
$ change_prefix.sh
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
- "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
- "Bootstrap" section omits "bootstrap"
- 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.
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
- 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
- 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
Code: Select all
source: C:\msys\1.0\home\gnosygnu\vlc\contrib\i586-mingw32msvc\moc.exe
target: C:\msys\1.0\bin\moc.exe
- 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
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.
- 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...
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"