From: Tom Lane <tgl@sss.pgh.pa.us>
To: anilbommareddy09@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17100: undefined reference to `pg_qsort and pq_xxx
Date: Mon, 12 Jul 2021 11:57:18 -0400
Message-ID: <2971363.1626105438@sss.pgh.pa.us> (raw)
In-Reply-To: <17100-8838037599130224@postgresql.org>
References: <17100-8838037599130224@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Build command:
> ../configure --prefix=/path/to/pgsql-gcc CFLAGS='-O3 -flto' CXXFLAGS='-O3
> -flto'
When I try that on that platform (well, actually RHEL 8.4, but should
be close enough) I get a lot of complaints like
ar: pgstrsignal.o: plugin needed to handle lto object
ar: pqsignal.o: plugin needed to handle lto object
ar: qsort.o: plugin needed to handle lto object
ar: qsort_arg.o: plugin needed to handle lto object
ar: quotes.o: plugin needed to handle lto object
ar: snprintf.o: plugin needed to handle lto object
so that the later complaints like
/tmp/ccWzhmx0.ltrans29.ltrans.o: In function `_bt_preprocess_array_keys':
<artificial>:(.text+0x2d264): undefined reference to `qsort_arg'
/tmp/ccWzhmx0.ltrans29.ltrans.o: In function `tblspc_desc':
<artificial>:(.text+0xdee): undefined reference to `appendStringInfo'
<artificial>:(.text+0xe0a): undefined reference to `appendStringInfo'
aren't terribly surprising. Those functions should come out of
libpqcommon.a, but seemingly that hasn't been built correctly.
I'd say the conclusion is "don't use -flto, it doesn't really work
yet on this platform". Or possibly there's some not-installed-by-
default infrastructure you need to use it. Either way, this does
not look like a Postgres bug; it's a compiler toolchain problem.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, anilbommareddy09@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17100: undefined reference to `pg_qsort and pq_xxx
In-Reply-To: <2971363.1626105438@sss.pgh.pa.us>
* 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