Hi, Sebastian Ramacher <s.ramac...@gmx.at> writes:
> I'm trying to build a shared library and link it against libmupdf.a. But this > fails with > > /usr/bin/ld: > /usr/lib/gcc/x86_64-linux-gnu/4.5.2/../../../../lib/libmupdf.a(dev_draw.o): > relocation R_X86_64_32S against `.text' can not be used when making a shared > object; recompile with -fPIC > /usr/lib/gcc/x86_64-linux-gnu/4.5.2/../../../../lib/libmupdf.a: could not read > symbols: Bad value > > Rebuilding the package with the attached patch fixed the error for me. The > patch > builds mupdf with CFLAGS=-fPIC. Thanks for the patch, however this was intended. Upstream explicitly state that them don't bother to maintain a shared library[1]. If you really want to use libmupdf.a in a shared library then you have to recompile it with -fPIC. I will add an non-standard x-fpic DEB_BUILD_OPTIONS to debian/rules that enables this behavior. Regards, Kanru [1]: http://bugs.ghostscript.com/show_bug.cgi?id=691887 -- A badly written book is only a blunder. A bad translation of a good book is a crime. -- Gilbert Highet
pgpzwrcqzWi9Z.pgp
Description: PGP signature