LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 07-26-2010, 02:47 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Rep: Reputation: 47
problem with --enable-libx264 option in ffmpeg


I am using ubuntu 8.04.
i unzipped ffmpeg-checkout-2010-06-05
Then
Code:
$./configure --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree
went well.
Actually I am trying to build most powerful ffmpeg able to transcode any media format file.
'Make' gives following error
Code:
$time make
CC	ffmpeg.o
ffmpeg.c: In function ‘new_audio_stream’:
ffmpeg.c:673: warning: ‘best’ may be used uninitialized in this function
ffmpeg.c:673: note: ‘best’ was declared here
CC	cmdutils.o
LD	ffmpeg_g
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_98'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
Though I have installed x264,libx264-dev via 'apt-get'

Last edited by sumeet inani; 07-26-2010 at 02:50 AM.
 
Old 07-26-2010, 03:46 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,976

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Hi,

My guess is that the installed libx264 is a bit old for the current version of ffmpeg.
Why don't you get the latest libx264 source and compile it using ""--enable-shared" option?
 
Old 07-26-2010, 04:36 AM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Original Poster
Rep: Reputation: 47
Currently I have also installed x264-snapshot-20100621-2245.tar.bz2 with "--enable-shared" option.

Still the output same as before.

Last edited by sumeet inani; 07-26-2010 at 04:43 AM. Reason: Tried your suggestion , bathory
 
Old 07-26-2010, 05:04 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,976

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Are you sure you're using the newly installed libx264?
If you didn't use a prefix when installing libx264, then it's installed in /usr/local/lib/libx264.so. You can use:
Code:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
before compiling ffmpeg. Also don't forget to run "make clean" or "make distclean" before recompiling

Regards
 
Old 07-26-2010, 05:33 AM   #5
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Original Poster
Rep: Reputation: 47
Yeah , I did after installing x264 tarball
Code:
$sudo ldconfig
$cd ~/tarball/ffmpeg-checkout-2010-06-05/
$make clean;
$export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
$./configure --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree
$time make
Still same error.
 
Old 07-26-2010, 07:07 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,976

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Well it looks like you need a different version of x264
To verify, run
Code:
nm /usr/local/lib/libx264.a |grep x264_encoder_open
to see the exact symbol name.
In my case the above command gave x264_encoder_open_98 (the sources used were dated Jun 21)
After that I downloaded the latest x264 from git, compiled and I got x264_encoder_open_104
So download and compile x264-snapshot-20100621-2245.tar.bz2 and see if it helps

Regards

Last edited by bathory; 07-26-2010 at 07:58 AM.
 
Old 07-26-2010, 10:23 AM   #7
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Original Poster
Rep: Reputation: 47
When I ran
Code:
$ nm /usr/local/lib/libx264.a |grep x264_encoder_open
00002b10 T x264_encoder_open_98
So now i extracted the latest tarball of x264 i.e x264-snapshot-20100725-2245
Code:
$ cd x264-snapshot-20100725-2245/;./configure --enable-shared 
./version.sh: line 2: git: command not found # was the same in case of x264-snapshot-20100621-2245
Platform:   X86
System:     LINUX
asm:        yes
avs:        no
lavf:       yes
ffms:       no
gpac:       no
pthread:    yes
filters:    resize crop select_every
debug:      no
gprof:      no
PIC:        no
shared:     yes
visualize:  no
bit depth:  8

