Re: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mimiko <vbvbrj(at)gmail(dot)com>
Cc: Posthresql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object
Date: 2014-05-29 14:10:02
Message-ID: 10007.1401372602@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mimiko <vbvbrj(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kalai R 2014-05-29 14:34:17 Postgresql service stopped automatically after restart
Previous Message Mimiko 2014-05-29 13:47:16 relocation R_X86_64_32 against `.rodata' can not be used when making a shared object