pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem with ucred.h building 7.2.1
4+ messages / 3 participants
[nested] [flat]

* Problem with ucred.h building 7.2.1
@ 2002-05-26 14:55 Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
  2002-05-26 16:07 ` Re: Problem with ucred.h building 7.2.1 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Niclas Gustafsson @ 2002-05-26 14:55 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I'm having some trouble compiling 7.2.1 on one of our machines,
It's a linux box running SuSE 6.0, with kernel version 2.2.14.

I'm configuring with:
./configure  --enable-locale --enable-multibyte=LATIN1 --with-openssl
(even tried with a clean ./configure)

Compiling goes fine until the hba.c file:
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/include -I/usr/local/ssl/include  -c crypt.c -o crypt.o
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/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'
make[3]: *** [hba.o] Error 1
make[3]: Leaving directory `/usr/src/postgresql-7.2.1/src/backend/libpq'
make[2]: *** [libpq-recursive] Error 2
make[2]: Leaving directory `/usr/src/postgresql-7.2.1/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/postgresql-7.2.1/src'
make: *** [all] Error 2

line 885 looks like:
        struct ucred peercred;

When inspecting the config.log file I encounter the
following:

configure:5878: checking for struct cmsgcred
configure:5892: gcc -c -O2   -I/usr/local/ssl/include conftest.c 1>&5
configure:5886: sys/ucred.h: No such file or directory
configure: failed program was:
#line 5883 "configure"
#include "confdefs.h"
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/ucred.h>
int main() {
struct cmsgcred sockcred;
; return 0; }
configure:5912: checking for struct fcred
configure:5926: gcc -c -O2   -I/usr/local/ssl/include conftest.c 1>&5
.
.
.
No wonder it couldn't find the storage size of peercred.
After searching the system I see that I do not have the ucred.h
anywhere.
However I find the ucred definition in /usr/include/linux/socket.h as
struct ucred {
        __u32   pid;
        __u32   uid;
        __u32   gid;
};

So does anyone have a workaround this problem? Anyone tried to compile
7.2.1 on a SuSE 6.0? :)
I'm not that thrilled at the idea of installing another dist. on the
machine, as it is up and running a lot of services that is important to me.


Regards,

Niclas Gustafsson





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

* Re: Problem with ucred.h building 7.2.1
  2002-05-26 14:55 Problem with ucred.h building 7.2.1 Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
@ 2002-05-26 16:07 ` Tom Lane <tgl@sss.pgh.pa.us>
  2002-05-26 21:00   ` Re: Problem with ucred.h building 7.2.1 Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2002-05-26 16:07 UTC (permalink / raw)
  To: Niclas Gustafsson <Niclas.Gustafsson@codesense.com>; +Cc: pgsql-admin

Niclas Gustafsson <Niclas.Gustafsson@codesense.com> writes:
> I'm having some trouble compiling 7.2.1 on one of our machines,
> It's a linux box running SuSE 6.0, with kernel version 2.2.14.
> ...
> After searching the system I see that I do not have the ucred.h
> anywhere.
> However I find the ucred definition in /usr/include/linux/socket.h as

Yeah, we've heard a couple of prior reports to the effect that this code
is not sufficiently configurable.  I'm a bit confused though ---- hba.c
pulls in <sys/socket.h>, doesn't that include <linux/socket.h> ?  Seems
like it should work...

			regards, tom lane



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

* Re: Problem with ucred.h building 7.2.1
  2002-05-26 14:55 Problem with ucred.h building 7.2.1 Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
  2002-05-26 16:07 ` Re: Problem with ucred.h building 7.2.1 Tom Lane <tgl@sss.pgh.pa.us>
@ 2002-05-26 21:00   ` Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
  2002-06-07 22:44     ` Re: Problem with ucred.h building 7.2.1 Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Niclas Gustafsson @ 2002-05-26 21:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

> Niclas Gustafsson <Niclas.Gustafsson@codesense.com> writes:
>> I'm having some trouble compiling 7.2.1 on one of our machines,
>> It's a linux box running SuSE 6.0, with kernel version 2.2.14.
>> ...
>> After searching the system I see that I do not have the ucred.h
>> anywhere.
>> However I find the ucred definition in /usr/include/linux/socket.h as

> Yeah, we've heard a couple of prior reports to the effect that this code
> is not sufficiently configurable.  I'm a bit confused though ---- hba.c
> pulls in <sys/socket.h>, doesn't that include <linux/socket.h> ?  Seems
> like it should work...

Nope, It does not include linux/socket.h.
It only includes the following:

#include <features.h>
#include <stddef.h>
#include <socketbits.h>

And noone of them includes linux/socket.h

I made a rather crude insert into hba.h

struct ucred {
       unsigned int   pid;
       unsigned int   uid;
       unsigned int   gid;
};

And with that it passed both the compilation and regression tests.

Regards,

Niclas Gustafsson





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

* Re: Problem with ucred.h building 7.2.1
  2002-05-26 14:55 Problem with ucred.h building 7.2.1 Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
  2002-05-26 16:07 ` Re: Problem with ucred.h building 7.2.1 Tom Lane <tgl@sss.pgh.pa.us>
  2002-05-26 21:00   ` Re: Problem with ucred.h building 7.2.1 Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
@ 2002-06-07 22:44     ` Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 2002-06-07 22:44 UTC (permalink / raw)
  To: Niclas Gustafsson <Niclas.Gustafsson@codesense.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin


In the only other creds failure I can remember on Linux, it was caused
by someone updating their partially system headers, but not completely.

---------------------------------------------------------------------------

Niclas Gustafsson wrote:
> > Niclas Gustafsson <Niclas.Gustafsson@codesense.com> writes:
> >> I'm having some trouble compiling 7.2.1 on one of our machines,
> >> It's a linux box running SuSE 6.0, with kernel version 2.2.14.
> >> ...
> >> After searching the system I see that I do not have the ucred.h
> >> anywhere.
> >> However I find the ucred definition in /usr/include/linux/socket.h as
> 
> > Yeah, we've heard a couple of prior reports to the effect that this code
> > is not sufficiently configurable.  I'm a bit confused though ---- hba.c
> > pulls in <sys/socket.h>, doesn't that include <linux/socket.h> ?  Seems
> > like it should work...
> 
> Nope, It does not include linux/socket.h.
> It only includes the following:
> 
> #include <features.h>
> #include <stddef.h>
> #include <socketbits.h>
> 
> And noone of them includes linux/socket.h
> 
> I made a rather crude insert into hba.h
> 
> struct ucred {
>        unsigned int   pid;
>        unsigned int   uid;
>        unsigned int   gid;
> };
> 
> And with that it passed both the compilation and regression tests.
> 
> Regards,
> 
> Niclas Gustafsson
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



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


end of thread, other threads:[~2002-06-07 22:44 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-05-26 14:55 Problem with ucred.h building 7.2.1 Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
2002-05-26 16:07 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-05-26 21:00   ` Niclas Gustafsson <Niclas.Gustafsson@codesense.com>
2002-06-07 22:44     ` Bruce Momjian <pgman@candle.pha.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