pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL always uses own versions of *printf(), but does not export them
2+ messages / 2 participants
[nested] [flat]

* PostgreSQL always uses own versions of *printf(), but does not export them
@ 2020-06-23 11:12 Patrik Novotny <panovotn@redhat.com>
  2020-06-23 14:14 ` Re: PostgreSQL always uses own versions of *printf(), but does not export them Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Patrik Novotny @ 2020-06-23 11:12 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

Hi,

we came across an issue when compiling projects against PostgreSQL
version >=12, as the *printf symbols seems not to be properly
exported.

Build log example:
/builddir/build/BUILDROOT/gambas3-3.14.3-3.fc33.x86_64/usr/bin/gbi3:
symbol lookup error:
/builddir/build/BUILDROOT/gambas3-3.14.3-3.fc33.x86_64/usr/lib64/gambas3/gb.db.postgresql.so:
undefined symbol: pg_fprintf

Are we missing some steps required for building against PostgreSQL
version >=12, or is this an unexpected error?

Also, the issue seems to be related to this commit[1], and more
details can be found in the original Fedora bug report[2].

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=96bf88d52711ad3a0a4cc2d1d9cb0e2acab85...
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1849884


Thanks! Regards

Patrik Novotný
Associate Software Engineer
Red Hat
panovotn@redhat.com






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

* Re: PostgreSQL always uses own versions of *printf(), but does not export them
  2020-06-23 11:12 PostgreSQL always uses own versions of *printf(), but does not export them Patrik Novotny <panovotn@redhat.com>
@ 2020-06-23 14:14 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-06-23 14:14 UTC (permalink / raw)
  To: Patrik Novotny <panovotn@redhat.com>; +Cc: pgsql-bugs@lists.postgresql.org

Patrik Novotny <panovotn@redhat.com> writes:
> we came across an issue when compiling projects against PostgreSQL
> version >=12, as the *printf symbols seems not to be properly
> exported.

Possibly that external code is failing to link with libpgport?
We don't really support external code including our c.h ... but
anything that insists on doing so is very likely going to need
libpgport and/or libpgcommon.

But TBH I'd try to get rid of the inclusion, rather than let the
external code get further into bed with Postgres' internal
portability hacks.  We never have, and we never will, promise
that c.h remains stable across PG versions.

			regards, tom lane





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


end of thread, other threads:[~2020-06-23 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 11:12 PostgreSQL always uses own versions of *printf(), but does not export them Patrik Novotny <panovotn@redhat.com>
2020-06-23 14:14 ` 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