Cross-Compile for Windows using Ubuntu 9.04

*nix specific usage questions
theanimal666
New Cone
New Cone
Posts: 9
Joined: 20 Jul 2009 15:00

Cross-Compile for Windows using Ubuntu 9.04

Postby theanimal666 » 07 Aug 2009 12:08

Hi,

I'm trieing to cross-compile vlc 1.0.1 for win32 using the latest self compiled mingw (i586-mingw32) stable version, runtime version 3.15) toolchain.
Which version of the contribs is the once needed to build version 1.0.1 - or do i need to compile them all from source?

I use contrib-20070530-win32-bin-gcc-3.4.5-only.tar.bz2 from you ftp server

some how ./configure cannot find qt4 - do i need to pass the path as extra argument?

Code: Select all

configure: WARNING: Qt 4 library not found configure: error: The skins2 module depends on a the Qt4 development package. Without it you won't be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.
when i use --disable-qt4 --disable skins2

Code: Select all

export PKG_CONFIG_LIBDIR=$CONTRIBS/lib/pkgconfig \ CPPFLAGS="-I$CONTRIBS/include -I$CONTRIBS/include/ebml" CXXCPP=i586-mingw32-cpp \ LDFLAGS=-L$CONTRIBS/lib \ CC=i586-mingw32-gcc CXX=i586-mingw32-g++ ./configure --host=i586-mingw32 --build=i386-linux \ --disable-gtk \ --enable-nls --enable-sdl --with-sdl-config-path=$CONTRIBS/bin \ --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \ --with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora \ --with-wx-config-path=$CONTRIBS/bin \ --with-freetype-config-path=$CONTRIBS/bin \ --with-fribidi-config-path=$CONTRIBS/bin \ --with-libgcrypt-prefix=$CONTRIBS \ --enable-live555 --with-live555-tree=$CONTRIBS/live.com \ --enable-caca --with-caca-config-path=$CONTRIBS/bin \ --with-xml2-config-path=$CONTRIBS/bin \ --with-dvdnav-config-path=$CONTRIBS/bin \ --disable-cddax --disable-vcdx --enable-goom \ --enable-twolame --enable-dvdread \ --enable-debug --disable-swscale --disable-qt4 --disable-skins2
i get following compile error:

Code: Select all

In file included from /home/developer/devel/vlc-contrib/usr/win32/include/ffmpeg/avformat.h:32, from mux.c:40: /home/developer/devel/vlc-contrib/usr/win32/include/ffmpeg/avcodec.h:2501: warning: `ImgReSampleContext' is deprecated (declared at /home/developer/devel/vlc-contrib/usr/win32/include/ffmpeg/avcodec.h:2480) /home/developer/devel/vlc-contrib/usr/win32/include/ffmpeg/avcodec.h:2507: warning: `ImgReSampleContext' is deprecated (declared at /home/developer/devel/vlc-contrib/usr/win32/include/ffmpeg/avcodec.h:2480) In file included from mux.c:40: /home/developer/devel/vlc-contrib/usr/win32/include/ffmpeg/avformat.h:291: warning: `AVFrac' is deprecated (declared at /home/developer/devel/vlc-contrib/usr/win32/include/ffmpeg/avformat.h:117) mv -f .deps/libavformat_plugin_la-mux.Tpo .deps/libavformat_plugin_la-mux.Plo /bin/bash ../../../libtool --tag=CC --mode=link i586-mingw32-gcc -std=gnu99 `top_srcdir="../../.." top_builddir="../../.." ../../../vlc-config --cflags plugin libavformat_plugin.la` -mms-bitfields -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -rpath '/usr/local/lib/vlc/demux' -avoid-version -module -export-symbol-regex ^vlc_entry -shrext .dll -no-undefined `top_srcdir="../../.." top_builddir="../../.." ../../../vlc-config --ldflags plugin libavformat_plugin.la` -L/home/developer/devel/vlc-contrib/usr/win32/lib -o libavformat_plugin.la libavformat_plugin_la-avformat.lo libavformat_plugin_la-demux.lo libavformat_plugin_la-fourcc.lo libavformat_plugin_la-chroma.lo libavformat_plugin_la-mux.lo `top_srcdir="../../.." top_builddir="../../.." ../../../vlc-config -libs plugin libavformat_plugin.la` ../../../src/libvlccore.la ../../../compat/libcompat.la -lmingw32 libtool: link: i586-mingw32-gcc -std=gnu99 -shared .libs/libavformat_plugin_la-avformat.o .libs/libavformat_plugin_la-demux.o .libs/libavformat_plugin_la-fourcc.o .libs/libavformat_plugin_la-chroma.o .libs/libavformat_plugin_la-mux.o -Wl,--whole-archive ../../../compat/.libs/libcompat.a -Wl,--no-whole-archive -L/home/developer/devel/vlc-contrib/usr/win32/lib -lavformat -lavcodec -lz /home/developer/devel/vlc-contrib/usr/win32/lib/liba52.a -lm /home/developer/devel/vlc-contrib/usr/win32/lib/libmp3lame.a -lwsock32 /home/developer/devel/vlc-contrib/usr/win32/lib/libfaac.a -lavutil ../../../src/.libs/libvlccore.dll.a -lkernel32 -lws2_32 -lnetapi32 -lwinmm /home/developer/devel/vlc-contrib/usr/win32/lib/libiconv.a -lmingw32 -mtune=pentium2 -mms-bitfields -o .libs/libavformat_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libavformat_plugin.dll.a /home/developer/devel/vlc-contrib/usr/win32/lib/libavformat.a(os_support.o):os_support.c:(.text+0x60): multiple definition of `_localtime_r' ../../../compat/.libs/libcompat.a(localtime_r.o):localtime_r.c:(.text+0x0): first defined here Creating library file: .libs/libavformat_plugin.dll.a collect2: ld returned 1 exit status make[6]: *** [libavformat_plugin.la] Error 1 make[6]: Leaving directory `/home/developer/devel/vlc-1.0.1/modules/demux/avformat' make[5]: *** [all] Error 2 make[5]: Leaving directory `/home/developer/devel/vlc-1.0.1/modules/demux/avformat' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/developer/devel/vlc-1.0.1/modules/demux' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/developer/devel/vlc-1.0.1/modules/demux' make[2]: *** [all-recursive] Error 1

