pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17100: undefined reference to `pg_qsort and pq_xxx
2+ messages / 2 participants
[nested] [flat]

* BUG #17100: undefined reference to `pg_qsort and pq_xxx
@ 2021-07-12 08:00 PG Bug reporting form <noreply@postgresql.org>
  2021-07-12 15:57 ` Re: BUG #17100: undefined reference to `pg_qsort and pq_xxx Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2021-07-12 08:00 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: anilbommareddy09@gmail.com

The following bug has been logged on the website:

Bug reference:      17100
Logged by:          [BuildError][GCC-10.2.x] undefined reference to `pg_qsort in PostrgreSQL
13.3
Email address:      anilbommareddy09@gmail.com
PostgreSQL version: 13.3
Operating system:   CentoS 8.3
Description:        

export CC=gcc
 export CXX=g++
 Build command:
 ../configure --prefix=/path/to/pgsql-gcc CFLAGS='-O3  -flto' CXXFLAGS='-O3 
-flto'
 Error:
 -----
 <artificial>:(.text.startup+0xc19): undefined reference to `pg_qsort'
<artificial>:(.text.startup+0xe81): undefined reference to `pg_fprintf'
<artificial>:(.text.startup+0xea6): undefined reference to `pg_fprintf'
<artificial>:(.text.startup+0xecb): undefined reference to `pg_fprintf'
<artificial>:(.text.startup+0xef0): undefined reference to `pg_fprintf

I checked that I have these packages installed on the system
[root@xxx ~]# yum install postgresql-devel
Followed the steps as :https://github.com/brianc/node-postgres/issues/124 
it not helped to resolve the issue.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #17100: undefined reference to `pg_qsort and pq_xxx
  2021-07-12 08:00 BUG #17100: undefined reference to `pg_qsort and pq_xxx PG Bug reporting form <noreply@postgresql.org>
@ 2021-07-12 15:57 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2021-07-12 15:57 UTC (permalink / raw)
  To: anilbommareddy09@gmail.com; +Cc: pgsql-bugs@lists.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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-07-12 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 08:00 BUG #17100: undefined reference to `pg_qsort and pq_xxx PG Bug reporting form <noreply@postgresql.org>
2021-07-12 15:57 ` Tom Lane <tgl@sss.pgh.pa.us>

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