Hello,
I simply logged all my steps when I tried to compile and run the source code using MinGw/Msys, mainly because I wanted a backup in case I have to redo it. I'm quite sure that I have not found the best solution for all problems. Also I changed the order a bit to put all additional insallations at top. Hope it is the right place here and that someone will find it useful.
Greetings
1. Download intaller for MinGW/Msys
url: sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
take newest one
2. Install MinGW/Msys
run mingw-get-inst-*.exe
predefined,selected all
install-dir = <drive>:\<MinGW>
3. install add. packages
start:
<drive>:\<MinGW>\msys\1.0\msys.bat
! use "/"-notation here
/<drive>/<MinGW>/bin/mingw-get install msys-wget
/<drive>/<MinGW>/bin/mingw-get install mingw32-gettext
/<drive>/<MinGW>/bin/mingw-get install mingw32-lua
/<drive>/<MinGW>/bin/mingw-get install msys-libiconv
/<drive>/<MinGW>/bin/mingw-get install mingw32-libiconv
/<drive>/<MinGW>/bin/mingw-get install mingw32-libcharset
/<drive>/<MinGW>/bin/mingw-get install mingw32-binutils
/<drive>/<MinGW>/bin/mingw-get install mingw32-mingw-utils
/<drive>/<MinGW>/bin/mingw-get install g++
4. pkg-config
url: sourceforge.net/projects/pkgconfiglite/
extract into
<drive>:\<MinGW>\msys\1.0\
4b. Nasm
url: sourceforge.net/projects/nasm/files/Win32%20binaries/
e.g: nasm-2.07-win32.zip
Extract
nasm.exe
ndisasm.exe
into
<drive>:\<MinGW>\msys\1.0\bin
4c. yasm
url:
http://www.tortall.net/projects/yasm/releases/
yasm-1.2.0-win32.exe
Rename into
yasm.exe
and put into
<drive>:\<MinGW>\msys\1.0\bin
4d. CMake
url:
http://www.cmake.org/cmake/resources/software.html
cmake-2.8.8-win32-x86.zip
Extract into similar folder structure
<drive>:\<MinGW>\msys\1.0\
4e. git
(used in <vlc>/src)
url: msysgit.googlecode.com/files/PortableGit-1.7.10-preview20120409.7z
Extract _only_
git.exe
into
<drive>:\<MinGW>\msys\1.0\bin
5. vlc-Source
import using eclipse and egit
create project folder <vlc>
6. <vlc>/bootstrap
<vlc> = directory of vlc-project
cd <vlc>
./bootstrap
7. Workaround: configure.ac
change in file
<vlc>\configure.ac
old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -f 2> /dev/null || hostname`", [host which ran configure])
new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure])
8.
cd <vlc>
./configure
--> notice the build-value here = <build>
cd <vlc>/contrib/
mkdir my_gw
cd my_gw
../bootstrap --build=<build>
9. Workaround in Makefile
workaround:
cd <vlc>/contrib/my_gw
(first) change in Makefile:
old:
checksum = \
$(foreach f,$(filter $(TARBALLS)/%,$^), \
grep -- " $(f:$(TARBALLS)/%=%)$$" \
"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS" &&) \
(cd $(TARBALLS) && $(1) /dev/stdin) < \
"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS"
new:
checksum = \
$(foreach f,$(filter $(TARBALLS)/%,$^), \
grep -- " $(f:$(TARBALLS)/%=%)$$" \
"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS" &&) \
(cd $(TARBALLS) && $(1) "$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS")
10. Start compile
cd <vlc>/contrib/my_gw
make
11. Workaround problem in package a25dec
Problem:
aclocal: macro `_LT_DECL_SED' required but not defined
aclocal: macro `_LT_FUNC_STRIPNAME_CNF' required but not defined
workaround:
cd <vlc>/contrib/my_gw/a25dec
rm aclocal.m4
rm Makefile.in
automake
start again:
cd <vlc>/contrib/my_gw/
make
12. Workaround problem "PKG_PROG_PKG_CONFIG: command not found" (e.g. package fontconfig)
Workaround:
cp /<drive>/<MinGW>/msys/1.0/share/aclocal/pkg.m4 <vlc>/contrib/<build>/share/aclocal
start again:
cd <vlc>/contrib/my_gw/
make
13. Workaround problem in fribidi
Problem:
libtool: link: more than one -exported-symbols argument is not allowed
cd <vlc>/contrib/my_gw/fribidi/lib
delete from the last command the argument
-export-symbols-regex "^fribidi_.*"
and run it
start again:
cd <vlc>/contrib/my_gw/
make
14. Workaround problem in caca
<vlc>/contrib/my_gw/fribidi/lib
Problem:
ln: creating symbolic link <vlc>/contrib/<build>/lib/libcucul.la : No such file or directory
workaround:
replace "ln -fs" with "$(LN_S)" in
<vlc>/contrib/caca/caca/Makrefile.am
old:
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(libdir)
. ./libcaca.la || exit 1; \
for x in $$library_names; do \
ln -sf $$x $(DESTDIR)$(libdir)/$$(echo $$x | sed 's/caca/cucul/g'); \
done
ln -sf libcaca.la $(DESTDIR)$(libdir)/libcucul.la
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
ln -sf caca.pc $(DESTDIR)$(pkgconfigdir)/cucul.pc
$(mkinstalldirs) $(DESTDIR)$(includedir)
ln -sf caca.h $(DESTDIR)$(includedir)/cucul.h
new:
install-exec-local:
$(mkinstalldirs) $(DESTDIR)$(libdir)
. ./libcaca.la || exit 1; \
for x in $$library_names; do \
$(LN_S) $$x $(DESTDIR)$(libdir)/$$(echo $$x | sed 's/caca/cucul/g'); \
done
$(LN_S) libcaca.la $(DESTDIR)$(libdir)/libcucul.la
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
$(LN_S) caca.pc $(DESTDIR)$(pkgconfigdir)/cucul.pc
$(mkinstalldirs) $(DESTDIR)$(includedir)
$(LN_S) caca.h $(DESTDIR)$(includedir)/cucul.h
start again:
cd <vlc>/contrib/my_gw/
make
15. Workaround problem in libebml-1.2.2
Problem:
(cd libebml-1.2.2 && patch -p1) < ../../contrib/src/ebml/ebml-pic.patch
patching file make/linux/Makefile
Hunk #1 FAILED at 59.
Hunk #2 FAILED at 81.
2 out of 2 hunks FAILED -- saving rejects to file make/linux/Makefile.rej
make: *** [libebml] Error 1
workaround:
dos2unix <vlc>/contrib/my_gw/libebml-1.2.2/make/linux/Makefile
dos2unix <vlc>/contrib/src/ebml/ebml-pic.patch
dos2unix <vlc>/contrib/src/ebml/no-ansi.patch
start again:
rm -r libebml-1.2.2
cd <vlc>/contrib/my_gw/
make
16. Workaround problem in zlib
Problem:
Please use win32/Makefile.gcc instead.
make: *** [.zlib] Error 1
workaround:
Edit <vlc>/contrib/src/my_gw/zlib/win32/Makefile.gcc cp <vlc>/contrib/src/my_gw/zlib/configure
old:
echo "Please use win32/Makefile.gcc instead."
exit 1
new:
#echo "Please use win32/Makefile.gcc instead."
#exit 1
cp win32/Makefile.gcc Makefile
start again:
cd <vlc>/contrib/my_gw/
make
17. Workaround problem in openjpeg
Problem:
Hunk #1 FAILED at 83.
1 out of 1 hunk FAILED -- saving rejects to file libopenjpeg/opj_malloc.h.rej
workaround:
dos2unix <vlc>/contrib/src/openjpeg/freebsd.patch
start again:
rm -r openjpeg-1.5.0
cd <vlc>/contrib/my_gw/
make
18. Workaround problem in libgpg-error
Problem:
much cpu and doesnt come back after line:
potomo: './po/pl.po' converting from ISO-8859-2 to utf-8
Workaround:
(looks like a bug in iconv ...)
Edit file <vlc>/contrib/my_gw/libgpg-error/potomo and replace "--silent" with "-s"
old:
echo "potomo: '$infile' converting from $fromset to utf-8" >&2
iconv --silent --from-code=$fromset --to-code=utf-8 < "$infile" |\
sed "/^\"Content-Type:/ s/charset=[a-zA-Z0-9_-]*/charset=utf-8/"|\
msgfmt --output-file="$outfile" -
new:
echo "potomo: '$infile' converting from $fromset to utf-8" >&2
iconv -s --from-code=$fromset --to-code=utf-8 < "$infile" |\
sed "/^\"Content-Type:/ s/charset=[a-zA-Z0-9_-]*/charset=utf-8/"|\
msgfmt --output-file="$outfile" -
start again:
cd <vlc>/contrib/my_gw/
make
19. Workaround problem in glew
Problem
ln: ... : can make relative symbolic links only in current directory
Workaround:
Edit file <vlc>/contrib/my_gw/glew/Makrefile and replace "ln -sf" with "cp -p"
old:
LN = ln -sf
new:
LN = cp -p
and something looks wrong with the path to "$(LIB.SHARED)", so add "lib/" here
old:
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
new:
$(LN) lib/$(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME)
start again:
cd <vlc>/contrib/my_gw/
make
20. Workaround problem in game-music-emu
Problem:
make[1]: *** No rule to make target `install'. Stop.
Workaround:
(second) changes in file <vlc>/contrib/my_gw/Makefile
old:
CMAKE = cmake . -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) \
new:
CMAKE = cmake -G "MSYS Makefiles" . -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) \
old:
echo "set(CMAKE_RC_COMPILER $(HOST)-windres)" >> $@
new:
echo "set(CMAKE_RC_COMPILER windres)" >> $@
start again:
cd <vlc>/contrib/my_gw/
rm -r game-music-emu
rm toolchain.cmake
make
21. Workaround problem in goom-2k4-0-src
Problem:
(cd goom-2k4-0-src && patch -p1) < ../../contrib/src/goom/goom2k4-0-win32.patch
patching file configure.in
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 76.
2 out of 2 hunks FAILED -- saving rejects to file configure.in.rej
Workaround:
dos2unix <vlc>/contrib/src/goom/goom2k4-0-win32.patch
start again:
rm -r goom-2k4-0-src
cd <vlc>/contrib/my_gw/
make
22. Workaround problem in libmad
Problem:
aclocal: macro `_LT_DECL_SED' required but not defined
workaround:
cd <vlc>/contrib/my_gw/libmad
rm aclocal.m4
rm Makefile.in
automake
start again:
cd <vlc>/contrib/my_gw/
make
23. Workaround problem in libmatroska-1.3.0
Workaround:
dos2unix <vlc>/contrib/src/matroska/matroska-pic.patch
dos2unix <vlc>/contrib/src/matroska/no-ansi.patch
start again:
rm -r libmatroska-1.3.0
cd <vlc>/contrib/my_gw/
make
24. Workaround problem in libmodplug-0.8.8.4
Problem:
mv: cannot move `libmodplug.pc.in.tmp' to `libmodplug.pc.in': Permission denied
Workaround:
Change the "< "$1" by editing <vlc>/contrib/src/pkg-static.sh
old:
exec <"$1" >"$1.tmp" || exit $?
new:
exec >"$1.tmp" || exit $?
old:
done
echo "Libs: $PUBLIC $PRIVATE"
new:
done < "$1"
echo "Libs: $PUBLIC $PRIVATE"
start again:
cd <vlc>/contrib/my_gw/
make
25. Workaround problem in qt4
Problem(s):
The build script does not currently recognize all
platforms supported by Qt.
Rerun this script with a -platform option listed to
set the system/compiler combination you use.
Workaround:
Change the option (typo?) by editing <vlc>/contrib/src/qt4/rules.mak
old:
PLATFORM := -xplatform win32-g++
new:
PLATFORM := -platform win32-g++
old:
cd $< && $(XTOOLS) ./configure $(PLATFORM) -static -release -fast -no-exceptions -no-stl -no-sql-sqlite -no-qt3support -no-gif -no-libmng -qt-libjpeg -no-libtiff -no-qdbus -no-openssl -no-webkit -sse -no-script -no-multimedia -no-phonon -opensource -no-scripttools -no-opengl -no-script -no-scripttools -no-declarative -no-declarative-debug -opensource -no-s60 -host-little-endian -confirm-license
cd $< && $(MAKE) $(XTOOLS) sub-src
new:
cd $< && $(XTOOLS) ./configure.exe $(PLATFORM) -static -release -fast -no-exceptions -no-stl -no-sql-sqlite -no-qt3support -no-gif -no-libmng -qt-libjpeg -no-libtiff -no-qdbus -no-openssl -no-webkit -sse -no-script -no-multimedia -no-phonon -opensource -no-scripttools -no-opengl -no-script -no-scripttools -no-declarative -no-declarative-debug -opensource -no-s60 -confirm-license
cd $< && $(XTOOLS) make
! look for other fix in this file futher down to avoid long re-compiles!
26. Workaround problem cppcodemarker.cpp
An error happens in
<vlc>/contrib/my_gw/qt4/tools/qdoc3/cppcodemarker.cpp
which can be solved by adding hist include line in cppcodemarker.cpp
#include "ctype.h"
27. Workaround problem in libtheora
Problem:
aclocal: macro `_LT_DECL_SED' required but not defined
workaround:
cd <vlc>/contrib/my_gw/libtheora
rm aclocal.m4
rm Makefile.in
automake
start again:
cd <vlc>/contrib/my_gw/
make
27. create make file
cd <vlc>
./configure
28. create make file
cd <vlc>
make
29. Workaround problem vlc
Problem:
configure.ac:1: error: possibly undefined macro: dnl
Workaround:
cd <vlc>
autoreconf
Start again:
cd <vlc>
make
30. Workaround problem soundcloud.luac
Problem:
<MinGW>\run\bin\luac.exe: lua/playlist/soundcloud.lua:*: invalid escape sequence near '\.'
Workaround:
replace all backslashes ecnlosed in " with two backslashs
old:
and string.match( vlc.path, "soundcloud\.com/.+/.+" )
new:
and string.match( vlc.path, "soundcloud\\.com/.+/.+" )
old:
if string.match ( vlc.path, "soundcloud\.com" ) then
new:
if string.match ( vlc.path, "soundcloud\\.com" ) then
old:
if string.match( line, "window\.SC\.bufferTracks\.push" ) then
new:
if string.match( line, "window\\.SC\\.bufferTracks\\.push" ) then
old:
"window\.SC\.bufferTracks\.push.*" ..
new:
"window\\.SC\\.bufferTracks\\.push.*" ..
Start again:
cd <vlc>
make
31. Missing v8-parts
Problem:
... : undefined reference to `vp8_short_fdct4x4_mmx'
Workaround:
Edit file <vlc>/contrib/src/vpx/rules.mak
old:
--disable-vp8-decoder
new:
--enable-vp8-decoder
Start again:
cd <vlc>/contrib/my_gw
rm -r libvpx
make
cd <vlc>
make
32. Not found moc.exe
Problem:
/bin/sh: moc: command not found
Workaround:
add path <vlc>/contrib/<build>/bin into <vlc>/Makefile
old:
pkgdatadir = $(datadir)/vlc
new:
PATH += :<vlc>/contrib/<build>/bin
pkgdatadir = $(datadir)/vlc
Start again:
cd <vlc>
make
Alternative (better):
use ./compile, where configure put the right path as wrapper already into
cd <vlc>
./compile
33. Problem with qt4 / QApplication (and similar)
Only happes if not fixed before compiling qt4
Problem:
CXX libqt4_plugin_la-qt4.lo
qt4.cpp:29:24: fatal error: QApplication: No such file or directory
Cause is the missing option "--strip-program" in "install", which was used when compiling the qt4.
Workaround:
Replace "--strip-program" with a 2nd step using "-exec" parameter of "find"
Edit file
<vlc>/contrib/src/qt4/rules.mak
old:
do (cd $</include/Qt$${h} && find . -maxdepth 1 -type f \( -name '*.h' -o -name 'Q*' \) -exec install -D -s --strip-program="$(abspath $(SRC)/qt4/fix_header.sh)" -- "{}" "$(PREFIX)/include/qt4/Qt$${h}/{}" \;) ; \
new:
do (cd $</include/Qt$${h} && find . -maxdepth 1 -type f \( -name '*.h' -o -name 'Q*' \) -exec install -D -- "{}" "$(PREFIX)/include/qt4/Qt$${h}/{}" \; -exec "$(abspath $(SRC)/qt4/fix_header.sh)" "$(PREFIX)/include/qt4/Qt$${h}/{}" \;) ; \
Start again (long):
cd <vlc>/contrib/my_gw
rm -r qt4
make
cd <vlc>
make
Alternative (shortcut with "display"):
add also at the bottom of <vlc>/contrib/src/qt4/rules.mak
new:
qt4_workaround: qt4
for h in Core Gui Xml Network; \
do (cd $</include/Qt$${h} && find . -maxdepth 1 -type f \( -name '*.h' -o -name 'Q*' \) \
-exec echo "$(PREFIX)/include/qt4/Qt$${h}/{}" \; \
-exec install -D -- "{}" "$(PREFIX)/include/qt4/Qt$${h}/{}" \; \
-exec "$(abspath $(SRC)/qt4/fix_header.sh)" "$(PREFIX)/include/qt4/Qt$${h}/{}" \;) ; \
done
Start again (shortcut):
cd <vlc>/contrib/my_gw
make qt4_workaround
cd <vlc>
make
34. Problem with ../modules/plugins.dat
Problem:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Happens when running make in <vlc>/bin
./vlc-cache-gen.exe ../modules
Have not found the real problem, but "../modules/plugins.dat" is created even after the error
So workaround:
Block rebuild in Makefile by editing <vlc>/bin/Makefile
old:
.PHONY: ../modules/plugins.dat
new:
# .PHONY: ../modules/plugins.dat
35. hmm, strange
somehow vlc is small and does nothing
36. Compile 2nd try
cd <vlc>
extras/package/win32/configure.sh
./compile
37. Problem with <vlc>/modules/gui/qt4/dialogs/help.cpp
<vlc>/modules/gui/qt4
CXXLD libqt4_plugin.la
Creating library file: .libs/libqt4_plugin.dll.a
dialogs/.libs/libqt4_plugin_la-help.o: In function `~UpdateDialog':
Somehow solved via:
cd <vlc>/modules/gui/qt4
make clean
cd <vlc>
./compile
38. Problem with ../modules/plugins.dat
again, so nothing better
Like I understand this happens on i686 and/or K2 system and there is no solution for it yet
--> ok, let's debug