Error when compiling vlc0.9.0 with automated way of building

*nix specific usage questions
Callisto
Blank Cone
Blank Cone
Posts: 15
Joined: 05 Sep 2006 16:08

Error when compiling vlc0.9.0 with automated way of building

Postby Callisto » 14 Nov 2006 14:02

Hello,

I'd like to compile vlc with enabled-java-bindings from source for a win32 platform. Therefore I use the mingw32 cross compiler under a Debian 3.1 distribution. I downloaded the latest vlc-trunk using svn.
Then I changed to "extras/contrib" dir and executed

Code: Select all

./bootstrap i586-mingw32msvc
Then I executed

Code: Select all

make src
After a while I got the following error
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I/home/ben/Downloads/VLC/vlc-trunk/extras/ contrib/include -I/include -I/home/ben/Downloads/VLC/vlc-trunk/extras/contrib/include -I/include -D_REEN TRANT -D_THREAD_SAFE -pipe -I/home/ben/Downloads/VLC/vlc-trunk/extras/contrib/include -I/home/ben/Downlo ads/VLC/vlc-trunk/extras/contrib/include -c gai_strerror.c -o gai_strerror.o
gai_strerror.c:70: error: conflicting types for 'gai_strerrorA'
/usr/lib/gcc/i586-mingw32msvc/3.4.2/../../../../i586-mingw32msvc/include/ws2tcpip.h:301: error: previous declaration of 'gai_strerrorA' was here
gai_strerror.c:70: error: conflicting types for 'gai_strerrorA'
/usr/lib/gcc/i586-mingw32msvc/3.4.2/../../../../i586-mingw32msvc/include/ws2tcpip.h:301: error: previous declaration of 'gai_strerrorA' was here
make[3]: *** [gai_strerror.lo] Fehler 1
make[3]: Leaving directory `/home/ben/Downloads/VLC/vlc-trunk/extras/contrib/src/gnutls/gl'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/ben/Downloads/VLC/vlc-trunk/extras/contrib/src/gnutls/gl'
make[1]: *** [.gnutls] Fehler 2
make[1]: Leaving directory `/home/ben/Downloads/VLC/vlc-trunk/extras/contrib/src'
make: *** [src] Fehler 2
t3010:/home/ben/Downloads/VLC/vlc-trunk/extras/contrib#
Does anybody know this error or can tell me how to solve it?

thanks in advance,
Benjamin

Rémi Denis-Courmont
Developer
Developer
Posts: 15183
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Postby Rémi Denis-Courmont » 14 Nov 2006 21:40

You should probably forward the problem to the gnutls developpers. Looks like their gai_strerror configure check breaks on Win32.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 15 Nov 2006 12:19

you can remove the .gnutls from the windows part of the makefile under the src directory.

That is, from remove .gnutls from the lines which read:
ifdef HAVE_WIN32

all: .iconv .intl .freetype .fribidi .zlib \
.a52 .mpeg2 .id3tag .mad .ogg .vorbis .shout .vorbisenc .theora \
.FLAC .speex .faad .faac .lame .ebml .matroska .ffmpeg .dvdcss \
.live .goom2k4 .caca .mod .x264 .xml .twolame \
.png .gpg-error .gcrypt .gnutls .mpcdec \
.dvdnav .dvbpsi .wxwidgets .qt4 .dirac \
.dx_headers .dshow_headers .aclocal .gecko-win32 .unicows .libdca \
.SDL_image
# .SDL_image .daap .cddb .cdio .vcdimager .portaudio
else


You can do the same for other libraries as well.

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 15 Nov 2006 12:24

Of course I mean the src under extras/contrib.

Callisto
Blank Cone
Blank Cone
Posts: 15
Joined: 05 Sep 2006 16:08

Postby Callisto » 15 Nov 2006 13:12

Ok, thanks.
I will try and let you know.

Another question:

I also tried to compile vlc from source using the mingw32 and the precompiled win32 libraries from the videolan site. I also installed the gettext and libiconv libraries with the default prefixes=/usr/local.
But when I compile he still searches for the libiconv. He cannot find it although it was installed correctly. I am running Debian 3.1r3.

