Re: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object - Mailing list pgsql-general

From Tom Lane
Subject Re: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object
Date
Msg-id 10007.1401372602@sss.pgh.pa.us
Whole thread Raw
In response to relocation R_X86_64_32 against `.rodata' can not be used when making a shared object  (Mimiko <vbvbrj@gmail.com>)
List pgsql-general
Mimiko <vbvbrj@gmail.com> writes:
> But `make` fails with this error:
> /usr/bin/ld: /opt/openssl/lib/libssl.a(t1_meth.o): relocation
> R_X86_64_32 against `.rodata' can not be used when making a shared
> object; recompile with -fPIC

> Want to mention that openssl, zlib, libxml2, libxslt and xz are compiled
> in /opt as static only.

You cannot use such libraries with Postgres.  They need to be linked with
dynamic shared objects, which means they either need to be DSOs themselves
or at least compiled in a way that would allow them to become part of a
DSO.  As the message says, that means you need to have used -fPIC when
building them (though -fpic might work as well depending on platform).

            regards, tom lane


pgsql-general by date:

Previous
From: Mimiko
Date:
Subject: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object
Next
From: Kalai R
Date:
Subject: Postgresql service stopped automatically after restart