Page 1 of 1

Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 11 Aug 2008 02:26
by hce
Hi,

I set up win32 cygwin building environment on Vista according to http://wiki.videolan.org/Win32CompileCygwinNew for vlc-0.9.0-test3. I installed cygwin, contrib-20070412-win32-bin-gcc-3.4.5-only.tar.bz2 and vlc-0.9.0-test3 source code. I added following to my .bash_profile:

PATH=/usr/win32/bin:$PATH
PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml"
LDFLAGS=-L/usr/win32/lib

I've checked all *.pc files from the contrib-20070412-win32-bin-gcc-3.4.5-only.tar.bz2 are indeed in /usr/win32/lib/pkgconfig directory. But I've got package could not find errors after running configure:

:
configure: error: Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.

Please advise what I was missing?

Thank you.

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 11 Aug 2008 17:56
by VLC_help

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 12 Aug 2008 05:56
by hce
Thanks. I installed contrib-20080811-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2. The configure has been done, but during the make process, I've got following errors. Not sure it ls the library problem or my machine problem or vlc build problem?

:
Creating library file: .libs/libflac_plugin.dll.a
creating libflac_plugin.la
(cd .libs && rm -f libflac_plugin.la && ln -s ../libflac_plugin.la libflac_plugi
n.la)
/bin/sh ../../libtool --tag=CC --mode=compile gcc -mno-cygwin -std=gnu99 -DHAV
E_CONFIG_H -I. -I../.. -I../../include -I../../include -I/usr/win32/include -I
/usr/win32/include/ebml -DSYS_MINGW32 `top_builddir="../.." ../../vlc-config --c
flags plugin libkate_plugin_la-kate.lo` -mms-bitfields -Wall -Wextra -Wsign-comp
are -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wm
issing-prototypes -MT libkate_plugin_la-kate.lo -MD -MP -MF .deps/libkate_plugin
_la-kate.Tpo -c -o libkate_plugin_la-kate.lo `test -f 'kate.c' || echo './'`kate
.c
gcc -mno-cygwin -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../
include -I/usr/win32/include -I/usr/win32/include/ebml -DSYS_MINGW32 -I/home/yud
e/work/project/MediaPlayer/0.9/Install/include -D_FILE_OFFSET_BITS=64 -D__USE_UN
IX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG -D__LIBVLC__ -D__
PLUGIN__ -DMODULE_NAME=kate -DMODULE_NAME_IS_kate -DMODULE_STRING=\"kate\" -g -O
0 -I/usr/win32/include -mms-bitfields -Wall -Wextra -Wsign-compare -Wundef -Wpoi
nter-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes
-MT libkate_plugin_la-kate.lo -MD -MP -MF .deps/libkate_plugin_la-kate.Tpo -c k
ate.c -DDLL_EXPORT -DPIC -o .libs/libkate_plugin_la-kate.o
kate.c:477: error: conflicting types for 'CreateBitmap'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wingdi.h:2716: err
or: previous declaration of 'CreateBitmap' was here
kate.c:477: error: conflicting types for 'CreateBitmap'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wingdi.h:2716: err
or: previous declaration of 'CreateBitmap' was here
kate.c:489: error: conflicting types for 'CreatePalette'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wingdi.h:2744: err
or: previous declaration of 'CreatePalette' was here
kate.c:489: error: conflicting types for 'CreatePalette'
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/wingdi.h:2744: err
or: previous declaration of 'CreatePalette' was here
make[5]: *** [libkate_plugin_la-kate.lo] Error 1
make[5]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc-0.9.0/mo
dules/codec'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc-0.9.0/mo
dules/codec'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc-0.9.0/mo
dules/codec'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc-0.9.0/mo
dules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc-0.9.0'
make: *** [all] Error 2

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 12 Aug 2008 10:27
by ssbssa
this was fixed yesterday by j-b. update your vlc sources.

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 14 Aug 2008 13:32
by hce
this was fixed yesterday by j-b. update your vlc sources.
I took the git source code, but again got following new errors:

ARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -DDEBUG -D__LIBVLC__ -I../src/misc -g -O0 -Werror -DMODULE_STRING=\"main\" -DLOCALEDIR=\"/home/project/work/project/M
ediaPlayer/0.9/Install/share/locale\" -DSYSCONFDIR=\"/home/project/work/project/Med
iaPlayer/0.9/Install/etc\" -DDATA_PATH=\"/home/project/work/project/MediaPlayer/0.9
/Install/share/vlc\" -DLIBDIR=\"/home/project/work/project/MediaPlayer/0.9/Install/
lib\" -DPLUGIN_PATH=\"/home/project/work/project/MediaPlayer/0.9/Install/lib/vlc\"
-mms-bitfields -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -MT input/libvlccore_la-control.lo -MD -MP -MF input/.deps/libvlccore_la-control.Tpo -c input/control.c -DDLL_EXPORT -DPIC -o input/.libs/libvlccore_la-control.o
input/control.c: In function `UpdateBookmarksOption':
input/control.c:630: warning: int format, different type arg (arg 4)
input/control.c:630: warning: int format, different type arg (arg 5)
make[3]: *** [input/libvlccore_la-control.lo] Error 1
make[3]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc.error/sr
c'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc.error/sr
c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/project/work/project/MediaPlayer/0.9/vlc.error'
make: *** [all] Error 2

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 14 Aug 2008 14:30
by ssbssa
you're really unlucky. this problem (-Werror) was introduced 37 hours ago, and subsequently removed 15 hourse ago.
-> update again

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 15 Aug 2008 01:11
by hce
you're really unlucky. this problem (-Werror) was introduced 37 hours ago, and subsequently removed 15 hourse ago.
-> update again
What is the git update command similar to svn update?

Thank you.

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 15 Aug 2008 17:22
by VLC_help
http://git.or.cz/course/svn.html Git - SVN Crash Course
git pull is equal to svn update

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 18 Aug 2008 09:30
by hce
http://git.or.cz/course/svn.html Git - SVN Crash Course
git pull is equal to svn update
Thanks. I updated to 17/8/08 git source code and built the vlc with contrib-20080528-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2.

There were two errors during the compilation:

1. Live555 version outdate. I fixed it by installing a recent version of the live555.

2. "moc: cannot execute binary file", I fixed it by deleting the moc and using moc.exe from the /usr/win32/bin.

I finally built the vlc, but when I run ./vlc --list, nothing was displayed and running ./vlc -vvv test.mp3, nothing comming. Please advice what could be wrong here?

Thank you.

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 18 Aug 2008 15:34
by VLC_help
You also did make package-win32-base after make and ran the VLC from the vlc-0.9.0 directory?

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 18 Aug 2008 20:43
by Jean-Baptiste Kempf
1) take a newer contrib
2) read the docs...

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 19 Aug 2008 01:06
by hce
1) take a newer contrib
2) read the docs...
Is it contrib-20080528-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2 I've used a newer contrib? I could not find any other contrib newer than that one in http://download.videolan.org/pub/testing/win32/.

I did read the docs and I did make package-win32-base after make and ran the VLC from the vlc-0.9.0 director. Could you please point me more specific what I did wrong?

Thank you.

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 19 Aug 2008 01:12
by Jean-Baptiste Kempf
http://people.videolan.org/~jb/Contribs ... ly.tar.bz2


From the wiki : "The linuxs executables have to be deleted from the contrib folder: "

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 19 Aug 2008 06:30
by hce
[quote="j-b"]http://people.videolan.org/~jb/Contribs ... ly.tar.bz2

Thank you. I downloaded the contrib from above link. I then built the vlc based on the new contrib. But calling ./vlc --list still shown empty. I tried gdb to run vlc test.mp3, the process stuck at line of "libvlc_wait(vlc)" in winvlc.c, I have to kill the process manually.

Do we need to run ldconfig for the shared libraries? Or could it be missing something else?

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 19 Aug 2008 18:13
by SyRenity
Here is a VLC config that I'm using with yesterday NB and the august 08 contribs. It works fine.

PATH=/usr/win32/bin:$PATH \
PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
./configure \
--host=i686-pc-mingw32 \
--enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
--enable-faad \
--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 \
--with-xml2-config-path=/usr/win32/bin \
--with-dvdnav-config-path=/usr/win32/bin \
--disable-cddax --disable-vcdx \
--enable-debug --enable-dca \
--disable-mkv --disable-taglib

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 20 Aug 2008 08:10
by hce
Here is a VLC config that I'm using with yesterday NB and the august 08 contribs. It works fine.

PATH=/usr/win32/bin:$PATH \
PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig \
CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
LDFLAGS=-L/usr/win32/lib \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
./configure \
--host=i686-pc-mingw32 \
--enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
--enable-faad \
--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 \
--with-xml2-config-path=/usr/win32/bin \
--with-dvdnav-config-path=/usr/win32/bin \
--disable-cddax --disable-vcdx \
--enable-debug --enable-dca \
--disable-mkv --disable-taglib
Thanks for the configuration script, I compiled the vlc using above configuration. The vlc was installed in /usr/local directory, but "vlc --list" was sitll showing nothing, even "vlc --help" was showing empty as well. I was compiling the vlc on Cygwin on Vista, would the Vista be a problem? Another thing was, it took more then 3 house everytime to run ./configure, make and make install on an Intel Core Due processors, really long time. Is there anything I can do to trace down the problems?

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 20 Aug 2008 17:49
by VLC_help
Compile works with Vista, and yes, compile takes a long time with Cygwin. Remember to use -j2 or similar switch with make to make building faster. I usually run VLC directly from c:\VLC\vlc\vlc-0.9.0 using Windows Explorer. Cygwin shell is sometimes very picky about file usage rights so I you haven't tried normal Windows command prompt, try it.

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 21 Aug 2008 02:10
by hce
Compile works with Vista, and yes, compile takes a long time with Cygwin. Remember to use -j2 or similar switch with make to make building faster. I usually run VLC directly from c:\VLC\vlc\vlc-0.9.0 using Windows Explorer. Cygwin shell is sometimes very picky about file usage rights so I you haven't tried normal Windows command prompt, try it.
I tried to run VLC from Windows Explorer, it displayed the VLC icon, but nothing coming. I also tried to run the VLC from the Window's command line:

> vlc --list

It pops up a Cygwin terminal with following lines:

Dumped content to vlc-help.txt file.

Press the RETURN key to continue...

In the vlc-help,txt:

^[[32;1m main ^[[0;1mmain program
^[[0m

My vlc.txt size is about 510127, is it normal? I suspect there are problems with the MinGW. I guess that the MinGW is included in the contrib, I don't need to install the MinGW on my Vista, right? Why we need to compile VLC with MinGW while the Cygwin has the GCC? Can anyone send me your built vlc.exe to my email jupiter.hce@gmail.com please, to let me varify if my Vista can run the vlc.exe or not?

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 21 Aug 2008 17:09
by VLC_help
My vlc.txt size is about 510127
you mean vlc.exe? With nightlies its size should be at near 92,0 KB

Cygwin compiled executables require cygwin dll and nobody wants that on native Win environment. You can get latest builds from nightlies.
http://nightlies.videolan.org/

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 22 Aug 2008 00:34
by hce
My vlc.txt size is about 510127
you mean vlc.exe? With nightlies its size should be at near 92,0 KB

Cygwin compiled executables require cygwin dll and nobody wants that on native Win environment. You can get latest builds from nightlies.
http://nightlies.videolan.org/
Thanks for your link. I found the problem. In nighties build, there is a plugins directory which contains all dll files. In my VLC build, there is no such plugins directory. if I copy the plugins directory from the nighties build to my installation bin directory where the vlc.exe is in, my vlc.exe is able to play. I've searched my VLC build, but could not find a plugins directory which contains all dll files. What could be wrong in my build where the whole dll plugins directory is missing?

In fact, I found all dll files that the plugins contains are in my installation directory, ../Install/lib/vlc/access, ../Install/lib/vlc/mux dtc. Seems that the vlc.exe could not find those dll files. Does the vlc-config need to be changed to link plugins dll files in ../Install/lib/vlc? If so, could you please give an example on how to change the vlc-config, or how to fix thhis problem?

Thank you.

Re: Build win32 cygwin cannot find libavcodec for 0.9.0

Posted: 22 Aug 2008 19:28
by VLC_help
make package-win32-base should copy all the stuff to right place, so you will have plugins folder under vlc-0.9.0 directory.