📄 cygwin-compile.txt
字号:
This will output something like:
patching file common/i386/pixel.h
patching file common/i386/pixel-a.asm
patching file common/pixel.c
Your source code is now patched!
NOTE: If you want to revert to the original version you can use the -R option
with the patch command or alternatively you can just delete the changed files
and just do an SVN update to get the original/latest SVN version back.
9.3.2 Creating .diff files
=============================
When changing the source code it's possible to create a "difference" file
against the latest source.
In this example the file /modules/codec/x264.c was changed (the part
"in kbit/s" was added to a description).
Start your Cygwin shell.
Change to the appropriate folder where a changed file is.
cd vlc-trunk/modules/codec (example)
Output the svn diff command to a file:
svn diff > x264-patch.diff
The current folder now holds a x264-patch.diff file containing the following:
Index: x264.c
===================================================================
--- x264.c (revision 15921)
+++ x264.c (working copy)
@@ -131,7 +131,7 @@
#define RATETOL_LONGTEXT N_( "Allowed variance in average. " \
"bitrate (in kbits/s).")
-#define VBV_MAXRATE_TEXT N_("Max local bitrate")
+#define VBV_MAXRATE_TEXT N_("Max local bitrate in kbit/s")
#define VBV_MAXRATE_LONGTEXT N_( "Sets a maximum local bitrate in kbits/s.")
#define VBV_BUFSIZE_TEXT N_("VBV buffer")
NOTE: In Windows you should open this file with something else than notepad
(so wordpad or some more advanced editor). This has to do with the end of
line markers that are present in the file since it was made in a Linux
environment.
9.5 Reverting to older SVN source code
=========================================
If for some reason you want to revert to (use) an older version (let's say
you are using revision 15916 of the VLC source code but would like to test
with 15915) then use the svn "update" function from within Cygwin but use
an older revision number.
Start your Cygwin shell...
cd vlc-trunk
svn up -r 15915
And you'll see something like this:
U src\input\input.c
Updated to revision 15915.
The following command will show the version used:
svn info
10 Troubleshooting
========================
This chapter mentions some frequently encountered problems during compile and
installation procedures and possible fixes or workarounds.
10.1 "Making all in <folder>" takes forever with 0% CPU usage
=================================================================
Make seems to "stall" at a certain point (no CPU usage) and nothing seems to
happen anymore:
Making all in mpeg
make[5]: Entering directory `/home/Administrator/vlc-trunk/modules/mux/mpeg'
NOTE: This problem seems to occur on dual CPU (or HyperThreading enabled)
systems.
FIX: in the vlc-trunk do a ./toolbox --distclean before doing a ../configure-vlc
and try again...
10.2 configure: error: C compiler cannot create executables
===============================================================
The ../configure-vlc gives the following error:
checking for gcc... gcc -mno-cygwin
checking for C compiler default output file name... configure: error: C compiler
cannot create executables
FIX: it's very likely you are using the gcc 3.3 version but with the wrong mingw
packages (the ones that come with 3.4). Reinstall the following gcc-mingw packages
but make sure to use the older version!!!
20050522-1 gcc-mingw-core autoselected -> change to 20040810-1
20050522-1 gcc-mingw-g++ autoselected -> change to 20040810-1
You can check what version of gcc you are version in the Cygwin shell by using
the following command:
gcc --version
10.3 collect2: ld returned 1 exit status (libebml)
======================================================
A make fails with the following error:
/usr/win32/lib/libebml.a(EbmlMaster.o):EbmlMaster.cpp:(.text$_ZNSt14__simple_all
ocISsSt24__default_alloc_templateILb1ELi0EEE10deallocateEPSsj[std::__simple_allo
c<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_
_default_alloc_template<true, 0> >::deallocate(std::basic_string<char, std::char
_traits<char>, std::allocator<char> >*, unsigned int)]+0x1d): undefined referenc
e to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)'
/usr/win32/lib/libebml.a(EbmlMaster.o):EbmlMaster.cpp:(.text$_ZNSt14__simple_all
ocISsSt24__default_alloc_templateILb1ELi0EEE8allocateEj[std::__simple_alloc<std:
:basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__defau
lt_alloc_template<true, 0> >::allocate(unsigned int)]+0x1d): undefined reference
to `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
/usr/win32/lib/libebml.a(EbmlMaster.o):EbmlMaster.cpp:(.text$_ZNSt14__simple_all
ocIPN7libebml11EbmlElementESt24__default_alloc_templateILb1ELi0EEE8allocateEj[st
d::__simple_alloc<libebml::EbmlElement*, std::__default_alloc_template<true, 0>
>::allocate(unsigned int)]+0x1d): undefined reference to `std::__default_alloc_t
emplate<true, 0>::allocate(unsigned int)'
/usr/win32/lib/libebml.a(EbmlMaster.o):EbmlMaster.cpp:(.text$_ZNSt14__simple_all
ocIPN7libebml11EbmlElementESt24__default_alloc_templateILb1ELi0EEE10deallocateEP
S2_j[std::__simple_alloc<libebml::EbmlElement*, std::__default_alloc_template<tr
ue, 0> >::deallocate(libebml::EbmlElement**, unsigned int)]+0x1d): undefined ref
erence to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned in
t)'
collect2: ld returned 1 exit status
make[2]: *** [vlc.exe] Error 1
This problem is because libEbml is a C++ lib and it doesn't seem to link with
gcc 3.4.
FIX: Use gcc 3.3 with the according 3.3 "contrib" package version or use a
"contrib" package for 3.4 (or even better try compiling it yourself).
WORKAROUND for gcc 3.4: Use --disable-mkv in configure-vlc.
10.4 zip: command not found
===============================
A make package fails with the following error:
zip -r vlc-0.8.4-svn-win32.zip vlc-0.8.4-svn
/bin/bash: line 1: zip: command not found
make: *** [package-win32-base-zip] Error 127
FIX: doh! forgot to install the zip package in Cygwin :P
10.5 error: parse error before '(' token
============================================
A make (compile) of FFmpeg results in the following error:
/usr/include/sys/unistd.h:203: error: parse error before '(' token
make[1]: *** [ffm.o] Error 1
It's very likely you are usix the POSIX emulater which you shouldn't...
FIX: compile with the option -mno-cygwin
10.6 error: invalid conversion from `const void*' to `void*'
================================================================
src/theme_loader.cpp: In function `int gzwrite_frontend(int, const void*, size_t)':
src/theme_loader.cpp:599: error: invalid conversion from `const void*' to `void*'
src/theme_loader.cpp:599: error: initializing argument 2 of `int gzwrite(void*, void*, unsigned int)'
make[6]: *** [libskins2_plugin_a-theme_loader.o] Error 1
FIX: This is related to a problem with the zlib library, updating to at
least 1.2.2-1 but preferably 1.2.3 or newer is required
10.7 error: cannot convert `const wxChar*' to `const char*
===============================================================
if g++ -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/win32/include -I/
usr/win32/include/ebml -D_OFF_T_ -D_off_t=long -DSYS_MINGW32 -I../../../include
`top_builddir="../../.." ../../../vlc-config --cxxflags plugin wxwidgets` -Wsign
-compare -Wsign-compare -Wall -mms-bitfields -pipe -MT libwxwidgets_plugin_a-wx
widgets.o -MD -MP -MF ".deps/libwxwidgets_plugin_a-wxwidgets.Tpo" -c -o libwxwid
gets_plugin_a-wxwidgets.o `test -f 'wxwidgets.cpp' || echo './'`wxwidgets.cpp; \
then mv -f ".deps/libwxwidgets_plugin_a-wxwidgets.Tpo" ".deps/libwxwidgets_plugi
n_a-wxwidgets.Po"; else rm -f ".deps/libwxwidgets_plugin_a-wxwidgets.Tpo"; exit
1; fi
In file included from /usr/win32/include/wx-2.6/wx/debug.h:22,
from /usr/win32/include/wx-2.6/wx/defs.h:452,
from /usr/win32/include/wx-2.6/wx/wxprec.h:13,
from wxwidgets.h:40,
from wxwidgets.cpp:39:
/usr/win32/include/wx-2.6/wx/wxchar.h: In function `size_t wxStrlen(const wxChar
*)':
/usr/win32/include/wx-2.6/wx/wxchar.h:759: error: cannot convert `const wxChar*'
to `const char*' for argument `1' to `size_t strlen(const char*)'
In file included from /usr/win32/include/wx-2.6/wx/memory.h:20,
from /usr/win32/include/wx-2.6/wx/object.h:25,
from /usr/win32/include/wx-2.6/wx/wx.h:16,
from wxwidgets.h:41,
from wxwidgets.cpp:39:
/usr/win32/include/wx-2.6/wx/string.h: In constructor `wxString::wxString(const
wxChar*)':
FIX: update wxwidgets or try a different/newer "contrib" package.
10.8 undefined reference to `_av_parser_change' (FFmpeg)
============================================================
ffmpeg.o: In function `output_packet':
/home/Administrator/FFmpeg-20050724/ffmpeg.c:1414: undefined reference to `_av_p
arser_change'
/home/Administrator/FFmpeg-20050724/ffmpeg.c:1415: undefined reference to `_av_d
estruct_packet'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g.exe] Error 1
This is a possible conflict when you use normal configure-ffmpeg (uses /usr/win32
contrib) instead of configure-ffmpeg-svn
10.9 undefined reference to `_pp_get_context' (FFmpeg)
==========================================================
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o): In function `Init
Postproc__ffmpeg':
/home/Administrator/vlc-trunk/modules/codec/ffmpeg/postprocess.c:164: undefined
reference to `_pp_get_context'
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o): In function `PPQC
allback':
/home/Administrator/vlc-trunk/modules/codec/ffmpeg/postprocess.c:244: undefined
reference to `_pp_get_mode_by_name_and_quality'
./modules/codec/ffmpeg/libffmpeg.a(libffmpeg_a-postprocess.o): In function `Post
procPict__ffmpeg':
/home/Administrator/vlc-trunk/modules/codec/ffmpeg/postprocess.c:191: undefined
reference to `_pp_postprocess'
$
ePostproc__ffmpeg':
/home/Administrator/vlc-trunk/modules/codec/ffmpeg/postprocess.c:209: undefined
reference to `_pp_free_mode'
/home/Administrator/vlc-trunk/modules/codec/ffmpeg/postprocess.c:210: undefined
reference to `_pp_free_context'
collect2: ld returned 1 exit status
make[2]: *** [vlc.exe] Error 1
make[2]: Leaving directory `/home/Administrator/vlc-trunk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Administrator/vlc-trunk'
make: *** [all] Error 2
FFmpeg was not compiled with post processing support. To do so the following
options need to be added to the configure lines for FFmpeg:
--enable-pp --enable-gpl
Postprocessing code is under GPL.
10.10 error: expected primary-expression before '<<' token
=============================================================
In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32
api/windows.h:52,
from ../../../include/vlc_common.h:459,
from ../../../include/vlc/vlc.h:153,
from dshow.cpp:31:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wingdi.h:3:1: warn
ing: this is the location of the previous definition
In file included from /usr/win32/include/dshow.h:35,
from common.h:45,
from dshow.cpp:35:
/usr/win32/include/ddraw.h:14: warning: ignoring #pragma warning
In file included from /usr/win32/include/dshow.h:35,
from common.h:45,
from dshow.cpp:35:
/usr/win32/include/ddraw.h:5552: warning: ignoring #pragma warning
In file included from /usr/win32/include/dshow.h:45,
from common.h:45,
from dshow.cpp:35:
/usr/win32/include/strmif.h:2: warning: ignoring #pragma warning
In file included from /usr/win32/include/dsound.h:13,
from /usr/win32/include/amaudio.h:18,
from /usr/win32/include/dshow.h:47,
from common.h:45,
from dshow.cpp:35:
/usr/win32/include/d3dtypes.h:22: warning: ignoring #pragma warning
/usr/win32/include/d3dtypes.h:1813: warning: ignoring #pragma warning
In file included from /usr/win32/include/dshow.h:48,
from common.h:45,
from dshow.cpp:35:
/usr/win32/include/control.h:2: warning: ignoring #pragma warning
dshow.cpp: In function `int CommonOpen(vlc_object_t*, access_sys_t*, vlc_bool_t)
':
dshow.cpp:456: error: expected primary-expression before '<<' token
dshow.cpp:456: error: expected primary-expression before '<<' token
dshow.cpp:456: error: expected primary-expression before '<<' token
dshow.cpp:456: error: expected primary-expression before '<' token
dshow.cpp:456: error: expected primary-expression before '.' token
dshow.cpp:470: error: expected primary-expression before '==' token
dshow.cpp:470: error: expected primary-expression before '==' token
dshow.cpp:470: error: expected primary-expression before '==' token
dshow.cpp:470: error: expected primary-expression before '=' token
dshow.cpp:484: error: expected primary-expression before '>>' token
dshow.cpp:484: error: expected primary-expression before '>>' token
dshow.cpp:484: error: expected primary-expression before '>>' token
dshow.cpp:484: error: expected primary-expression before '>' token
dshow.cpp:484: error: expected primary-expression before '.' token
dshow.cpp:485: error: expected `;' before "IAMCrossbar"
dshow.cpp:491: error: `pXbar' undeclared (first use this function)
dshow.cpp:491: error: (Each undeclared identifier is reported only once for each
function it appears in.)
make[6]: *** [libdshow_plugin_a-dshow.o] Error 1
make[6]: Leaving directory `/home/Administrator/vlc-trunk/modules/access/dshow'
make[5]: *** [all-modules] Error 1
make[5]: Leaving directory `/home/Administrator/vlc-trunk/modules/access/dshow'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/Administrator/vlc-trunk/modules/access'
make[3]: *** [all] Error 2
Basically in case of conflict svn adds "<<< mine" and "=======" and ">>>> r1242"
which makes gcc complains.
FIX: revert the offending file
10.11 configure: error: Could not find ffmpeg on your system
===============================================================
configure: error: Could not find ffmpeg on your system: you may get it from http
://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disa
ble-ffmpeg to disable the ffmpeg plugins.
make: *** [config.status] Error 1
This can happen when you do a make without doing a configure and the
configure.ac file in the source code recently updated.
FIX: do a full configure (using ../configure-vlc) and then run the make process
10.12 Objective C source seen but `OBJC' is undefined
========================================================
The configure process stops halfway.
+ aclocal-1.9 -I m4
+ autoconf
+ autoheader
+ automake-1.9 --add-missing --copy -Wall
configure.ac: installing `autotools/install-sh'
configure.ac: installing `autotools/missing'
activex/Makefile.am:143: shell $(VLC_CONFIG: non-POSIX variable name
activex/Makefile.am:143: (probably a GNU make extension)
activex/Makefile.am: installing `autotools/compile'
activex/Makefile.am: installing `autotools/depcomp'
modules/gui/macosx/Makefile.am: Objective C source seen but `OBJC' is undefined
modules/misc/testsuite/Makefile.am: Objective C source seen but `OBJC' is undefi
ned
src/Makefile.am: Objective C source seen but `OBJC' is undefined
Makefile.am:282: user target `vlc$(EXEEXT)' defined here...
/usr/share/automake-1.9/am/program.am: ... overrides Automake target `vlc$(EXEEX
T)' defined here
Makefile.am:230: while processing program `vlc'
make: *** No targets specified and no makefile found. Stop.
This problem is related to a warning earlier on and only occured in a few
revisions where a built-in workaround wasn't working properly:
+ echo 'Enabling provisional autoconf 2.59 work-around. Update autoconf ASAP.'
Enabling provisional autoconf 2.59 work-around. Update autoconf ASAP.
FIX: update autoconf to 2.60 or newer. If Cygwin doesn't provide this version yet
then build it yourself from extras/contrib.
Enter the following commands in your Cygwin shell:
cd vlc-trunk/extras/contrib
./bootstrap
cd src
make .autoconf
There should now be compiled autoconf version (probably 2.60 or newer) in
extras/contrib that the bootstrap process will use.
Now start the whole "Compile VLC" process from the start again.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -