· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
VLC Cygwin Compile

1. 개요

본 문서는 VLC를 Windows Cygwin 환경에서 컴파일 하는 방법에 대하여 설명한다. 본 문서에서는 H.264가 재생되는 최소 사이즈로 VLC가 컴파일되도록 되도록 설정했다.

2. how to compile vlc 1.0.2

2.2. cygwin prepare

  • compile environment : cygwin
  • install all package catagorized in devel of cygwin
  • Set default file type to unix / bin

2.2.1. select following packages

  cvs (optional: for building extras/contrib)
  subversion (optional: for building extras/contrib)
  curl (optional: for building extras/contrib)
  wget (optional: for building extras/contrib)

  • Apply Trouble Shoot 3.7 (install p7zip util)

2.3. nsis install

It will require nsis to make self-extract install file.

http://nsis.sourceforge.net/Download (current lastest version 2.4.5)

2.4. extract library

$> tar xf contrib-20090922-win32-bin-gcc-4.2.1-sjlj-runtime-3.15.2-only.tar.bz2  -C /
$> tar xf contrib-1.0.0.tar.gz2 -C /

and remove moc, uic and rcc to let only uic.exe moc.exe and rcc.exe in /usr/win32/bin folder

2.5. extract source code

 $> tar jxvf vlc-1.0.2.tar.bz2
 $> cd vlc-1.0.2

2.6. configure

Execute following bootstrap and configure command.
 $> ./bootstrap <== this will make configure file using autotools.
 $> PATH=/usr/win32/bin:$PATH \
PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="ccache gcc -mno-cygwin" CXX="ccache g++ -mno-cygwin" \
./configure \
    --host=i686-pc-mingw32 \
    --disable-gtk \
    --disable-fluidsynth \
    --enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
    --enable-avcodec --enable-avformat --enable-swscale \
    --enable-faad --enable-flac --enable-theora \
    --with-wx-config-path=/usr/win32/bin \
    --with-freetype-config-path=/usr/win32/bin \
    --with-fribidi-config-path=/usr/win32/bin \
    --enable-live555 --with-live555-tree=/usr/win32/live.com \
    --enable-caca --with-caca-config-path=/usr/win32/bin \
    --with-xml2-config-path=/usr/win32/bin \
    --with-dvdnav-config-path=/usr/win32/bin \
    --disable-cddax --disable-vcdx --enable-goom \
    --disable-twolame --enable-dvdread \
    --enable-debug  --enable-dca \
    --disable-mkv --disable-taglib --disable-zvbi

2.7. compile

$> make -j 4

-j4 means 4 files compile parellal.

$> make package-win32-base

If you want to create auto installer, it require 7z util (refer TroubleShoot 3.7)

$> make package-win32

2.8. test

$> cd vlc-1.0.2
$> chmod 755 vlc.exe vlc.exe.manifest <- if you don't set execute permission, It will display permission error.
$> ./vlc.exe -I "dummy" "rtsp://"
$> or execute vlc.exe

3. Trouble Shoot

3.1. GCC select version 4

You should use GCC version 3.xx to compile vlc. gcc-mingw doe's not support gcc-4.x.x

3.2. C Compiler cannot create executables

i686-pc-mingw32-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for style of include used by make... GNU
checking for i686-pc-mingw32-gcc... gcc -mno-cygwin
checking for C compiler default output file name...
configure: error: in `/home/sosuri/vlc-1.0.2':
configure: error: C compiler cannot create executables

3.3. cygwin Dos or Unix mode change

  • if you know, current setting just type mount, the following mode is binmode
[sosuri@h ~]$ mount
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
  • if you change current mode, just execute setup.exe and change Default Text File Type to your prefered mode.

3.4. /home/sosuri/vlc-1.0.2/modules/codec/fluidsynth.c:120: undefined reference to `_ _imp__fluid_synth_sfunload'

add configure --disable-fluidsynth

3.5. compile speed up

CC="ccache gcc -mno-cygwin" CXX="ccache g++ -mno-cygwin" \

