pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: TalGloz <glozmantal@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: Linker errors while creating a PostgreSQL C extension function.
Date: Tue, 21 Aug 2018 11:31:54 -0700 (MST)
Message-ID: <1534876314698-0.post@n3.nabble.com> (raw)
In-Reply-To: <30248.1534706191@sss.pgh.pa.us>
References: <1534676183995-0.post@n3.nabble.com>
	<CAAfz9KOKj2rqsd6fBeqEcvMCMNMvcxK7S7AgF+rtmTiP9z27iQ@mail.gmail.com>
	<1534680422044-0.post@n3.nabble.com>
	<2455c526-58ab-4f2b-a9c0-f2b2890ca365@manitou-mail.org>
	<1534704516779-0.post@n3.nabble.com>
	<30248.1534706191@sss.pgh.pa.us>

Hallo

Do you or anyone know why is it trying to link with -L/usr/lib64 path and
not -L/usr/local/lib as provided?

After recompiling the libseal.a with the -fPIC flag and copying it manually
from /usr/local/lib/ to /usr/lib64/ I get those errors:

g++ -Wl,--no-undefined -shared -o seal_diff_cpp.so seal_diff_cpp.o
-L/usr/pgsql-10/lib   -L/usr/lib64 -Wl,--as-needed
-Wl,-rpath,'/usr/pgsql-10/lib',--enable-new-dtags -L/usr/local/lib -lseal
-pthread
seal_diff_cpp.o: In function `seal_diff_cpp':
/etc/opt/pgsql_c_functions/CPP/seal_extension/seal_diff_cpp.cpp:106:
undefined reference to `pg_detoast_datum_packed'
/etc/opt/pgsql_c_functions/CPP/seal_extension/seal_diff_cpp.cpp:107:
undefined reference to `pg_detoast_datum_packed'
/etc/opt/pgsql_c_functions/CPP/seal_extension/seal_diff_cpp.cpp:108:
undefined reference to `pg_detoast_datum_packed'
/etc/opt/pgsql_c_functions/CPP/seal_extension/seal_diff_cpp.cpp:112:
undefined reference to `text_to_cstring'
/etc/opt/pgsql_c_functions/CPP/seal_extension/seal_diff_cpp.cpp:113:
undefined reference to `text_to_cstring'
/etc/opt/pgsql_c_functions/CPP/seal_extension/seal_diff_cpp.cpp:114:
undefined reference to `text_to_cstring'
/etc/opt/pgsql_c_functions/CPP/seal_extension/seal_diff_cpp.cpp:130:
undefined reference to `cstring_to_text_with_len'

Did I miss something in one of my files?

Best regards,
Tal



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html




view thread (21+ messages)  latest in thread

Message-ID: <1534876314698-0.post@n3.nabble.com>
Permalink:  ../1534876314698-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1534876314698-0.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: glozmantal@gmail.com
  Subject: Re: Linker errors while creating a PostgreSQL C extension function.
  In-Reply-To: <1534876314698-0.post@n3.nabble.com>
  References: <1534676183995-0.post@n3.nabble.com> <CAAfz9KOKj2rqsd6fBeqEcvMCMNMvcxK7S7AgF+rtmTiP9z27iQ@mail.gmail.com> <1534680422044-0.post@n3.nabble.com> <2455c526-58ab-4f2b-a9c0-f2b2890ca365@manitou-mail.org> <1534704516779-0.post@n3.nabble.com> <30248.1534706191@sss.pgh.pa.us> <1534876314698-0.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox