Page 1 of 1

Cross-compiling for windows under linux Debian

Posted: 10 Mar 2009 19:26
by Barrett
Hello, i'm trying to cross-compile vlc for windows under Debian (lenny) because i need the amr support.
I hope that this is the correct section : )

I readed this howto : http://wiki.videolan.org/Win32Compile

I installed mingw32 with the command "apt-get install mingw32 mingw32-binutils" and downloaded the source code, i readed the file "extra/contrib/README" and i modified the config.mak and distro.mak for AMR support.

Then i used the command "CONTRIBS_RELEASE=sexy ./bootstrap i586-pc-win32" to configure the libraries.

When i type in the extra/contrib directory "make src" or "make bin" he says :

/vlc-0.9.8a/vlc-0.9.8a/extras/contrib$ make bin
make: *** No rule to make target `bin'. Stop.

At this point i tried to type "make" and the terminal say:

/vlc-0.9.8a/vlc-0.9.8a/extras/contrib$ make
make -C src
make[1]: Entering directory `/home/barrett/Desktop/vlc-amr/vlc-0.9.8a/vlc-0.9.8a/extras/contrib/src'
(cd libiconv; CC="i586-pc-win32-gcc" CXX="i586-pc-win32-g++" LD="i586-pc-win32-ld" RANLIB="i586-pc-win32-ranlib" AR="i586-pc-win32-ar" STRIP="i586-pc-win32-strip" ./configure --target=i586-pc-win32 --host=i586-pc-win32 --build=i486-linux-gnu --program-prefix="" --prefix=/home/barrett/Desktop/vlc-amr/vlc-0.9.8a/vlc-0.9.8a/extras/contrib --disable-nls && make && make install)
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i586-pc-win32-strip... i586-pc-win32-strip
checking whether make sets $(MAKE)... (cached) yes
checking for i586-pc-win32-gcc... i586-pc-win32-gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [.iconv] Error 77
make[1]: Leaving directory `/home/barrett/Desktop/vlc-amr/vlc-0.9.8a/vlc-0.9.8a/extras/contrib/src'
make: *** [all] Error 2

i pasted the config.log file : http://rafb.net/p/GT9Lpy54.html

Sorry for my bad english.
Thanks in advance for the help.

Re: Cross-compiling for windows under linux Debian

Posted: 10 Mar 2009 23:37
by Barrett
i modified the config.mak and all seems to be good :
# Automatically generated by bootstrap.
# Make changes if you know what you're doing.
HAVE_WIN32 = 1
PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig
BUILD = i486-linux-gnu
HOST = i586-mingw32msvc
PREFIX = /home/barrett/Desktop/vlc-amr/vlc-0.9.8a/vlc-0.9.8a/extras/contrib
CC = i586-mingw32msvc-gcc
CXX = i586-mingw32msvc-g++
LD = i586-mingw32msvc-ld
RANLIB = i586-mingw32msvc-ranlib
AR = i586-mingw32msvc-ar
STRIP = i586-mingw32msvc-strip
EXTRA_CFLAGS = -O3
EXTRA_CPPFLAGS = -isystem $(PREFIX)/include
EXTRA_LDFLAGS =
EXTRA_PATH =
WGET = /usr/bin/wget -c --passive
SVN = /usr/bin/svn
GIT = /usr/bin/git
EXTRA_CFLAGS += -DNDEBUG
HAVE_AMR=1

but when i run make, i get an autoconf error :

100%[======================================>] 681.447 49,8K/s in 11s

2009-03-10 01:56:54 (58,1 KB/s) - "fribidi-0.19.1.tar.gz" salvato [681447/681447]

rm -rf fribidi || true
gunzip -c fribidi-0.19.1.tar.gz | tar xf - --exclude='[*?:<>\|]'
mv fribidi-0.19.1 fribidi || true
touch fribidi
patch -p0 < Patches/fribidi.patch
patching file fribidi/Makefile.am
patching file fribidi/configure.ac
patching file fribidi/fribidi.pc.in
patching file fribidi/lib/fribidi-common.h
(cd fribidi; rm -f configure; ./bootstrap && CC="i586-mingw32msvc-gcc" CXX="i586-mingw32msvc-g++" LD="i586-mingw32msvc-ld" RANLIB="i586-mingw32msvc-ranlib" AR="i586-mingw32msvc-ar" STRIP="i586-mingw32msvc-strip" ./configure --target=i586-mingw32msvc --host=i586-mingw32msvc --build=i486-linux-gnu --program-prefix="" --without-pic --disable-shared --enable-msw --with-included-opencdk --with-included-libtasn1 --disable-dependency-tracking --prefix=/home/barrett/Desktop/vlc-amr/vlc-0.9.8a/vlc-0.9.8a/extras/contrib && make && make install)
Usable autoreconf found, running
configure.ac:78: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:79: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1
make[1]: *** [.fribidi] Error 1
make[1]: Leaving directory `/home/barrett/Desktop/vlc-amr/vlc-0.9.8a/vlc-0.9.8a/extras/contrib/src'
make: *** [all] Error 2

any idea?

Re: Cross-compiling for windows under linux Debian

Posted: 12 Mar 2009 19:23
by CoreDuo
apt-get install libtool
cd src
rm -Rf fribidi
tar -zxf fribidi-0.19.1.tar.gz
mv fribidi-0.19.1 fribidi
cd ../
make

Re: Cross-compiling for windows under linux Debian

Posted: 12 Mar 2009 20:12
by Barrett
unfortunately now i get another trouble :
checking whether the i586-mingw32msvc-g++ linker (i586-mingw32msvc-ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
(cached) (cached) checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for unzip... /usr/bin/unzip
checking for patch... /usr/bin/patch
checking for /bin/bash... configure: error: cannot check for file existence when cross compiling
make[1]: *** [.libamrwb] Error 1
make[1]: Leaving directory `/home/barrett/Desktop/vlc-amr/vlc-0.9.8a-3/vlc-0.9.8a/extras/contrib/src'
make: *** [all] Error 2

thanks for the help

Re: Cross-compiling for windows under linux Debian

Posted: 13 Mar 2009 00:37
by Jean-Baptiste Kempf
If you don't use the contribs, you are going to have lots of issues, as I already said it...