Skip to main content
9 posts / 0 new
Last post
wck
Offline
Joined: 02/04/2012
Posts:
MLT build error

Hello,

I'm building MLT following the directions here: http://kdenlive.org/user-manual/downloading-and-installing-kdenlive/inst...

When I get to the step where I execute "make -j3" I get the following error.

cc -shared -o ../libmltavformat.so factory.o filter_avcolour_space.o filter_avresample.o filter_avdeinterlace.o filter_swscale.o producer_avformat.o consumer_avformat.o -L../../framework -lmlt -lpthread -Wl,--no-undefined -Wl,--as-needed -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -lavformat -lavcodec -lavutil -lswscale -lavdevice
/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavformat.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [../libmltavformat.so] Error 1
make[2]: Leaving directory `/home/homology/mlt/src/modules/avformat'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/homology/mlt/src/modules'
make: *** [all] Error 1

Similar problems when I do "sudo make install"

I'm running Ubuntu 10.04 LTS on a Lenovo laptop with an Intel core i7.

Any ideas on what to do?

0
Your rating: None
FishB8
Offline
Joined: 04/07/2011
Posts:
Re: MLT build error

Add "-fPIC" to your CFLAGS/CXXFLAGS

wck
Offline
Joined: 02/04/2012
Posts:
Re: MLT build error

OK. So how do I do that?

FishB8
Offline
Joined: 04/07/2011
Posts:
Re: MLT build error

Either export the environmental variable, or specify it at the command line when running configure.

example:

./configure --prefix=/usr --enable-gpl CFLAGS="-fPIC" CXXFLAGS="-fPIC"

wck
Offline
Joined: 02/04/2012
Posts:
Re: MLT build error

I tried doing this:

export CFLAGS="-fPIC"
export CXXFLAGS="fPIC"
./configure --prefix=/usr --enable-gpl
make clean
make -j3

and I get the same error I listed above:
/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavformat.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [../libmltavformat.so] Error 1
make[2]: Leaving directory `/home/homology/mlt/src/modules/avformat'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/homology/mlt/src/modules'
make: *** [all] Error 1

The same thing happens if I do this instead:
./configure --prefix=/usr --enable-gpl CFLAGS="-fPIC" CXXFLAGS="-fPIC"
make clean
make -j3

Is there another way to recompile with the -fPIC option?

FishB8
Offline
Joined: 04/07/2011
Posts:
Re: MLT build error

Sorry, I didn't read the output very closely. I think the suggestion to add fPIC to the build flags is in reference to building ffmpeg (libavformat) rather than mlt.

wck
Offline
Joined: 02/04/2012
Posts:
Re: MLT build error

Sorry for the long pause in posting.

I uninstalled everything, then set the CFLAGS as above for the entire install process, including building ffmpeg, and I still have the same results.

Any ideas on what to try now?

j-b-m
Offline
Joined: 05/19/2009
Posts:
Re: MLT build error

Did you use the recommended configure options to compile ffmpeg:

http://kdenlive.org/user-manual/downloading-and-installing-kdenlive/inst...

wck
Offline
Joined: 02/04/2012
Posts:
Re: MLT build error

I think I did. I will try everything again and make sure and post the results.