SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been trying to build transcode for my new system, using the slackbuild from Slackbuilds.org. It fails with the following error:
Code:
tcprobe-probe_ffmpeg.o: In function `probe_ffmpeg':
probe_ffmpeg.c:(.text+0x1a6): undefined reference to `av_close_input_file'
collect2: error: ld returned 1 exit status
Now I've built transcode before for earlier systems without problem, so I'm assuming something has changed in the latest version of ffmpeg which has broken things.
The only reference I can find to this problem dates back to 2009 (!):
Quote:
Be aware that Qt is C++ while ffmpeg is C. Include the avformat/
avcodec/etc headers in an 'extern "C" {' [...] '}' block.
for example,
Now whilst I can see what is being said here, I have no idea where / how to apply that patch! The SBo already contains a number of patches for transcode against ffmpeg, but none of them seem to contain the quoted fix.
Can someone with more programming experience than I point me in the right direction, please?
Are you sure you are building with the latest versions?
Well, I'm running ffmpeg-2.4.3 (though I notice that 2.4.4 has just been released) and transcode-1.1.7, which is the most recent version I've managed to locate.
Transcode-1.1.7 does seem to be quite old, and the SBo package contains lots of patches to make it compatible with more recent versions of ffmpeg, but perhaps not as recent as 2.4.x?
Here you'll find a patch from Anton Khirnov (libav10.patch). Fixed my build against ffmpeg-2.4.x. Perhaps we don't use the same patches, as some time I tend to cherry-pick them, but for some direction, my sequence is:
Transcode-1.1.7 does seem to be quite old, and the SBo package contains lots of patches to make it compatible with more recent versions of ffmpeg, but perhaps not as recent as 2.4.x?
yes, probably that's the matter: the version on SBo it's tested with a version of the ffmpeg's API corresponding to the version of ffmpeg we have in our repository, that is 2.1.5 (but personally I tested 2.2.10 and the API still looks the same).
BrZ: Many thanks! That patch fixed it (once I'd worked out what -p level to give it!)
It then borked over libavresample, but that was because I'd forgotten to enable that in my ffmpeg build. So I rebuilt ffmpeg and took the opportunity to upgrade to 2.4.4 at the same time. Now all working fine!
All I need to do now is figure out how to get Audacity to compile properly against ffmpeg-2.4.x.....!
My pleasure, pchristy. Audacity seems to support up to ffmpeg 2.2.x, so you can build it against a 'compat' ffmpeg. I think here it was built against ffmpeg-2.3.5 (I'm not sure).
For ffmpeg I use:
Quote:
--libdir=/usr/lib${LIBDIRSUFFIX}/ffmpeg-compat2 \
--shlibdir=/usr/lib${LIBDIRSUFFIX}/ffmpeg-compat2 \
--incdir=/usr/include/ffmpeg-compat2 \
and
rm -rf $PKG/usr/{bin,share}
BrZ: I found a solution to the Audacity build, which was to add "--disable-dynamic-loading" to the config options. This seems to hard link Audacity into ffmpeg, so you don't get the options to search for Lame or ffmpeg in the directories preferences anymore. In fact, it doesn't seem to use Lame at all, but ffmpeg for everything! However, its done everything I've asked of it so far, so I think that's another box ticked!
I've forgotten where I spotted that trick now, but I think I found it by typing the build error message in to Google!
Thanks for the pointers, Ponce! That's a better source for the information I found elsewhere and offers at least some explanation of what is going on! I'm not interested in exporting wma files, so the downside appears to be academic in my case. And all the tests I've done show it working fine with the codecs I regularly use, so I'm happy!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.