using ccache

3.6. can't use dialog base vlc

--disable-qt4, --disable-skins 옵션 설정하면 안됨.

3.7. 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on vlc-1.0.2-win32.7z vlc-1.0.2

if you do a command like this "make package-win32", this display"

install p7zip using cygwin setup

3.8. /usr/win32/bin/moc: /usr/win32/bin/moc: cannot execute binary file

and remove moc, uic and rcc to let only uic.exe moc.exe and rcc.exe

4. vlc optimize

--enable-lua lua playlist, metafetcher and interface plugins (default enabled) enabled disabled
--enable-httpd HTTP daemon (default enabled) enabled
--enable-libproxy libproxy support (default auto) auto
--enable-vlm VideoLAN manager (default enabled) enabled enabled
--enable-growl growl notification plugin (default disabled) disabled
--enable-notify libnotify notification plugin (default enabled) enabled
--disable-audioscrobbler Last.fm submission plugin (default enabled) enabled
--disable-taglib Taglib support (default enabled) enabled disabled
--enable-live555 live555 RTSP input plugin (default enabled) enabled
--enable-dc1394 dc1394 access module (default disabled) disabled
--enable-dv dv input module (default disabled) disabled
--enable-dvdread dvdread input module (default disabled) disabled
--enable-dvdnav dvdnav input module (default enabled) enabled
--enable-dshow Win32 DirectShow support (default enabled on Win32) enabled
--enable-bda Win32 DirectShow BDA support (default enabled on Win32) enabled
--enable-opencv OpenCV (computer vision) filter (default disabled) disabled
--enable-smb smb input module (default enabled) enabled disabled
--enable-dvbpsi dvbpsi ts mux and demux module (default enabled) enabled disabled
--enable-v4l Video4Linux input support (default disabled) disabled
--enable-v4l2 Video4Linux2 input support (default enabled) enabled disabled
--enable-libv4l2 Libv4l2 Video4Linux2 support (default enabled) enabled disabled
--enable-pvr PVR cards access module (default disabled) disabled
--enable-gnomevfs GnomeVFS access module (default disabled) disabled
--enable-libcdio CD input and control library support (default enabled) enabled disabled
--enable-libvcdinfo VCD information library support (default enabled) enabled
--enable-cddax audio CD plugin with CD Text and CD paranoia via libcdio (default disabled) disabled
--enable-libcddb CDDB support for libcdio audio CD (default enabled) enabled disabled
--enable-vcdx VCD with navigation via libvcdinfo (default disabled) disabled
--enable-cdda audio CD via built-in VCD (default enabled) enabled disabled
--enable-vcd built-in VCD (default enabled) enabled disabled
--enable-dvb DVB-S/T/C card support (default enabled) enabled disabled
--enable-screen Screen capture support (default enabled) enabled enabled
--enable-ogg Ogg demux support (default enabled) enabled disabled
--enable-mkv Matroska demux support (default enabled) enabled disabled
--enable-mod Mod demux support (default enabled) enabled disabled
--enable-mpc Mpc demux support (default enabled) enabled disabled
--enable-gme Game Music Emu demux support (default enabled) enabled disabled
--enable-wma-fixed libwma-fixed module (default disabled) disabled
--enable-shine shine mp3 encoding module (default disabled) disabled
--enable-mad libmad module (default enabled) enabled disabled
--disable-id3tag id3tag metadata reader plugin (default disabled) disabled
--enable-avcodec libavcodec codec (default enabled) enabled enabled
--enable-avformat libavformat containers (default enabled) enabled enabled
--enable-swscale libswscale image scaling and conversion (default enabled) enabled
--enable-postproc libpostproc image post-processing (default enabled) enabled enabled
--enable-faad faad codec (default disabled) disabled disabled
--enable-twolame twolame codec (default disabled) disabled disabled
--enable-quicktime QuickTime module (deprecated) deprecated
--enable-real Real media module (default disabled) disabled
--enable-realrtsp Real RTSP module (default disabled) disabled
--enable-libsysfs Get user key from firewire connected iPod via libsysfs (default enabled) enabled disabled
--enable-libtar libtar support for skins2 (default enabled) enabled enabled
--enable-a52 A/52 support with liba52 (default enabled) enabled disabled
--enable-dca DTS Coherent Acoustics support with libdca (default enabled) enabled disabled
--enable-flac libflac decoder/encoder support (default disabled) disabled disabled
--enable-libmpeg2 libmpeg2 decoder support (default enabled) enabled enabled
--enable-vorbis Vorbis decoder support (default enabled) enabled disabled
--enable-tremor Tremor decoder support (default disabled) disabled
--enable-speex Speex decoder support (default enabled) enabled disabled
--enable-tarkin experimental tarkin codec (default disabled) disabled
--enable-theora experimental theora codec (default disabled) disabled
--enable-dirac experimental dirac codec (default disabled) disabled
--disable-schroedinger high performance dirac codec (default enabled) enabled disable
--enable-png PNG support (default enabled) enabled enabled
--enable-x264 H264 encoding support with libx264 (default enabled) enabled enabled
--enable-fluidsynth MIDI synthesisr with libfluidsynth (default enabled) enabled disable
--enable-zvbi VBI (inc. Teletext) decoding support with libzvbi (default enabled) enabled disable
--enable-telx Teletext decoding module (conflicting with zvbi) (default enabled if zvbi is absent) disabled
--enable-csri Subtitle support using CSRI / asa (default disabled) disabled
--enable-libass Subtitle support using libass (default disabled) disabled
--enable-asademux asa subtitle demuxing (default disabled) disabled
--enable-cmml CMML support (default enabled) enabled disabled
--enable-kate kate codec (default enabled) enabled
--enable-tiger Tiger rendering library for Kate streams (default enabled) enabled disabled
--enable-x11 X11 support (default enabled) enabled disabled
--enable-xvideo XVideo support (default enabled) enabled disabled
--enable-glx X11 OpenGL (GLX) support (default enabled) enabled disabled
--enable-xvmc XVMC support (default disabled) disabled
--enable-xinerama Xinerama support (default enabled) enabled disabled
--enable-xcb X C Bindings work-in-progress (default disabled) disabled
--enable-opengl OpenGL support (default enabled) enabled disabled
--enable-sdl SDL support (default enabled) enabled disabled
--enable-sdl-image SDL image support (default enabled) enabled disabled
--enable-freetype freetype support (default enabled) enabled enabled
--enable-fribidi fribidi support (default enabled) enabled disabled
--enable-fontconfig, fontconfig support (default enabled) enabled disabled
--enable-libxml2 libxml2 support (default enabled) enabled disabled
--enable-svg SVG support (default disabled) disabled
--enable-snapshot snapshot module (default disabled) disabled
--enable-qte QT Embedded support (default disabled) disabled
--enable-hd1000v HD1000 Video Output module (default enabled on HD1000) disabled
--enable-directx Win32 DirectX support (default enabled on Win32) enabled enabled
--enable-fb Linux framebuffer support (default enabled on Linux) Linux
--enable-mga Linux kernel Matrox support (default disabled) disabled
--enable-omapfb OMAP framebuffer support (default disabled) disabled
--enable-svgalib SVGAlib support (default disabled) disabled
--enable-directfb DirectFB support (default disabled) disabled
--enable-ggi GGI support (default disabled) disabled
--enable-aa aalib output (default disabled) disabled
--enable-caca libcaca output (default disabled) disabled
--enable-wingdi Win32 GDI module (default enabled on Win32) enabled enabled
--enable-oss Linux OSS /dev/dsp support (enabled on Linux) disabled
--enable-pulse Pulseaudio support (default enabled) enabled
--enable-portaudio Portaudio library support (default disabled) disabled
--enable-alsa ALSA sound support for Linux (default enabled) enabled
--enable-waveout Win32 waveOut module (default enabled on Win32) enabled
--enable-macosx-audio Mac OS X audio module (default enabled on MacOS X) disabled
--enable-hd1000a HD1000 audio module (default enabled on HD1000) disabled
--enable-jack JACK audio I/O modules (default disabled) disabled
--enable-cyberlink CyberLink for C++ UPnP stack (default disabled) disabled
--enable-upnp Intel UPnP SDK (default enabled) enabled
--enable-skins2 Skins2 interface module (default enabled except on MacOSX, BeOS and WinCE) enabled
--enable-pda PDA interface needs Gtk2 support (default disabled) disabled
--enable-maemo Internet tablets based on Maemo SDK (default disabled) disabled
--enable-qt4 QT 4 support (default enabled) enabled enabled
--enable-wince Windows CE interface (default enabled with MinGW) disabled
--enable-opie Qt embedded interface support (default disabled) disabled
--enable-macosx MacOS X support (default enabled on MacOS X) disabled
--enable-qnx QNX RTOS support (default enabled on QNX RTOS) disabled
--disable-ncurses ncurses interface support (default enabled) enabled
--enable-xosd xosd interface support (default disabled) disabled
--enable-fbosd fbosd interface support (default disabled) disabled
--enable-visual visualisation plugin (default enabled) enabled
--enable-galaktos OpenGL visualisation plugin (default disabled) disabled
--enable-goom goom visualisation plugin (default disabled) disabled
--disable-atmo AtmoLight (homebrew philips ambilight) (default enabled ) enabled disable
--enable-bonjour Bonjour services discovery (default enabled) enabled disable
--enable-lirc lirc support (default disabled) disabled
--disable-libgcrypt libgcrypts support (default enabled) enabled disable
--enable-gnutls gnutls TLS/SSL support (default enabled) enabled enabled
--disable-remoteosd RemoteOSD plugin (default enabled) enabled disable
--enable-update-check update checking system (default disabled) disabled disabled
--enable-loader build DLL loader for ELF i386 platforms (default disabled) disabled
--enable-vlc build the VLC media player (default enabled) enabled
--enable-activex build a vlc-based ActiveX control (default enabled on Win32) Win32
--enable-mozilla build a vlc-based Firefox/Mozilla plugin (default disabled) disabled
--enable-testsuite build test modules (default disabled) disabled

