LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-01-2014, 03:45 AM   #1
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Rep: Reputation: Disabled
Problem building "transcode"


System: Slackware64-current
ffmpeg-2.4.3
transcode-1.1.7

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,

#ifdef __cplusplus
extern "C" {
#include "avformat/avformat.h"
}
#endif
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?

TIA,

--
Pete
 
Old 12-01-2014, 04:20 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
This patch http://ffmpeg.org/pipermail/ffmpeg-c...ry/045389.html from 2012 seems to have removed `av_close_input_file'

Are you sure you are building with the latest versions?
 
Old 12-01-2014, 04:51 AM   #3
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
This patch http://ffmpeg.org/pipermail/ffmpeg-c...ry/045389.html from 2012 seems to have removed `av_close_input_file'

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?

Cheers,

--
Pete
 
Old 12-01-2014, 06:15 AM   #4
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
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:
Quote:
#zcat $CWD/transcode-1.1.7-ffmpeg-0.11.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/transcode-1.1.7-ffmpeg-1.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/transcode-1.1.7-ffmpeg2.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/transcode-1.1.7-libav-9.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/transcode-1.1.7-preset-free.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/transcode-1.1.7-libav-10.patch.gz | patch -p1 --verbose || exit 1
#zcat $CWD/transcode-1.1.7-freetype-251.patch.gz | patch -p1 --verbose || exit 1
 
Old 12-01-2014, 06:15 AM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
Quote:
Originally Posted by pchristy View Post
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).
 
Old 12-01-2014, 11:55 AM   #6
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Original Poster
Rep: Reputation: Disabled
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.....!

--
Pete
 
Old 12-01-2014, 06:52 PM   #7
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 543

Rep: Reputation: 121Reputation: 121
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}
For audacity:
Quote:
export PKG_CONFIG_PATH="/usr/lib64/ffmpeg-compat2/pkgconfig:$PKG_CONFIG_PATH"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="$SLKLDFLAGS -L/usr/lib64/ffmpeg-compat2" \
Attached Thumbnails
Click image for larger version

Name:	audacity.png
Views:	16
Size:	37.5 KB
ID:	16976  
 
Old 12-02-2014, 02:36 AM   #8
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Original Poster
Rep: Reputation: Disabled
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!

Cheers,

--
Pete
 
Old 12-02-2014, 02:58 AM   #9
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
http://manual.audacityteam.org/o/man...ersion_support

http://wiki.audacityteam.org/wiki/Re....0.6#Compiling

Last edited by ponce; 12-02-2014 at 03:00 AM.
 
Old 12-02-2014, 04:15 AM   #10
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Original Poster
Rep: Reputation: Disabled
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!

--
Pete
 
  


Reply



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
Building problem of "some" 32-bit programs in Slackware64 multilib aalireza Slackware 1 06-05-2013 08:24 AM
"bad tty" & "file descriptor error" while building RPM on F13 gosssamer Linux - Software 7 12-28-2010 05:02 PM
Problem building subversion 1.4.6 "Nonrepresentable section on output" marconap Linux - Software 5 07-08-2008 02:36 AM
FC7: Installing 'transcode' - "hal conflicts with kernel < 2.6.17" fluffels Linux - Software 22 11-06-2007 04:55 PM
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:23 PM.

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
Open Source Consulting | Domain Registration