Error compiling PostgreSQL 7.4 for Fedora Core 1

Started by Jonathan Gardnerover 22 years ago6 messagesbugs
Jump to latest
#1Jonathan Gardner
jgardner@jonathangardner.net

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am trying to compile PostgreSQL 7.4 for Fedora Core 1. I used these
parameters to configure:

$ ./configure --prefix=/usr/local/postgresql-7.4

While running make, it returns the errors below.

Any ideas?

make -C bootstrap all
make[3]: Entering directory
`/home/jgardner/src/postgresql-7.4/src/backend/bootstrap'
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
- -Wmissing-declarations -I. -I../../../src/include -D_GNU_SOURCE -c -o
bootparse.o bootparse.c
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
- -Wmissing-declarations -I. -I../../../src/include -D_GNU_SOURCE -c -o
bootstrap.o bootstrap.c
bootstrap.c:118: error: `F_REGCLASSIN' undeclared here (not in a function)
bootstrap.c:118: error: initializer element is not constant
bootstrap.c:118: error: (near initialization for `Procid[8].inproc')
bootstrap.c:118: error: `F_REGCLASSOUT' undeclared here (not in a function)
bootstrap.c:118: error: initializer element is not constant
bootstrap.c:118: error: (near initialization for `Procid[8].outproc')
bootstrap.c:118: error: initializer element is not constant
bootstrap.c:118: error: (near initialization for `Procid[8]')
bootstrap.c:119: error: `F_REGTYPEIN' undeclared here (not in a function)
bootstrap.c:119: error: initializer element is not constant
bootstrap.c:119: error: (near initialization for `Procid[9].inproc')
bootstrap.c:119: error: `F_REGTYPEOUT' undeclared here (not in a function)
bootstrap.c:119: error: initializer element is not constant
bootstrap.c:119: error: (near initialization for `Procid[9].outproc')
bootstrap.c:119: error: initializer element is not constant
bootstrap.c:119: error: (near initialization for `Procid[9]')
bootstrap.c:120: error: initializer element is not constant
bootstrap.c:120: error: (near initialization for `Procid[10]')
bootstrap.c:121: error: initializer element is not constant
bootstrap.c:121: error: (near initialization for `Procid[11]')
bootstrap.c:122: error: initializer element is not constant
bootstrap.c:122: error: (near initialization for `Procid[12]')
bootstrap.c:123: error: initializer element is not constant
bootstrap.c:123: error: (near initialization for `Procid[13]')
bootstrap.c:124: error: initializer element is not constant
bootstrap.c:124: error: (near initialization for `Procid[14]')
bootstrap.c:125: error: initializer element is not constant
bootstrap.c:125: error: (near initialization for `Procid[15]')
bootstrap.c:126: error: initializer element is not constant
bootstrap.c:126: error: (near initialization for `Procid[16]')
bootstrap.c:127: error: initializer element is not constant
bootstrap.c:127: error: (near initialization for `Procid[17]')
bootstrap.c:128: error: initializer element is not constant
bootstrap.c:128: error: (near initialization for `Procid[18]')
make[3]: *** [bootstrap.o] Error 1
make[3]: Leaving directory
`/home/jgardner/src/postgresql-7.4/src/backend/bootstrap'
make[2]: *** [bootstrap-recursive] Error 2
make[2]: Leaving directory `/home/jgardner/src/postgresql-7.4/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/jgardner/src/postgresql-7.4/src'
make: *** [all] Error 2

- --
Jonathan Gardner
jgardner@jonathangardner.net
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/0tskWgwF3QvpWNwRAq0UAKCHGD1cuuvTJR3P5eNdbR2W5Kd7+gCg6rJB
LVJubC4t0st25mj6iPtcWu0=
=iJod
-----END PGP SIGNATURE-----

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jonathan Gardner (#1)
Re: Error compiling PostgreSQL 7.4 for Fedora Core 1

Jonathan Gardner <jgardner@jonathangardner.net> writes:

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
- -Wmissing-declarations -I. -I../../../src/include -D_GNU_SOURCE -c -o
bootstrap.o bootstrap.c
bootstrap.c:118: error: `F_REGCLASSIN' undeclared here (not in a function)

Hmmm ... this is evidently a variant of ye olde "Gen_fmgrtab.sh script
failed" problem, though I do not understand why you're seeing it in
bootstrap.c when other complainants see effects much earlier in the
build process. The known reasons for Gen_fmgrtab.sh to fail include
lack of awk or sed on the platform. But I've never been entirely
convinced that we fully understand the risks here --- can you dig into
it and find out what's failing and why?

regards, tom lane

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jonathan Gardner (#1)
Re: Error compiling PostgreSQL 7.4 for Fedora Core 1

Jonathan Gardner <jgardner@jonathangardner.net> writes:

On Sunday 07 December 2003 12:48 am, Tom Lane wrote:

Hmmm ... this is evidently a variant of ye olde "Gen_fmgrtab.sh script
failed" problem,

So far, this is what I have. I'm attaching fmgroids.h and fmgrtab.c ( I kno=
w=20
these are fairly sizable...)

That's really bizarre. For awhile I thought you might have fmgroids.h
and fmgrtab.c generated from some pre-7.4-release version of pg_proc.h,
but that theory doesn't seem to hold water --- for instance your files
include box_send() but not box_recv(), which were added in the same
commit. I don't see a pattern to the functions you are missing. Anyone
have a theory?

In the absence of any brilliant insight, I'd suggest slogging through
Gen_fmgrtab.sh to try to narrow down where functions are getting lost
--- add code to save the various intermediate files, and see what's in
'em.  If we knew exactly which step was losing the functions it'd be a
leg up.

Unfortunately, I am not familiar with the internals of awk and sed. If I=20
were hired to fix this for my platform (Fedora Core 1), I would probably=20
rewrite Gen_fmgrtab.sh in perl.

I can't see that as a plausible answer. With all due respect to Perl,
it's neither more portable nor more bug-free than awk/sed.

The only other option I see is to distribute the pre-generated fmgroids.h
and fmgrtab.c with the distribution.

We could fall back in that direction if we had to. But I'd like to
understand why we have to, first. Gen_fmgrtab.sh has worked on all our
supported platforms for a long time, and I'm disinclined to assume that
it's suddenly broken ... especially on what's presumably a modern
platform. I'm having a real problem with the idea that Fedora
incorporates a broken awk or sed.

regards, tom lane

#4Jonathan Gardner
jgardner@jonathangardner.net
In reply to: Tom Lane (#3)
Re: Error compiling PostgreSQL 7.4 for Fedora Core 1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 08 December 2003 9:33 pm, Tom Lane wrote:

In the absence of any brilliant insight, I'd suggest slogging through
Gen_fmgrtab.sh to try to narrow down where functions are getting lost
--- add code to save the various intermediate files, and see what's in
'em.  If we knew exactly which step was losing the functions it'd be a
leg up.

I just did this. I am no awk or sed expert. I can't see any faults in the
script other than it is difficult to read. My only thought is that some of
the regex behavior has changed, but I can't identify anything. The regexes
used here are very standard.

Unfortunately, in testing the bugger, it accidentally worked. I find this
most disturbing. However, I was pleasantly surprised that it failed at
least one more time before working properly.

Chalk the cause of this bug up as high-energy particles striking the memory
chip in just the right place at just the right time.

The only other thing I think might affect it is the fact that I was
simultaneously compiling PostgreSQL 7.3.4, reading email, and downloading
stuff. Perhaps there is a strange race condition in the make process. Of
course, the recent power outage in the area (that didn't affect us)
might've been a cause as well.

I apologize that I couldn't ease your pain, Tom. I know how it feels to see
the same bug pop up occasionally, only to be solved by hitting the "Redo"
key.

- --
Jonathan Gardner
jgardner@jonathangardner.net
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/1XQJWgwF3QvpWNwRAi0FAKCkPV+yn0y3kNT3AoHy5TX9a0v6NACaA7qI
PlIJfFguW4LNr+4RL535rIM=
=wWkP
-----END PGP SIGNATURE-----

#5Joe Conway
mail@joeconway.com
In reply to: Tom Lane (#3)
Re: Error compiling PostgreSQL 7.4 for Fedora Core 1

Tom Lane wrote:

We could fall back in that direction if we had to. But I'd like to
understand why we have to, first. Gen_fmgrtab.sh has worked on all our
supported platforms for a long time, and I'm disinclined to assume that
it's suddenly broken ... especially on what's presumably a modern
platform. I'm having a real problem with the idea that Fedora
incorporates a broken awk or sed.

I was able to rebuild from source rpm on a Fedora machine without any
problem, so I don't think it's a case of wholesale breakage. It's not my
normal development machine, but I'll try compiling from source [...tries...]
Yup, I got a clean build from source with the following configure line:

./configure \
--prefix=/usr/local/pgsql-7.4 \
--with-pgport=55434 \
--with-perl \
--with-tcl \
--with-tclconfig=/usr/lib \
--without-tk \
--with-python \
--enable-nls \
--enable-debug \
--enable-cassert \
--enable-depend \
--with-openssl \
--with-pam \
--enable-integer-datetimes \
--with-krb5=/usr/kerberos \
--with-includes=/usr/include/et/

The only adjustment from my RH9 box was the last line. Without it
com_err.h wasn't being found.

Joe

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jonathan Gardner (#4)
Re: Error compiling PostgreSQL 7.4 for Fedora Core 1

Jonathan Gardner <jgardner@jonathangardner.net> writes:

Unfortunately, in testing the bugger, it accidentally worked. I find this
most disturbing. However, I was pleasantly surprised that it failed at
least one more time before working properly.

Weird; there's no obvious reason for the script to be nondeterministic.

The only idea I can think of is that you were almost out of /tmp space
and the missing data got lost because of lack of space to put it. I'm
not sure whether awk/sed/etc would detect write failures on stdout.

regards, tom lane