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

From: Mimiko <vbvbrj(at)gmail(dot)com>
To: Posthresql-general <pgsql-general(at)postgresql(dot)org>
Subject: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object
Date: 2014-05-29 13:47:16
Message-ID: 53873A64.7010008@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello.

I want to compile postgresql with this:

./configure --prefix=/opt/postgresql --enable-nls --disable-rpath
--enable-profiling --enable-depend --with-tcl --with-segsize=4
--with-perl --with-python --with-gssapi --with-krb5 --with-pam
--with-ldap --with-ossp-uuid --with-libxml --with-libxslt --with-openssl
--with-zlib --with-gnu-ld
--with-includes="/opt/openssl/include:/opt/libxml2/include:/opt/libxslt/include:/opt/zlib/include:/opt/xz/include"
LDFLAGS="-Wl,-R,ORIGIN/../lib/../lib/../lib../lib:ORIGIN/../lib/x86_64-linux-gnu
-L/opt/openssl/lib -L/opt/libxml2/lib -L/opt/libxslt/lib -L/opt/zlib/lib
-L/opt/xz/lib" LIBS="-llzma -lrt" CPPFLAGS="-I/opt/libxml2/include"

But `make` fails with this error:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv
-fexcess-precision=standard -pg -DLINUX_PROFILE -pthread -D_REENTRANT
-D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -fpic -shared
-Wl,-soname,libpq.so.5 -Wl,--version-script=exports.list -o libpq.so.5.6
fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o
fe-protocol2.o fe-protocol3.o pqexpbuffer.o fe-secure.o libpq-events.o
chklocale.o inet_net_ntop.o noblock.o pgstrcasecmp.o pqsignal.o thread.o
strlcpy.o getpeereid.o ip.o md5.o encnames.o wchar.o -L../../../src/port
-L../../../src/common
-Wl,-R,ORIGIN/../lib/../lib/../lib../lib:ORIGIN/../lib/x86_64-linux-gnu
-L/opt/openssl/lib -L/opt/libxml2/lib -L/opt/libxslt/lib -L/opt/zlib/lib
-L/opt/xz/lib -L/usr/lib -Wl,--as-needed -lssl -lcrypto -lgssapi_krb5
-lcrypt -lldap_r -lpthread
/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
/opt/openssl/lib/libssl.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [libpq.so.5.6] Error 1
make[3]: Leaving directory
`/home/mimiko/src/postgresql/src/interfaces/libpq'
make[2]: *** [all-libpq-recurse] Error 2
make[2]: Leaving directory `/home/mimiko/src/postgresql/src/interfaces'
make[1]: *** [all-interfaces-recurse] Error 2
make[1]: Leaving directory `/home/mimiko/src/postgresql/src'
make: *** [world-src-recurse] Error 2

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

How can I resolve this error, or this is a wrong way?

--
Mimiko desu.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-05-29 14:10:02 Re: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object
Previous Message Adrian Klaver 2014-05-29 13:29:21 Re: How to implement the skip errors for copy from ?