Enabled modules:
a52tospdif access_smb adjust alphamask aout_directx aout_file audio_format audioscrobbler avcodec avformat bandlimited_resampler bda blend blendbench bluescreen canvas chain clone colorthres converter_float crop croppadd deinterlace direct3d dmo dolby_surround_decoder dshow dtstospdif dvdnav equalizer erase extract fake float32_mixer folder freetype gaussianblur gestures globalhotkeys glwin32 gnutls gradient grain headphone_channel_mixer hotkeys http i420_rgb_mmx i420_rgb_sse2 i420_ymga i420_ymga_mmx i420_yuy2 i420_yuy2_mmx i420_yuy2_sse2 i422_i420 i422_yuy2 i422_yuy2_mmx i422_yuy2_sse2 invert libmpeg2 linear_resampler live555 logo magnify marq memcpy3dn memcpymmx memcpymmxext mosaic motionblur motiondetect msn noise normvol ntservice osd_parser osdmenu panoramix param_eq png podcast postproc psychedelic puzzle qt4 rc ripple rotate rss rv32 sap scale scaletempo scene screen sharpen shout showintf simple_channel_mixer skins2 spatializer spdif_mixer swscale telnet telx transform unzip vmem vout_directx wall wave waveout wingdi x264 yuv yuvp yuy2_i420 yuy2_i422 zip

5. debugging

$> gdb --args vlc.exe --fast-mutex --reset-config --reset-plugins-cache

$> libtool --mode=execute gdb --args vlc --reset-config --reset-plugins-cache

In the debugger mode run the program and make sure you reset the preferences!

(gdb) run

To backtrace all the running threads use:

(gdb) thread apply all bt

Troglodytism does not necessarily imply a low cultural level.

sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2010-06-16 18:33:54
Processing time 0.0260 sec