Skip site navigation (1) Skip section navigation (2)

PGSQL 7.2.1 compile error on Red Hat 5.2 due to peercred

From: Joe Bernstein <joe(at)sfbooks(dot)com>
To: pgsql-ports(at)postgresql(dot)org
Subject: PGSQL 7.2.1 compile error on Red Hat 5.2 due to peercred
Date: 2002-04-14 03:24:15
Message-ID: (view raw or whole thread)
Lists: pgsql-ports
On attempts the last two weekends to compile first PostgreSQL 7.2,
then 7.2.1, I've run into the same error.

The machine is an i586 with a Linux on it that is ancestrally Red
Hat 5.2, kernel 2.3.2, but that has been hacked since and may since
have had another Linux installed over it (I'm not sure).  I do know
that I ran into trouble trying to install Perl 5.005_03 on it; that
it now has an installation of Perl 5.004_04 which may or may not be
later (I didn't put it there); that I have successfully installed 
trn 4.0-something on it.  So in other words it may be a broken OS,
but isn't totally broken.  The error with Perl had something to do
with SysV IPCs.

The error occurs, after a successful run of configure, when gmake
reaches src/backend/libpq/hba.c.  It goes like this:

gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/incl ude -I/opt/include -I/usr/local/ssl/include  -c hba.c -o hba.o
hba.c: In function `ident_unix':
hba.c:885: storage size of `peercred' isn't known
hba.c:885: warning: unused variable `peercred'
gmake[3]: *** [hba.o] Error 1
gmake[3]: Leaving directory
gmake[2]: *** [libpq-recursive] Error 2
gmake[2]: Leaving directory `/home/joe/postgresql-7.2.1/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/joe/postgresql-7.2.1/src'
gmake: *** [all] Error 2

I looked at hba.c.  I have never been good at C, and haven't looked at
it much at all since 1984, but it *looks* to me like the code there is
assuming that something will be implemented Just So, which obviously
isn't implemented Just So on this machine.  (Looking more carefully,
I see that there's an include earlier for a ucred.h, which is not
present in /usr/include/sys on this machine, or anywhere else that
whereis knows about.  I assume this is relevant since peercred is
declared as a struct of type ucred.)

I looked in Google.  It appears that the recent addition of peercred 
for authentication was meant to make ident authentication work in Linux
machines.  I hadn't actually planned to use ident authentication at all 
(but did see the posts saying that without it you can't run VACUUM; if 
that's true, why didn't the manual say so?).  It also appears that 
peercred is not the only way to make ident authentication work on Linux; 
it seems to be the preferred one, but I have the impression there
may even be other ways in the shipped source, let alone possible ways
not included there.

But I don't know C well, and certainly don't know how gcc works or 
how I can convince it not to care about something it considers bad 
code...  on this machine, anyway.

So look:  Is whatever may or may not be wrong with this machine 
concerning peercred so catastrophically wrong that I Must Not attempt
to run PostgreSQL?  If this is not the case, I'd really appreciate some
advice as to how I can change what to get the program to compile.

I have full logs of the configure and gmake runs, in case you need to
know anything more.


Joe Bernstein
joe(at)sfbooks(dot)com (which indicates why I'm trying to
compile PostgreSQL, by the way)


pgsql-ports by date

Next:From: Lamar OwenDate: 2002-04-14 03:48:22
Subject: PostgreSQL 7.2.1-2PGDG RPMs available for RedHat-skipjack 7.2.93 and RedHat 6.2/SPARC
Previous:From: renaud diezDate: 2002-04-11 09:34:20
Subject: problem with postgres and mandrake 8.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group