This forum has been archived. All content is frozen. Please use KDE Discuss instead.

MLT compilation error

Tags: None
(comma "," separated)
gregramirezgarcia
Registered Member
Posts
13
Karma
0

MLT compilation error

Mon Jun 01, 2015 8:22 am
Hi,

I'm having some problems while compiling MLT from source (using the installation guide in the official Kdenlive page). After Googling without any specific result, I thought maybe someone here might have come across the same error.
The (hopefully) relevant part of the terminal output is the following:
Code: Select all
filter_avresample.o: In function `resample_get_audio':
/home/nemesis/Documents/project/mlt/src/modules/avformat/filter_avresample.c:85: undefined reference to `av_audio_resample_init'
/home/nemesis/Documents/project/mlt/src/modules/avformat/filter_avresample.c:89: undefined reference to `audio_resample_close'
/home/nemesis/Documents/project/mlt/src/modules/avformat/filter_avresample.c:98: undefined reference to `audio_resample'
consumer_avformat.o: In function `consumer_thread':
/home/nemesis/Documents/project/mlt/src/modules/avformat/consumer_avformat.c:1209: undefined reference to `avformat_alloc_output_context2'
collect2: error: ld returned 1 exit status
Makefile:45: recipe for target '../libmltavformat.so' failed
make[2]: *** [../libmltavformat.so] Error 1
make[2]: Leaving directory '/home/nemesis/Documents/project/mlt/src/modules/avformat'
Makefile:5: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/nemesis/Documents/project/mlt/src/modules'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 1


I have tried on various virtual machines and still get the same error, which makes me think that more people will have come across this error, but I have been unable to find a solution.
Thanks to all in advance,

Greg
vpinon
KDE Developer
Posts
708
Karma
6
OS

Re: MLT compilation error

Mon Jun 01, 2015 9:26 am
Hello Greg,

Which official page are you reffering to? Not sure kdenlive.org is in line with wiki on userbase.kde.org...
Do you have all the libav*-dev packages installed for headers?
Is the failure appearing at compile time or link time? (probably the latter as 1st error concerns an object file)
gregramirezgarcia
Registered Member
Posts
13
Karma
0

Re: MLT compilation error

Mon Jun 01, 2015 11:52 am
Hi there,

I have followed the steps described in the following page: https://kdenlive.org/download-source
So unless there is some dependancy that is missing from this guide, I'm pretty sure I have installed all the libav packages. This failure is appearing when running the make command after having run ./configure, and I would say it is appearing in the linking stage. I'm pretty sure I have everything updated to the latest builds.
User avatar
Steve Guilford
Registered Member
Posts
207
Karma
0

Re: MLT compilation error

Mon Jun 01, 2015 3:52 pm
There may be a AVFormat vs. FFMpeg conflict here.

I recently used the build script at the MLT site to compile the current version of Kdenlive on Kubuntu 15.04. http://www.mltframework.org/bin/view/MLT/BuildScripts

You may need to build Kdenlive in a sandbox...
gregramirezgarcia
Registered Member
Posts
13
Karma
0

Re: MLT compilation error

Mon Jun 01, 2015 5:12 pm
Hi Steve, thank you for your answer,

I am currently using the build script for MLT to see if this works. Either way, is there any possible fixes for this conflict between AVFormat and FFMpeg? I ask this mostly because I am trying to write a new installation guide for users to clarify various points from the original installation guide, and of course by following the guide I get this error. So I'm looking for a workaround to this problem. If the build script solves the problem, I will put that in my guide with some links, but maybe it would be better when getting everything from source code.
User avatar
Steve Guilford
Registered Member
Posts
207
Karma
0

Re: MLT compilation error

Tue Jun 02, 2015 12:22 am
Got it...let's do this.

See what you have installed on your machine. Type:
dpkg --get-selections | grep avformat

I get:
libavformat-dev install
libavformat-ffmpeg56:amd64 install
libavformat56:amd64 install

Which means I have: (locate libavformat | grep linux-gnu)

/usr/lib/x86_64-linux-gnu/libavformat-ffmpeg.so.56
/usr/lib/x86_64-linux-gnu/libavformat-ffmpeg.so.56.15.102
/usr/lib/x86_64-linux-gnu/libavformat.a
/usr/lib/x86_64-linux-gnu/libavformat.so
/usr/lib/x86_64-linux-gnu/libavformat.so.56
/usr/lib/x86_64-linux-gnu/libavformat.so.56.1.0

See what you have - probably the same thing.

Next..take a look for the entry points in the libraries with 'nm -D'. Here's the results from my machine:

gilly@althea:/usr/lib/x86_64-linux-gnu$ nm -D libavformat.so | grep avformat_alloc_output_context2
gilly@althea:/usr/lib/x86_64-linux-gnu$ nm -D libavformat-ffmpeg.so.56 | grep avformat_alloc_output_context2
00000000000d3cc0 T avformat_alloc_output_context2

So...if your machine matches mine, then you're probably linking against the LibAV version of libavformat. (Search the 'net for background info on the LibAV vs. FFMpeg war, for which we all suffer). As shown above, libavformat.so does not have one of the required entry points but libavformat-ffmpeg... does.

You'll need to link against the FFMpeg version. You may be able to do so via symbolic links or by building a copy of FFMpeg in '/usr/local' and then linking against that.

Another alternative is for you to use the build-kdenlive.sh script to get a baseline and then take apart the build process in order to determine what you need for your purposes.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]