BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail

Started by Jan-Peter Seifertabout 15 years ago3 messagesbugs
Jump to latest
#1Jan-Peter Seifert
Jan-Peter.Seifert@gmx.de

The following bug has been logged online:

Bug reference: 5878
Logged by: Jan-Peter Seifert
Email address: Jan-Peter.Seifert@gmx.de
PostgreSQL version: 8.4.7
Operating system: Ubuntu 10.04 LTS
Description: BTREE_BUILD_STATS causes 'make check' to fail
Details:

Hello,

I experimented a bit with compiling PostgreSQL with debug macros.
I set up a Makefile.custom with the following contents:
CFLAGS+=-DLOCK_DEBUG
CFLAGS+=-DBTREE_BUILD_STATS
CFLAGS+=-DWAL_DEBUG

However, as long as I have BTREE_BUILD_STATS defined, 'make check' fails on
me with the following message:
...
btree.c: In function ‘btbuild’:
nbtree.c:100: error: ‘log_btree_build_stats’ undeclared (first use in
this function)
nbtree.c:100: error: (Each undeclared identifier is reported only once
nbtree.c:100: error: for each function it appears in.)
nbtree.c:101: warning: implicit declaration of function ‘ResetUsage’
nbtree.c:146: warning: implicit declaration of function ‘ShowUsage’
...
Without this macro the server seems to install nicely.
Am I just doing something wrongly - I'm not really familiar with gcc?

Thank you very much,

Peter

In reply to: Jan-Peter Seifert (#1)
Re: BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail

Em 10-02-2011 09:56, Jan-Peter Seifert escreveu:

However, as long as I have BTREE_BUILD_STATS defined, 'make check' fails on
me with the following message:

It is a bug. The attached patch fixes it. I didn't investigate when it was
broken; maybe one or two releases ago when someone reorganizes the header
files. Those debug macros deserve a refactor but nobody bothers to do it yet.

--
Euler Taveira de Oliveira
http://www.timbira.com/

Attachments:

bbs.difftext/x-patch; name=bbs.diffDownload+2-0
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Euler Taveira de Oliveira (#2)
Re: BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail

Euler Taveira de Oliveira <euler@timbira.com> writes:

Em 10-02-2011 09:56, Jan-Peter Seifert escreveu:

However, as long as I have BTREE_BUILD_STATS defined, 'make check' fails on
me with the following message:

It is a bug. The attached patch fixes it. I didn't investigate when it was
broken; maybe one or two releases ago when someone reorganizes the header
files. Those debug macros deserve a refactor but nobody bothers to do it yet.

Confirmed here, will apply. I'll bet lunch that it got broken in
Bruce's last "remove unnecessary #includes" patch --- the process he
uses for that is utterly incapable of dealing with inclusions that
are needed only in certain cases.

regards, tom lane