Reply to topic

k3b make error in libavcodec

brianpatrick
Registered Member
Posts
2
Karma
0

k3b make error in libavcodec

Thu Jun 17, 2010 8:01 pm
Hi,
I am trying to build k3b from source and am getting a make error:
/usr/bin/ld: /usr/local/lib/libavcodec.a(utils.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [lib/k3bffmpegdecoder.so] Error 1
make[1]: *** [plugins/decoder/ffmpeg/CMakeFiles/k3bffmpegdecoder.dir/all] Error 2

I have all of the dependencies installed and a full build environment on Ubuntu 10.4 64 bit. I built it fine on 9.04. I did a full make on ffmpeg-0.5.2 and it went fine.

Do I have to hack the makefiles to "recompile with -fPIC". And, recompile what? There were hundreds of modules.

What am I doing wrong?

Thank you,
BrianP
User avatar bcooksley
Administrator
Posts
19760
Karma
87
OS

Re: k3b make error in libavcodec

Thu Jun 17, 2010 10:39 pm
You need to recompile ffmpeg with -fPIC, as the file that is having issues is /usr/local/lib/libavcodec.a


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
brianpatrick
Registered Member
Posts
2
Karma
0

Re: k3b make error in libavcodec

Fri Jun 18, 2010 5:54 pm
bcooksley,
The INSTALL file says:
install mandatory and optionally optional junk
mkdir build
cd build
cmake ..
If the cmake run was successful you are presented with a list of configure results that shows
which optional features are enabled. Now just compile K3b:
make
Now you are ready to install:
make install (as root)

Does the makefile need to be hacked? It was created by the cmake process, so wouldn't any changes be overwritten?
Here are all of the references to ffmpeg in the makefile
brianp@trex:/mnt/sda4.home/brianp/download/k3b/k3b-1.93.0/build$ grep ffmpeg *
CMakeCache.txt:k3bffmpegdecoder_LIB_DEPENDS:STATIC=general;k3bdevice;general;KDE4__kdeui;general;k3b;general;/usr/local/lib/libavcodec.a;general;/usr/local/lib/libavformat.a;general;/usr/local/lib/libavutil.a;
Makefile:# Target rules for targets named k3bffmpegdecoder
Makefile:k3bffmpegdecoder: cmake_check_build_system
Makefile: $(MAKE) -f CMakeFiles/Makefile2 k3bffmpegdecoder
Makefile:.PHONY : k3bffmpegdecoder
Makefile:k3bffmpegdecoder/fast:
Makefile: $(MAKE) -f plugins/decoder/ffmpeg/CMakeFiles/k3bffmpegdecoder.dir/build.make plugins/decoder/ffmpeg/CMakeFiles/k3bffmpegdecoder.dir/build
Makefile:.PHONY : k3bffmpegdecoder/fast
Makefile:# Target rules for targets named k3bffmpegdecoder_automoc
Makefile:k3bffmpegdecoder_automoc: cmake_check_build_system
Makefile: $(MAKE) -f CMakeFiles/Makefile2 k3bffmpegdecoder_automoc
Makefile:.PHONY : k3bffmpegdecoder_automoc
Makefile:k3bffmpegdecoder_automoc/fast:
Makefile: $(MAKE) -f plugins/decoder/ffmpeg/CMakeFiles/k3bffmpegdecoder_automoc.dir/build.make plugins/decoder/ffmpeg/CMakeFiles/k3bffmpegdecoder_automoc.dir/build
Makefile:.PHONY : k3bffmpegdecoder_automoc/fast
Makefile: @echo "... k3bffmpegdecoder"
Makefile: @echo "... k3bffmpegdecoder_automoc"

Where would one put the -fPIC directive?

This has to be bug when following the instructions on a downloaded package yields a low level linker error. Is there an obvious fix I am overlooking? For usability alone, this deserves a bug writeup.

With configure, you can slip in various options and find out which ones with configure --help. How do you do the same thing with cmake when the help tells you the options of cmake, not of the package being built.

Any ideas?

Thank you,

Brian
User avatar bcooksley
Administrator
Posts
19760
Karma
87
OS

Re: k3b make error in libavcodec

Fri Jun 18, 2010 10:16 pm
The Makefile for K3b isn't the problem. The problem lies in the configuration of ffmpeg when it was built.


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bigjuergo, Bing [Bot], blue_bullet, chan, EricDraven9891, Exabot [Bot], Google [Bot], jsalatas, Majestic-12 [Bot], rbreu, Sogou [Bot], Yahoo [Bot]