Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-15 Thread G. Anthony Reina

Tom Lane wrote:

>
> That absolutely should NOT be necessary; there should be a proper
> extern declaration of strdup visible.  Perhaps it should be added
> to include/port/irix5.h (cf port/nextstep.h).
>
> regards, tom lane

Just to make sure, I tried compiling on another SGI. Everything went fine
without any kludgy workarounds. It looks like somehow my compiler/OS has
some problems. I'm upgrading to the latest OS version and compiler version.

Thanks for the help.

-Tony



---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-14 Thread Tom Lane

"G. Anthony Reina" <[EMAIL PROTECTED]> writes:
> which is how it looks to be used in async.c. I simply added a specific
> type-cast:

> notifyName = (char *) strdup(relname);

That absolutely should NOT be necessary; there should be a proper
extern declaration of strdup visible.  Perhaps it should be added
to include/port/irix5.h (cf port/nextstep.h).

regards, tom lane

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-14 Thread Tom Lane

"G. Anthony Reina" <[EMAIL PROTECTED]> writes:
> There's a new problem with async.c:

> cc-1515 cc: ERROR File = async.c, Line = 172
>   A value of type "int" cannot be assigned to an entity of type "char
> *".

> notifyName = strdup(relname);
>^

Evidently IRIX also considers strdup() to be nonstandard :-(

It's hard to believe that SGI is quite this braindead.  I think there is
something broken about configure on your setup.  Can't tell what from
here --- suggest you call in some IRIX gurus.

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-14 Thread G. Anthony Reina

Tom Lane wrote:

> > #if _XOPEN4UX || defined(_BSD_TYPES) || defined(_BSD_COMPAT)
>
> Next thought is that maybe none of these control symbols are defined
> by default --- could you look into that possibility?  Perhaps some
> compiler switches or #defines are needed to get IRIX to allow
> "struct timeval"?
>

> regards, tom lane

In xact.c, I added:

#define _BSD_COMPAT 1

before

#include 

It seems to get through that part of the compilation okay now. I'm not
sure if that will break anything else but it seems minor.

There's a new problem with async.c:

cc-1515 cc: ERROR File = async.c, Line = 172
  A value of type "int" cannot be assigned to an entity of type "char
*".

notifyName = strdup(relname);
   ^

1 error detected in the compilation of "async.c".
gmake[3]: *** [async.o] Error 2
gmake[3]: Leaving directory
`/usr/src/postgresql-7.1.1/src/backend/commands'
gmake[2]: *** [commands-recursive] Error 2
gmake[2]: Leaving directory `/usr/src/postgresql-7.1.1/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/src/postgresql-7.1.1/src'
gmake: *** [all] Error 2

It looks like I just need to change the code to explicitly cast the
variable.

-Tony




---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-14 Thread G. Anthony Reina

Tom Lane wrote:

> Evidently IRIX also considers strdup() to be nonstandard :-(
>
> It's hard to believe that SGI is quite this braindead.  I think there is
> something broken about configure on your setup.  Can't tell what from
> here --- suggest you call in some IRIX gurus.
>

Yep. So goes SGI. I can't figure out why this error is showing up. When I
looked at the man page for strdup:

char *strdup (const char *s1);

which is how it looks to be used in async.c. I simply added a specific
type-cast:

notifyName = (char *) strdup(relname);

and it compiled async.c fine (of course, now I'll have to go through some
of the other files that also have strdup and change them).

I'm going to see if the SGI technical support considers this a bug or not.

-Tony





---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-14 Thread Tom Lane

"G. Anthony Reina" <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Hm.  Which system header file defines struct timeval on IRIX?
>> I'd expect  or , but maybe they keep it
>> someplace unusual.

> In /usr/include/sys/time.h:

> #if _XOPEN4UX || defined(_BSD_TYPES) || defined(_BSD_COMPAT)

Next thought is that maybe none of these control symbols are defined
by default --- could you look into that possibility?  Perhaps some
compiler switches or #defines are needed to get IRIX to allow
"struct timeval"?

regards, tom lane

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-14 Thread G. Anthony Reina

Tom Lane wrote:

> > cc-1070 cc: ERROR File = xact.c, Line = 696
> >   The indicated type is incomplete.
>
> > struct timeval delay;
> >^
>
> Hm.  Which system header file defines struct timeval on IRIX?
> I'd expect  or , but maybe they keep it
> someplace unusual.

In /usr/include/sys/time.h:

#if _XOPEN4UX || defined(_BSD_TYPES) || defined(_BSD_COMPAT)
/*
 * Structure returned by gettimeofday(2) system call,
 * and used in other calls.
 * Note this is also defined in sys/resource.h
 */
#ifndef _TIMEVAL_T
#define _TIMEVAL_T
struct timeval {
#if _MIPS_SZLONG == 64
 __int32_t :32;
#endif
 time_t tv_sec;  /* seconds */
 long tv_usec; /* and microseconds */
};


-Tony



---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [HACKERS] Installation on SGI IRIX 6.5.10

2001-05-12 Thread Tom Lane

"G. Anthony Reina" <[EMAIL PROTECTED]> writes:
> In addition to my RedHat 6.2 server, I'm installing Postgres 7.1.1 on an
> SGI O2 (IRIX 6.5.10). The configure works, but the 'gmake all' fails
> when it tries to compile 'xact.c':

> cc-1521 cc: WARNING File = /usr/include/setjmp.h, Line = 26
>   A nonstandard preprocessing directive is used.

>   #ident "$Revision: 1.36 $"
>^

That looks like IRIX's own fault.  If their compiler doesn't like their
own , it's their issue to resolve ...

> cc-1070 cc: ERROR File = xact.c, Line = 696
>   The indicated type is incomplete.

> struct timeval delay;
>^

Hm.  Which system header file defines struct timeval on IRIX?
I'd expect  or , but maybe they keep it
someplace unusual.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[HACKERS] Installation on SGI IRIX 6.5.10

2001-05-11 Thread G. Anthony Reina

In addition to my RedHat 6.2 server, I'm installing Postgres 7.1.1 on an
SGI O2 (IRIX 6.5.10). The configure works, but the 'gmake all' fails
when it tries to compile 'xact.c':

cc-1521 cc: WARNING File = /usr/include/setjmp.h, Line = 26
  A nonstandard preprocessing directive is used.

  #ident "$Revision: 1.36 $"
   ^

cc-1070 cc: ERROR File = xact.c, Line = 696
  The indicated type is incomplete.

struct timeval delay;
   ^

1 error detected in the compilation of "xact.c".
gmake[4]: *** [xact.o] Error 2
gmake[4]: Leaving directory
`/usr/src/postgresql-7.1.1/src/backend/access/transam'
gmake[3]: *** [transam-recursive] Error 2
gmake[3]: Leaving directory
`/usr/src/postgresql-7.1.1/src/backend/access'
gmake[2]: *** [access-recursive] Error 2
gmake[2]: Leaving directory `/usr/src/postgresql-7.1.1/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/src/postgresql-7.1.1/src'
gmake: *** [all] Error 2
o21.nsi.edu:postgres::/usr/src/postgresql-7.1.1 >

I'm using the SGI MIPSPro 7.1 C compiler. I haven't had any problems
like this when compiling previous versions of Postgres. If necessary, I
could try to get gcc instead of the MIPSPro compiler, but I wonder if
the xact.c definition for timeval could be modified to pass on my
machine.

Thanks.
-Tony



---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])