Here my system specs:
Linux developer-desktop 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009 i686 GNU/Linux
Ubuntu 9.04 (stable packages only)

i586-mingw32-gcc --version
i586-mingw32-gcc (GCC) 3.4.5 (mingw-vista special r2)

Environment variables:
CONTRIBS: /home/developer/devel/vlc-contrib/usr/win32
PKG_CONFIG_LIBDIR:/home/developer/devel/vlc-contrib/usr/win32/lib/pkgconfig
MINGW_TARGET: i586-mingw32
MINGW_PATH: /home/developer/devel/mingw32
CPPFLAGS: -I/home/developer/devel/vlc-contrib/usr/win32/include -I/home/developer/devel/vlc-contrib/usr/win32/include/ebml
CXXCPP: i586-mingw32-cpp
LDFLAGS: -L/home/developer/devel/vlc-contrib/usr/win32/lib
CC: i586-mingw32-gcc
CXX: i586-mingw32-g++

Thanks in advance for any help and the great piece of software you've built for us!

Chris

btw: building for linux works without any problems - what am i doing wrong?
This is my third day trying to build it ;)

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Cross-Compile for Windows using Ubuntu 9.04

Postby xtophe » 18 Aug 2009 18:15

I use contrib-20070530-win32-bin-gcc-3.4.5-only.tar.bz2 from you ftp server
That's 2 year old !!

contribs are now on http://people.videolan.org/~jb
Xtophe

sujitp81
New Cone
New Cone
Posts: 1
Joined: 18 Aug 2009 22:37

Re: Cross-Compile for Windows using Ubuntu 9.04

Postby sujitp81 » 18 Aug 2009 22:48

Hi,
I'm trying to cross-compile for Windows using Ubuntu 9.04
I followed the instructions from http://wiki.videolan.org/Win32Compile
It says "FFmpeg now requires mingw32-runtime >= 3.15 and w32api >= 3.13 so these will have to be updated manually."

I'm new to linux and I'm not exactly sure how to do it.
Is it possible to just get the precompiled versions for both of them?
Else, can anyone tell me how to build it from source?
Regards,
Sujit

allen.li
New Cone
New Cone
Posts: 6
Joined: 18 May 2011 13:54

Re: Cross-Compile for Windows using Ubuntu 9.04

Postby allen.li » 18 May 2011 17:31

This is a problem but it can answer your question.

viewtopic.php?f=14&t=90557


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 56 guests