Does anybody know this error or can help?

Thanks,
Benjamin

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 15 Nov 2006 18:21

Are you cross-compiling libiconv or just compiling? When you cross-compile VLC, you need to make sure that the libraries are also cross-compiled. To this end, to cross-compile libiconv, you need:

CPPFLAGS="-Dssize_t=long" \
./configure --host=i586-mingw32msvc --target=i586-mingw32msvc \
--build=i486-linux --disable-shared --prefix=/usr/win32

Info about manually cross-compiling other libs is given here:http://www.via.ecp.fr/via/ml/vlc-devel/ ... 00421.html, though I am not sure which ones work at the moment.

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 15 Nov 2006 18:24

Also, be aware that some libraries like gettext need to be compiled and installed after libiconv.

Callisto
Blank Cone
Blank Cone
Posts: 15
Joined: 05 Sep 2006 16:08

Postby Callisto » 16 Nov 2006 14:46

Thanks a lot for these hints and the link ustunozgur. I think I could need it in the next time because I have often several errors when cross compiling the vlc. Regarding manually cross compiling the libs - which ./configure do I have to take? The one from the vlc-trunk directory or a different one? Would be nice if you could tell me. I've tried compiling the wxwidgets lib manually from the vlc-trunk directory but got an error.
I stopped compiling VLC with the automated way of building the additional libs because I got the error concerning gnutls mentioned above. So I installed the latest precompiled libs from the testing/win32 directory and use them along with the following configure script.

Regarding the libiconv I am currently doing it that way:
I manipulated the Makefile in the extras/contrib/src directory so that only the libiconv is being built. In the Makefile I commented out the other libs in the HAVE_WIN32 part. Afterwards I started

Code: Select all

./bootstrap i586-mingw32msvc
and started

Code: Select all

make src
Afterwards I added the following lines in my configure script for vlc

Code: Select all

--with-libiconv-prefix=extras/contrib
and

Code: Select all

--without-contrib
and started the script. Here is the script which I use:

Code: Select all

PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \ CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \ LDFLAGS=-L/usr/win32/lib \ CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ \ JAVA=/usr/java/jdk1.5.0_09/bin/java \ JAVAC=/usr/java/jdk1.5.0_09/bin/javac \ ./configure \ --host=i586-mingw32msvc \ --build=i386-linux \ --disable-gtk \ --enable-nls \ --enable-sdl \ --with-sdl-config-path=/usr/win32/bin \ --enable-ffmpeg \ --with-ffmpeg-mp3lame \ --with-ffmpeg-faac \ --with-ffmpeg-zlib \ --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 \ --enable-twolame \ --enable-dvdread \ --enable-debug \ --with-libiconv-prefix=extras/contrib \ --without-contrib \ --enable-libtool \ --enable-java-bindings
The last two modules are because I need to cross compile the java-bindings for win32. Therefore I need libtool, too.
But I've just got another error in building the VLC. There was something wrong with wxwidgets lib. So I compiled it from source again like I did with the libiconv. I hope there will be no more errors in compiling the VLC but I'm afraid there will.

Does anybody has a working configuration in cross compiling the VLC on a debian 3.1 machine? Because I'm trying to figure out how to cross compile the VLC for a whole week already.

bye,
Benjamin

Callisto
Blank Cone
Blank Cone
Posts: 15
Joined: 05 Sep 2006 16:08

Postby Callisto » 16 Nov 2006 14:48