You can run 'make' or 'make fprofiled' now.
$ time make;
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/mc.o common/mc.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/predict.o common/predict.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/pixel.o common/pixel.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/macroblock.o common/macroblock.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/frame.o common/frame.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/dct.o common/dct.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/cpu.o common/cpu.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/cabac.o common/cabac.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/common.o common/common.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/mdate.o common/mdate.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/rectangle.o common/rectangle.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/set.o common/set.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/quant.o common/quant.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/deblock.o common/deblock.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/vlc.o common/vlc.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/mvpred.o common/mvpred.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/bitstream.o common/bitstream.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/analyse.o encoder/analyse.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/me.o encoder/me.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/ratecontrol.o encoder/ratecontrol.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/set.o encoder/set.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/macroblock.o encoder/macroblock.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/cabac.o encoder/cabac.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/cavlc.o encoder/cavlc.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/encoder.o encoder/encoder.c
encoder/encoder.c: In function ‘x264_slice_write’:
encoder/encoder.c:1819: warning: ‘bs_bak.i_bits_encoded’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.i_left’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.cur_bits’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.p_end’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.p’ may be used uninitialized in this function
encoder/encoder.c:1819: warning: ‘bs_bak.p_start’ may be used uninitialized in this function
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o encoder/lookahead.o encoder/lookahead.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/threadpool.o common/threadpool.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/x86/mc-c.o common/x86/mc-c.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o common/x86/predict-c.o common/x86/predict-c.c
yasm -O2 -f elf -Icommon/x86/ -o common/x86/const-a.o common/x86/const-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/cabac-a.o common/x86/cabac-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/dct-a.o common/x86/dct-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/deblock-a.o common/x86/deblock-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/mc-a.o common/x86/mc-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/mc-a2.o common/x86/mc-a2.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/pixel-a.o common/x86/pixel-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/predict-a.o common/x86/predict-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/quant-a.o common/x86/quant-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/sad-a.o common/x86/sad-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/cpu-a.o common/x86/cpu-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/dct-32.o common/x86/dct-32.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/bitstream-a.o common/x86/bitstream-a.asm
yasm -O2 -f elf -Icommon/x86/ -o common/x86/pixel-32.o common/x86/pixel-32.asm
gcc -shared -o libx264.so.104 common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/rectangle.o common/set.o common/quant.o common/deblock.o common/vlc.o common/mvpred.o common/bitstream.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/threadpool.o common/x86/mc-c.o common/x86/predict-c.o common/x86/const-a.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-32.o common/x86/bitstream-a.o common/x86/pixel-32.o  -Wl,-soname,libx264.so.104 -lm -lpthread -s
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o x264.o x264.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o input/input.o input/input.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o input/timecode.o input/timecode.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o input/raw.o input/raw.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o input/y4m.o input/y4m.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o output/raw.o output/raw.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o output/matroska.o output/matroska.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o output/matroska_ebml.o output/matroska_ebml.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o output/flv.o output/flv.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o output/flv_bytestream.o output/flv_bytestream.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/filters.o filters/filters.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/video.o filters/video/video.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/source.o filters/video/source.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/internal.o filters/video/internal.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/resize.o filters/video/resize.c
filters/video/resize.c: In function ‘round_dbl’:
filters/video/resize.c:181: warning: declaration of ‘truncate’ shadows a global declaration
/usr/include/unistd.h:952: warning: shadowed declaration is here
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/cache.o filters/video/cache.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/fix_vfr_pts.o filters/video/fix_vfr_pts.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/select_every.o filters/video/select_every.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o filters/video/crop.o filters/video/crop.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o input/thread.o input/thread.c
gcc -Wshadow -O3 -ffast-math  -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99  -I/usr/local/include   -s -fomit-frame-pointer -fno-tree-vectorize   -c -o input/lavf.o input/lavf.c
ar rc libx264.a common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/rectangle.o common/set.o common/quant.o common/deblock.o common/vlc.o common/mvpred.o common/bitstream.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/threadpool.o common/x86/mc-c.o common/x86/predict-c.o common/x86/const-a.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-32.o common/x86/bitstream-a.o common/x86/pixel-32.o
ranlib libx264.a
gcc -o x264 x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o input/thread.o input/lavf.o libx264.a -L.  -pthread -L/usr/local/lib -lavformat -lavcodec -lz -lfaac -lfaad -lgsm -lmp3lame -ltheoraenc -ltheoradec -lvorbisenc -lvorbis -logg -lx264 -lm -lxvidcore -ldc1394_control -lraw1394 -lX11 -lXext -lXfixes -ldl -lswscale -lavutil    -lm -lpthread -s
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-export-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_98'
collect2: ld returned 1 exit status
make: *** [x264] Error 1

real	0m26.651s
user	0m24.342s
sys	0m0.872s

Last edited by sumeet inani; 07-26-2010 at 10:24 AM.
 
Old 07-26-2010, 01:58 PM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,976

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Well, I don't get it!
Quote:
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-export-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_98'
collect2: ld returned 1 exit status
make: *** [x264] Error 1
How did this came out
Can you move /home/lxuser/tarball/ffmpeg-export-2010-06-05 and /usr/local/lib/libavcodec.* in /tmp, make distclean and recompile x264
 
