[CMake] Problems with static jpeg library

Rolf Eike Beer eike at sf-mail.de
Tue Sep 11 07:47:50 EDT 2018


world at masterdevops.eu wrote:
> Hi,
> 
> I am trying to compile the project libgd
> (https://github.com/libgd/libgd) with the option ENABLE_JPEG enabled.
> 
> I.e. first I downloaded the source code of libjpeg-turbo from
> https://sourceforge.net/projects/libjpeg-turbo/files/2.0.0/, compiled it

You need to make sure that this compile includes -fPIC in the compileflags of 
libjpeg.

> But I get several errors like this one:
> > /usr/bin/ld: .../libjpeg-turbo-2.0.0/libjpeg.a(jcmainct.c.o):
> > relocation R_X86_64_32S against `.text' can not be used when making a
> > shared object; recompile with -fPIC

As said here.

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <https://cmake.org/pipermail/cmake/attachments/20180911/d8702378/attachment.sig>


More information about the CMake mailing list