Page 1 of 1

ffmpeg compiling error

Posted: 22 Sep 2010 17:30
by Antarius
I try to compile vlc for win32 in ubuntu 10.4 using cross compile. But i can't get beyond ffmpef in contribs. I get this error:

config.log
...
check_lib lame/lame.h hip_decode_init -lmp3lame
check_header lame/lame.h
check_cpp
BEGIN /tmp/ffconf.MtAfPLl9.c
1 #include <lame/lame.h>
2 int x;
END /tmp/ffconf.MtAfPLl9.c
i586-mingw32msvc-gcc -I/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -O3 -march=i686 -mtune=generic -DNDEBUG -isystem /root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -O3 -march=i686 -mtune=generic -DNDEBUG -isystem /root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -I/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -O3 -march=i686 -mtune=generic -DNDEBUG -isystem /root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -march=i686 -std=c99 -fno-common -fomit-frame-pointer -E -o /tmp/ffconf.g8CG9U3I.o /tmp/ffconf.MtAfPLl9.c
check_func hip_decode_init -lmp3lame
check_ld -lmp3lame
check_cc
BEGIN /tmp/ffconf.MtAfPLl9.c
1 extern int hip_decode_init();
2 int main(void){ hip_decode_init(); }
END /tmp/ffconf.MtAfPLl9.c
i586-mingw32msvc-gcc -I/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -O3 -march=i686 -mtune=generic -DNDEBUG -isystem /root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -O3 -march=i686 -mtune=generic -DNDEBUG -isystem /root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -I/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -O3 -march=i686 -mtune=generic -DNDEBUG -isystem /root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/include -march=i686 -std=c99 -fno-common -fomit-frame-pointer -c -o /tmp/ffconf.g8CG9U3I.o /tmp/ffconf.MtAfPLl9.c
i586-mingw32msvc-gcc -L/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/lib -L/root/vlc-1.1/extras/contrib/hosts/i586-mingw32msvc/lib -o /tmp/ffconf.KFimtXPe.exe /tmp/ffconf.g8CG9U3I.o -lgsm -lm -lz -lpsapi -lmp3lame
/tmp/ffconf.g8CG9U3I.o:ffconf.MtAfPLl9.c:(.text+0xc): undefined reference to `_hip_decode_init'
collect2: ld returned 1 exit status
ERROR: libmp3lame >= 3.98.3 not found

Re: ffmpeg compiling error

Posted: 22 Sep 2010 23:12
by Jean-Baptiste Kempf
Take prebuilt contribs.

Re: ffmpeg compiling error

Posted: 23 Sep 2010 08:45
by Antarius
Surely I can take prebuilt ones, but I am more interested in compiling from scratch. I use script from contrib folder to do compiling, lame was compiled ok before ffmpeg, I can see compiled libraries in lib folder, but it still doesn't work.

Re: ffmpeg compiling error

Posted: 23 Sep 2010 09:57
by Titanic
I had the same problem. I simply downloaded the lame package myself, compiled and installed it to the correct directory (depends on your configuration) and then the contrib make is running, also ffmpeg gets compiled without any problems.

I don't know what's going wrong with the contrib compile of lame but right now my solution is sufficient for me. Also don't forget to install the packages tofrodos and wine in order to have them ready for the contrib make when they are needed.

BTW: Keep me posted if you managed to get VLC compiled for win32 on Ubuntu 10.10 because I'm right now also trying to achive this.

Re: ffmpeg compiling error

Posted: 27 Sep 2010 15:48
by Titanic
There's also a workaround which doesn't involve downloading lame yourself. After you've got this error, open the file configure in directory extras/contrib/src/ffmpeg with an editor and replace the line 2747 (or somewhere near this line number)
'enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h hip_decode_init -lmp3lame'
with
'enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame'

Works great for me and thx to the guys in IRC (can't remember who gave that tip, I think it was mru) for providing this workaround.