Old 07-26-2010, 07:36 PM   #9
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Quote:
Originally Posted by sumeet inani View Post
libx264.so.104
That looks a bit odd. Where did you get libx264 from? I use a git pull from about 6 weeks ago and it installs /usr/lib/libx264.so.98
Quote:
undefined reference to `x264_encoder_open_98'
Maybe you have the wrong version of x264 installed?

I've just tried compiling the current x264 and it now installs libx264.so.104, like you have. Maybe your ffmpeg source is out of date?

Last edited by Andrew Benton; 07-26-2010 at 07:45 PM. Reason: updated x264
 
Old 07-27-2010, 12:33 AM   #10
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Original Poster
Rep: Reputation: 47
As you said I uninstalled ffmpeg as well as x264 & deleted extracted tarball.

Now installing x264-snapshot-20100725-2245 went well.
Now with 'make' of ffmpeg-checkout-2010-06-05 I got error
Code:
ffmpeg.c: In function ‘new_audio_stream’:
ffmpeg.c:673: warning: ‘best’ may be used uninitialized in this function
ffmpeg.c:673: note: ‘best’ was declared here
CC	cmdutils.o
LD	ffmpeg_g
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg-checkout-2010-06-05/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_104'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
same thing happened with ffmpeg-0.6 & even ffmpeg-export-2010-07-27
I like tarballs because you can use them on offline computers.

Last edited by sumeet inani; 07-27-2010 at 01:05 AM.
 
Old 07-27-2010, 01:43 AM   #11
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Original Poster
Rep: Reputation: 47
Now I am surprised
I ran
Code:

$git clone git://git.videolan.org/x264.git
;cd x264;./configure;make;sudo make install;sudo ldconfig;cd .. #everything goes well
$git clone git://git.ffmpeg.org/ffmpeg/;cd ffmpeg;git clone git://git.ffmpeg.org/libswscale/
$ ./configure --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libdc1394 --enable-libfaac  --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree;make;
something something without error
libavutil/random_seed.c: In function ‘get_generic_seed’:
libavutil/random_seed.c:51: warning: suggest parentheses around && within ||
CC	libavutil/rational.o
CC	libavutil/rc4.o
CC	libavutil/sha.o
CC	libavutil/tree.o
CC	libavutil/utils.o
AR	libavutil/libavutil.a
CC	ffmpeg.o
CC	cmdutils.o
LD	ffmpeg_g
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_104'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

Last edited by sumeet inani; 07-27-2010 at 01:59 AM.
 
Old 07-27-2010, 01:56 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Quote:
I like tarballs because you can use them on offline computers.
An application downloaded with git, svn, cvs, bzr, hg
can be made into a tarball too :

tar -cf ffmpeg.tar ffmpeg/

gzip ffmpeg.tar ( or bzip2 ffmpeg.tar )
..

Last edited by knudfl; 07-27-2010 at 03:44 AM.
 
Old 07-27-2010, 02:31 AM   #13
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Original Poster
Rep: Reputation: 47
I will try that knudfl.
my question was i installed latest x264 (via git) . All went well.
then ffmpeg (via git) gave error during make.
 
Old 07-27-2010, 05:45 AM   #14
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,976

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
@OP

FYI, I've just done what you did in your previous post:
I've downloaded x264, ffmpeg and libswscale from git, compile and install x264 using "--enable-shared" and then compiled and install ffmpeg using the same options as you (except libdc1394 and libgsm as I don't have these libraries)
Everything ended up OK, so I guess your build is using wrong x264 libraries and/or header files
Set LD_LIBARY_PATH to just /usr/local/lib and add the same directory as the 1st entry in /etc/ld.so.conf. Then run ldconfig and try to build again ffmpeg (after running of course make distclean)

Regards
 
Old 07-27-2010, 07:09 AM   #15
sumeet inani
Member
 
Registered: Oct 2008
Posts: 883
Blog Entries: 26

Original Poster
Rep: Reputation: 47
This time I
(1)enabled shared option in x264
(2)'export LD_LIBARY_PATH=/usr/local/lib' before ffmpeg configure
(3)removed libdc1394 and libgsm from configure options
Code:
$cat /etc/ld.so.conf 
include /etc/ld.so.conf.d/*.conf
$ ls /etc/ld/so.conf.d
i486-linux-gnu.conf  libc.conf
$ cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib
$ cat /etc/ld.so.conf.d/i486-linux-gnu.conf
# Multiarch support
/lib/i486-linux-gnu
/usr/lib/i486-linux-gnu
Let us see !

Code:
CC	ffmpeg.o
CC	cmdutils.o
LD	ffmpeg_g
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:92: undefined reference to `x264_picture_init'
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:113: undefined reference to `x264_encoder_delayed_frames'
/home/lxuser/tarball/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/lxuser/tarball/ffmpeg/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_104'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
Nothing different

Last edited by sumeet inani; 07-27-2010 at 07:19 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] installing ffmpeg from tarball with libx264 enabled sumeet inani Linux - Newbie 6 06-21-2010 11:35 PM
Is there a resize option on ffmpeg? comcastuser Linux - Software 4 04-16-2010 04:22 PM
LINUX UBUNTU PHP FFMPEG INSTALLED BUT libx264 while installing ERROR??? trinay123 Ubuntu 2 03-13-2010 11:22 AM
[FFMPEG] Error with libx264 not found nikhil010586 Linux - Software 11 09-23-2009 04:48 AM
dependency issue: libx264.so.54 needed by ffmpeg PhilTR Fedora 22 01-23-2007 12:06 PM


All times are GMT -5. The time now is 07:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration