master, static inline and #ifndef FRONTEND

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Dave Page <dpage(at)pgadmin(dot)org>
Subject: master, static inline and #ifndef FRONTEND
Date: 2018-08-24 15:42:37
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


In a recent commit [1] I added a static inline which castoroides
cc -D_STDC_C99= -Xa -g -m64 -xarch=native -xdepend -xO4 -xprefetch=auto,explicit pg_waldump.o compat.o xlogreader.o rmgrdesc.o brindesc.o clogdesc.o committsdesc.o dbasedesc.o genericdesc.o gindesc.o gistdesc.o hashdesc.o heapdesc.o logicalmsgdesc.o mxactdesc.o nbtdesc.o relmapdesc.o replorigindesc.o seqdesc.o smgrdesc.o spgdesc.o standbydesc.o tblspcdesc.o xactdesc.o xlogdesc.o -L../../../src/port -L../../../src/common -Wl,-R'/export/home/dpage/pgbuildfarm/castoroides/HEAD/inst/lib' -lpgcommon -lpgport -lpam -lgss -lz -lnsl -lrt -lsocket -lm -o pg_waldump
Undefined first referenced
symbol in file
slot_getsomeattrs rmgrdesc.o

So it's the "old" issue of static inlines referencing functions that
aren't present, which newer compilers don't have.

It's obviously trivial to fix this case with by adding an #ifndef
FRONTEND. But as castoroides appears to be the only animal showing the
problem - after subtracting the animals dead due to the C99 requirement
- I wonder if we shouldn't just require "proper" static inline
support. castoroides runs a 13yo OS, and newer compilers that do not
have the problem are readily available.

I think it's very likely that we'll add more and more static inlines,
and having to either experimentally check via the buildfarm, or just add
#ifndef FRONTEND everywhere is pretty annoying.


Andres Freund



Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-08-24 15:46:23 Re: Windows vs C99 (was Re: C99 compliance for src/port/snprintf.c)
Previous Message Konstantin Knizhnik 2018-08-24 15:36:52 Re: [HACKERS] Cached plans and statement generalization