LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-29-2009, 03:33 PM   #1
akm3
LQ Newbie
 
Registered: Dec 2008
Location: Atlanta GA
Distribution: Ubuntu 8.10
Posts: 11

Rep: Reputation: 0
symbol lookup error: ffmpeg: undefined symbol


Hi,

I am recently facing some weird problems with ffmpeg command line
I had it working perfectly on a ubuntu machine, but recently it gives me a "symbol lookup error" for almost every command, for example, doing something as simple as:

Code:
ffmepg -i testvideo.flv -f mpeg1video outvideo.mpg
I get this runtime error:
Code:
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_decode_video2
The first guess was I had messed up with a part of source code, or maybe there is mismatch in my libav* versions , or something like that, so I used svn update to make my version up-to-date, and rebuild the whole thing, the problem still persists.

I don't have any problem making ffmpeg, the problem comes when I use the command line though.
Does anybody have an idea where it may come from?


(just for reference, my configure options are like this:
Code:
  configuration: --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-pthreads --disable-mmx --disable-optimizations --disable-stripping
)


PS: I saw this topic in the same forum with somebody having the same problem apparently, but I didn't understand how he could finally solve it.....

Last edited by akm3; 06-29-2009 at 03:34 PM.
 
Old 06-30-2009, 03:03 AM   #2
yonix
LQ Newbie
 
Registered: Jan 2009
Distribution: Debian/Gentoo
Posts: 11

Rep: Reputation: 1
I think you have multiple libavcodec nistallations.

ffmpeg requires its bundled libavcodec from subversion, so maybe ffmpeg binary uses the other version, which doesn't fit.

Try deleting this installation and reconfigure the dynamic linker run-time bindings with ldconfig.

You can be certain what version of libavcodec is used and see it's path with the ldd command:
Code:
ldd `which ffmpeg`
 
Old 06-30-2009, 05:40 AM   #3
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,477

Rep: Reputation: 87
Quote:
Originally Posted by akm3 View Post

I get this runtime error:
Code:
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_decode_video2
I don't have any problem making ffmpeg, the problem comes when I use the command line though.
Does anybody have an idea where it may come from?
Hehehe (evil laugh)

You updated something, right?

This is quite common if you regularly update your system. What seems to have happened is that some part of ffmpeg has been updated or auto-updated, while leaving others at their existing version. One of the libraries you are using has probably upgraded itself to a version where it no longer supports the function or symbol the FFMPEG binary itself is trying to access.

This is one reason why I -never- auto-update my Linux distro installs - auto-updates often break more stuff than they help or fix.

You'll probably need to recompile FFMPEG itself against your own, local source, to ensure that the binary you are trying to use is compatible with the libraries it refers to. You seem to be using shared libraries (.so) - and one of the .so files have been updated, and no longer supports a function the FFMPEG binary (which wasn't updated, apparently) expects.
 
Old 06-30-2009, 03:03 PM   #4
akm3
LQ Newbie
 
Registered: Dec 2008
Location: Atlanta GA
Distribution: Ubuntu 8.10
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rylan76 View Post
Hehehe (evil laugh)

You updated something, right?

This is quite common if you regularly update your system. What seems to have happened is that some part of ffmpeg has been updated or auto-updated, while leaving others at their existing version. One of the libraries you are using has probably upgraded itself to a version where it no longer supports the function or symbol the FFMPEG binary itself is trying to access.

This is one reason why I -never- auto-update my Linux distro installs - auto-updates often break more stuff than they help or fix.

You'll probably need to recompile FFMPEG itself against your own, local source, to ensure that the binary you are trying to use is compatible with the libraries it refers to. You seem to be using shared libraries (.so) - and one of the .so files have been updated, and no longer supports a function the FFMPEG binary (which wasn't updated, apparently) expects.
Thanks a lot for your reply.
I see the problem right now.
All the troublemaker() functions are in libavcodec.
I have my ffmpeg downloaded from svn, and I build it from the source by myself (i.e. not using my Ubuntu's Package manager)
But when I look at the package manger's list, there is another libavcodec there as well, and it seems these two are conflicting each other...
So, the simple solution for me, seems to be removing the "libavcodec" that package manager shows, and make sure I have only one version of this thing. The problem is that, when I try to do this, it informs me that it should remove the gstreamer, and gnome desktop as well. I don't care about gstreamer, as I'm not doing anything with audio/video on that system except what I do with ffmpeg, but won't the removal on gnome desktop cause me problems?(I am thinking there may be a simpler solution than changing to a KDE desktop to bypass this)
 
Old 07-01-2009, 02:50 AM   #5
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,477

Rep: Reputation: 87
Quote:
Originally Posted by akm3 View Post
So, the simple solution for me, seems to be removing the "libavcodec" that package manager shows, and make sure I have only one version of this thing. The problem is that, when I try to do this, it informs me that it should remove the gstreamer, and gnome desktop as well. I don't care about gstreamer, as I'm not doing anything with audio/video on that system except what I do with ffmpeg, but won't the removal on gnome desktop cause me problems?(I am thinking there may be a simpler solution than changing to a KDE desktop to bypass this)
Ah the joys of package management...

Yes, removing the entire GNOME desktop will cause you considerable problems, so don't do it via the package manager.

I'm not sure how you are going to solve that in the "package managed" way, but what I'd do is to simply find the invalid libavcodec.so (or maybe libavcodec.a) file individually, and manually rename it so the linker and / or system executables won't be able to find it. Note that this might break your package management infrastructure (since your package manager database will insist that the old file is there, when it has been renamed) - but it should solve the problem of your FFMPEG binary missing certain functions - since the executable should then find the "correct" libavcodec library.

If the FFMPEG executable now crashes in total, simply copy the "correct" libavcodec library file to whatever directory the "invalid" libavcodec library file was initially located in. Then the FFMPEG binary should probably work.

If you later find that the package manager is all grumpy, you can of course just rename the "invalid" libavcodec library file back to what it was (for example, when initially renaming the libavcodec file, simply name it libavcodec.so.bak - so that when you need to rename it back, just take the .bak away.)

Last edited by rylan76; 07-01-2009 at 02:53 AM.
 
  


Reply

Tags
error, ffmpeg, lookup, symbol, undefined


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
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avformat_alloc_context YeeHaa4LINUX Linux - Software 2 10-17-2009 12:09 AM
symbol lookup error: /usr/lib/libavcodec.so.51: undefined symbol: av_crc04C11DB7 priceey Linux - Software 0 05-06-2009 09:14 AM
./firefox-bin :symbol lookup error:/lib/libgthread-2.0.so.0: undefined symbol: arulupsaras Linux - General 1 11-08-2008 05:48 AM
symbol lookup error: /usr/lib/libgtk-x11.2.0.so.0: undefined symbol:... IamI Slackware 17 02-29-2008 12:10 PM
Workaround: 'symbol lookup error: k3b: undefined symbol: lstat64' devdol Linux - Software 2 02-15-2008 04:36 AM


All times are GMT -5. The time now is 04:54 PM.

Main Menu
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