Here is the error which I got when using the precompiled libs from the testing/win32 directory:
/usr/win32/lib/libwx_baseu-2.6-i586-mingw32msvc.a(baselib_wxchar.o):wxchar.cpp:(.text+0x3b): undefined reference to `_mbsrtowcs'
/usr/win32/lib/libwx_baseu-2.6-i586-mingw32msvc.a(baselib_wxchar.o):wxchar.cpp:(.text+0x4e): undefined reference to `_mbsrtowcs'
/usr/win32/lib/libwx_baseu-2.6-i586-mingw32msvc.a(baselib_wxchar.o):wxchar.cpp:(.text+0x9b): undefined reference to `_wcsrtombs'
/usr/win32/lib/libwx_baseu-2.6-i586-mingw32msvc.a(baselib_wxchar.o):wxchar.cpp:(.text+0xae): undefined reference to `_wcsrtombs'
collect2: ld returned 1 exit status
make[6]: *** [libwxwidgets_plugin.dll] Fehler 1
make[6]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk/modules/gui/wxwidgets'
make[5]: *** [all-modules] Fehler 1
make[5]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk/modules/gui/wxwidgets'
make[4]: *** [all-recursive] Fehler 1
make[4]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk/modules/gui'
make[3]: *** [all] Fehler 2
make[3]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk/modules/gui'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk/modules'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk'
make: *** [all] Fehler 2
bendeb31@t3010:~/Downloads/VLC/vlc-trunk$
I compiled the wxwidgets lib now from source and will let you know if the error remains.

Ben

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 16 Nov 2006 18:02

In fact, I have Debian too (but Etch, Debian 4 not Sarge), and I cross-compiled a few days ago. I am currently trying to cross-compile with your configure script and will let you know if that works on mine.

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 16 Nov 2006 22:54

All right, I managed to cross-compile 0.9.0 from svn using the following:

Code: Select all

#! /bin/bash PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \ CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \ LDFLAGS=-L/usr/win32/lib \ CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ \ ./configure \ --host=i586-mingw32msvc \ --build=i486-linux \ --disable-gtk \ --enable-nls \ --enable-sdl \ --with-sdl-config-path=/usr/win32/bin \ --disable-ffmpeg \ --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 \ --enable-twolame \ --enable-dvdread \ --enable-debug \ --enable-libtool
As you can see, I disabled ffmpeg at the moment (there was a problem with that), and have not yet tested java bindings as I have no java yet.
Then, cross-compiling worked as expected until activex. Then, I modified the makefile to bypass activex and compilation finished successfully.

Which version of gcc do you have on the system?(gcc --ver) And mingw? (i586-mingw32msvc-cc --ver) Maybe you should consider upgrading to etch.

Also, note that I changed i386-linux with i486-linux, and used libiconv in win32, but I don't know if that changed anything.

Callisto
Blank Cone
Blank Cone
Posts: 15
Joined: 05 Sep 2006 16:08

Postby Callisto » 17 Nov 2006 09:05

Ok, yesterday I've tried to compile VLC again using the following configure script:

Code: Select all

PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \ CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \ LDFLAGS=-L/usr/win32/lib \ CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ \ JAVA=/usr/java/jdk1.5.0_09/bin/java \ JAVAC=/usr/java/jdk1.5.0_09/bin/javac \ ./configure \ --host=i586-mingw32msvc \ --build=i386-linux \ --disable-gtk \ --enable-nls \ --enable-sdl \ --with-sdl-config-path=/usr/win32/bin \ --enable-ffmpeg \ --with-ffmpeg-mp3lame \ --with-ffmpeg-faac \ --with-ffmpeg-zlib \ --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 \ --enable-twolame \ --enable-dvdread \ --enable-debug \ --with-libiconv-prefix=extras/contrib \ --with-libintl-prefix=extras/contrib \ --with-wx-config-path=extras/contrib/src/wxwidgets \ --without-contrib \ --enable-libtool \ --enable-java-bindings
But although I used the newly compiled libiconv, libintl and wx-config libs I still got the following error:
usr/win32/lib/libiconv.a(iconv.o):iconv.c:(.text+0x14aa2): undefined reference to `_wcrtomb'
/usr/win32/lib/libiconv.a(iconv.o):iconv.c:(.text+0x14cec): undefined reference to `_mbrtowc'
collect2: ld returned 1 exit status
make[2]: *** [vlc.exe] Fehler 1
make[2]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/bendeb31/Downloads/VLC/vlc-trunk'
make: *** [all] Fehler 2
bendeb31@t3010:~/Downloads/VLC/vlc-trunk$
So I think that the libiconv and maybe also other libs were compiled correctly in order to use them for cross compiling.
Regarding the different modules I need to enable the java bindings because I'd like to use the new JVLC version on win32. FFMPEG I also don't like to disable because it is needed for playing a lot of different codecs. But I think I could also disable ActiveX if there are problems with that.
I cross compiled on debian sarge with mingw32msvc-cc version 3.4.2 and gcc version 3.3.5. I used a different prefix for libiconv, libintl and wx-widgets because they were not found in the /usr/local directory. So I added the prefix.

Now there are two possibilities which I'd like to try today. The first one is to cross compile all the libs manually like it is described in the link you told me (sorry, for that stupid question regarding which configure script I have to use - of course always the one in the corresponding folder of the extracted lib package! :-) ). After manually cross compiling I will try to compile VLC again.
The second possibility I'd like to try today is to install Debian Etch and to compile it on that distribution using your configure script. Did you use the precompiled win32 libs from the videolan directory (pub/testing/win32) ? Or which libs do you use?

I will let you know as soon as I make any progress ;-).

regards,
Benjamin

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 17 Nov 2006 09:38

I guess it's that you have cross compiled on debian sarge with mingw32msvc-cc version 3.4.2, because as you can see from the file name of precompiled contribs, it is 3.4.5 only. (Actually, I am not sure about that, I first thought it was for gcc version, then seeing that my mingw was 3.4.5 I concluded that it was the version for mingw.) Can anyone make a clarification on this one? I found the answer, see: viewtopic.php?t=28652

So, even if you don't have the time to upgrade to etch, upgrade your mingw. Also, my gcc was 4.1.

About which libs I have used, I used the precompiled ones and the last vlc trunk.

Actually, I don't suggest manually cross-compiling them all; it might be tiresome.

So, I suggest you to do the following:

1. Remove /usr/win32.
2. Upgrade mingw.
3. Upgrade gcc.
4. Get the latest vlc from svn.
5. Reinstall precompiled libs to /usr/win32.
6. Compile using the script I have given.
Last edited by ustunozgur on 17 Nov 2006 19:14, edited 2 times in total.

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 17 Nov 2006 10:11

Btw, is there any chance that you are using this: contrib-20061014-win32-bin-gcc-3.4.5-only.tar.bz2 . If so, don't, because it is reported as buggy. See ftp://ftp.videolan.org/pub/videolan/tes ... /Changelog

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 17 Nov 2006 19:26

You don't need to upgrade gcc, just upgrade mingw so that its gcc is 3.4.5.

Callisto
Blank Cone
Blank Cone
Posts: 15
Joined: 05 Sep 2006 16:08

Postby Callisto » 17 Nov 2006 20:23

Ok, I installed Debian Etch RC1 and mingw32 ver. 3.4.5. I also extracted the additional win32 libs "contrib-20061112-win32-bin-gcc-3.4.5-only.tar.bz2" in /usr/win32 and downloaded the latest svn trunk today.
I think you are right that the mingw32 version is responsible for all the linking errors that I got. Tomorrow I will try to compile VLC with your configure script and without the java-bindings. If it works I will also try with enabled java bindings and maybe also some other configurations.
As soon as I get a result I will let you know.

greetz,
Benjamin

harisson
Blank Cone
Blank Cone
Posts: 23
Joined: 17 Jan 2006 13:07

Postby harisson » 17 Nov 2006 22:14

I succesfully compiled the vlc 0.8.6 branches version with the java bindings under cygwin on win2k (with some tweaks).

Do you think the java binding part could be cross-compiled with mingw32 under Debian ?

Callisto
Blank Cone
Blank Cone
Posts: 15
Joined: 05 Sep 2006 16:08

Postby Callisto » 20 Nov 2006 12:47

I posted the latest results in cross-compiling VLC for win32 on Debian Etch under the following link: viewtopic.php?p=89011#89011

greetz,
Benjamin

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 20 Nov 2006 17:28

I am glad that you succeeded, congratulations. Btw, I tried java bindings, but couldn't either.

harisson
Blank Cone
Blank Cone
Posts: 23
Joined: 17 Jan 2006 13:07

Postby harisson » 29 Nov 2006 13:27

my question is how do you cross-compile the jawt part of jvlc ?


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

Who is online

Users browsing this forum: No registered users and 5 guests