Error installing Postgres on Solaris 9

Started by Thanh Q Lamalmost 21 years ago13 messagesbugs
Jump to latest
#1Thanh Q Lam
thanh.q.lam@alcatel.com

Hi,

when I run: ./configure --without-readline, I get errors that aborts the configure process: "checking types of arguments for accept()...
configure: error: could not determine argument types".
Please see following from the config.log.

Thanks,
Thanh

configure:10983: gcc -c -O2 -fno-strict-aliasing conftest.c >&5
In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class
configure:10986: $? = 1
configure: failed program was:
#line 10958 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern unsigned int PASCAL accept (unsigned int, void *, socklen_t *);
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

;
return 0;
}
configure:10983: gcc -c -O2 -fno-strict-aliasing conftest.c >&5
In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class
configure:10986: $? = 1
configure: failed program was:
#line 10958 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern unsigned int PASCAL accept (unsigned int, void *, unsigned int *);
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

;
return 0;
}
configure:10983: gcc -c -O2 -fno-strict-aliasing conftest.c >&5
In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class
configure:10986: $? = 1
configure: failed program was:
#line 10958 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern unsigned int PASCAL accept (unsigned int, void *, void *);
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

;
return 0;
}
configure:11006: error: could not determine argument types

#2Thanh Q Lam
thanh.q.lam@alcatel.com
In reply to: Thanh Q Lam (#1)

Hi,

when I run: ./configure --without-readline, I get errors that aborts the
configure process: "checking types of arguments for accept()...
configure: error: could not determine argument types". Please see
following from the config.log.

Thanks,
Thanh

Show quoted text

configure:10983: gcc -c -O2 -fno-strict-aliasing conftest.c >&5
In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class
configure:10986: $? = 1
configure: failed program was:
#line 10958 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern unsigned int PASCAL accept (unsigned int, void *, socklen_t *);
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

;
return 0;
}
configure:10983: gcc -c -O2 -fno-strict-aliasing conftest.c >&5
In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class
configure:10986: $? = 1
configure: failed program was:
#line 10958 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern unsigned int PASCAL accept (unsigned int, void *, unsigned int *);
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

;
return 0;
}
configure:10983: gcc -c -O2 -fno-strict-aliasing conftest.c >&5
In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class
configure:10986: $? = 1
configure: failed program was:
#line 10958 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
extern unsigned int PASCAL accept (unsigned int, void *, void *);
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{

;
return 0;
}
configure:11006: error: could not determine argument types

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thanh Q Lam (#2)
Re: Error installing Postgres on Solaris 9

Thanh Q Lam <thanh.q.lam@alcatel.com> writes:

when I run: ./configure --without-readline, I get errors that aborts the
configure process: "checking types of arguments for accept()...
configure: error: could not determine argument types".

In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class

Hmm --- the "parse error" suggests that sys/socket.h on your platform
has some inclusion dependency that we are failing to provide for. Can
you find out what it is? (Hint: look for "projid_t")

regards, tom lane

#4Thanh Q Lam
thanh.q.lam@alcatel.com
In reply to: Tom Lane (#3)
Re: Error installing Postgres on Solaris 9

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Tom,<br>
<br>
Thanks for your quick reply!<br>
I have looked into those system header files, and don't know what
they're for because I'm not a C programmer :-(<br>
<br>
Following is the Data block descriptor in the stream.h file that
declares the projid_t.<br>
<br>
<br>
Thanks again,<br>
Thanh<br>
<br>
/*<br>
&nbsp;* Data block descriptor<br>
&nbsp;*<br>
&nbsp;* NOTE: db_base, db_lim, db_ref and db_type are the *only* public
fields,<br>
&nbsp;* as described in datab(9S).&nbsp; Everything else is
implementation-private.<br>
&nbsp;*/<br>
<br>
#define&nbsp;&nbsp;&nbsp; DBLK_REFMAX&nbsp;&nbsp;&nbsp; 255U<br>
<br>
typedef struct datab {<br>
&nbsp;&nbsp;&nbsp; frtn_t&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *db_frtnp;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; *db_base;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; *db_lim;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; db_ref;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; db_type;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; db_flags;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; db_struioflag;<br>
&nbsp;&nbsp;&nbsp; void&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *db_cache;&nbsp;&nbsp;&nbsp; /* kmem cache descriptor */<br>
&nbsp;&nbsp;&nbsp; struct msgb&nbsp;&nbsp;&nbsp; *db_mblk;<br>
&nbsp;&nbsp;&nbsp; void&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (*db_free)(struct msgb *, struct datab *);<br>
&nbsp;&nbsp;&nbsp; void&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (*db_lastfree)(struct msgb *, struct datab *);<br>
#ifndef _LP64<br>
&nbsp;&nbsp;&nbsp; void&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *db_pad;&nbsp;&nbsp;&nbsp; /* unused -- needed for alignment */<br>
#endif<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; *db_struiobase;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; *db_struiolim;<br>
&nbsp;&nbsp;&nbsp; unsigned char&nbsp;&nbsp;&nbsp; *db_struioptr;<br>
&nbsp;&nbsp;&nbsp; union {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; double enforce_alignment;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; unsigned char data[8];<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; unsigned u16:16;&nbsp;&nbsp;&nbsp; /* used to store hw-calculated cksum */<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /*<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;* Union used for future extensions (pointer to data ?).<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;*/<br>
&nbsp;&nbsp;&nbsp; } db_struioun;<br>
&nbsp;&nbsp;&nbsp; fthdr_t&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *db_fthdr;<br>
&nbsp;&nbsp;&nbsp; ftflw_t&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ***db_ftflw;<br>
&nbsp;&nbsp;&nbsp; uid_t&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; db_uid;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* Effective user id */<br>
&nbsp;&nbsp;&nbsp; /* project ID - EXPERIMENTAL - may change in future release */<br>
&nbsp;&nbsp;&nbsp; projid_t&nbsp;&nbsp;&nbsp; db_projid;<br>
} dblk_t;<br>
<br>
<br>
Tom Lane wrote:<br>
<blockquote type="cite" cite="mid25025.1120587907@sss.pgh.pa.us">
<pre wrap="">Thanh Q Lam <a class="moz-txt-link-rfc2396E" href="mailto:thanh.q.lam@alcatel.com">&lt;thanh.q.lam@alcatel.com&gt;</a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">when I run: ./configure --without-readline, I get errors that aborts the
configure process: "checking types of arguments for accept()...
configure: error: could not determine argument types".
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">In file included from /usr/include/netinet/in.h:41,
from /usr/include/sys/socket.h:203,
from configure:10963:
/usr/include/sys/stream.h:307: parse error before "projid_t"
configure:10965: parse error before "accept"
configure:10965: conflicting types for `accept'
/usr/include/sys/socket.h:450: previous declaration of `accept'
configure:10965: warning: data definition has no type or storage class
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
Hmm --- the "parse error" suggests that sys/socket.h on your platform
has some inclusion dependency that we are failing to provide for. Can
you find out what it is? (Hint: look for "projid_t")

regards, tom lane
</pre>
</blockquote>
</body>
</html>

#5Michael Fuhr
mike@fuhr.org
In reply to: Tom Lane (#3)
Re: Error installing Postgres on Solaris 9

On Tue, Jul 05, 2005 at 02:25:07PM -0400, Tom Lane wrote:

Hmm --- the "parse error" suggests that sys/socket.h on your platform
has some inclusion dependency that we are failing to provide for. Can
you find out what it is? (Hint: look for "projid_t")

I wonder what's different between Thanh's Solaris 9 box and mine.
Mine's a sparc with all recommended patches; my compiler is gcc
3.4.2. I can build all versions of PostgreSQL from 7.2 through
HEAD (all from CVS) without any problems.

What version of PostgreSQL is this? Based on the line numbers in
the configure script I'd guess 7.4.X.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Fuhr (#5)
Re: Error installing Postgres on Solaris 9

Michael Fuhr <mike@fuhr.org> writes:

On Tue, Jul 05, 2005 at 02:25:07PM -0400, Tom Lane wrote:

Hmm --- the "parse error" suggests that sys/socket.h on your platform
has some inclusion dependency that we are failing to provide for. Can
you find out what it is? (Hint: look for "projid_t")

I wonder what's different between Thanh's Solaris 9 box and mine.

It would be useful for you guys to compare the results of

cd /usr/include
grep projid_t *.h */*.h

regards, tom lane

#7Michael Fuhr
mike@fuhr.org
In reply to: Tom Lane (#6)
Re: Error installing Postgres on Solaris 9

On Tue, Jul 05, 2005 at 03:27:49PM -0400, Tom Lane wrote:

Michael Fuhr <mike@fuhr.org> writes:

I wonder what's different between Thanh's Solaris 9 box and mine.

It would be useful for you guys to compare the results of

cd /usr/include
grep projid_t *.h */*.h

Results from my box attached. Here are some other tidbits:

% ls -l `grep -l projid_t *.h */*.h`
-rw-r--r-- 1 root bin 18587 Apr 6 2002 nss_dbdefs.h
-rw-r--r-- 1 root bin 1681 Apr 6 2002 project.h
-rw-r--r-- 1 root bin 4129 May 23 2002 sys/exacct_impl.h
-rw-r--r-- 1 root bin 31559 Mar 18 2004 sys/procfs.h
-rw-r--r-- 1 root bin 1063 Apr 6 2002 sys/project.h
-rw-r--r-- 1 root bin 25923 Mar 18 2004 sys/stream.h
-rw-r--r-- 1 root bin 1890 Apr 6 2002 sys/task.h
-rw-r--r-- 1 root bin 16231 May 17 09:51 sys/types.h
-rw-r--r-- 1 root bin 3530 Apr 6 2002 userdefs.h

% what `grep -l projid_t *.h */*.h`
nss_dbdefs.h:
nss_dbdefs.h 1.32 01/02/08 SMI
project.h:
project.h 1.3 01/09/14 SMI
userdefs.h:
userdefs.h 1.13 01/09/20 SMI
sys/exacct_impl.h:
exacct_impl.h 1.4 02/03/15 SMI
sys/procfs.h:
procfs.h 1.23 02/10/08 SMI
sys/project.h:
project.h 1.4 01/09/07 SMI
sys/stream.h:
stream.h 1.92 03/01/28 SMI
sys/task.h:
task.h 1.3 01/04/05 SMI
sys/types.h:
types.h 1.75 04/01/06 SMI

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Attachments:

projid.txttext/plain; charset=us-asciiDownload
#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Fuhr (#7)
Re: Error installing Postgres on Solaris 9

Michael Fuhr <mike@fuhr.org> writes:

sys/types.h:typedef id_t projid_t;

Well, we certainly include sys/types.h before including sys/socket.h.
I wonder if the problem is that that typedef is inside an #if that
for some reason is not firing on Thanh's setup?

regards, tom lane

#9Michael Fuhr
mike@fuhr.org
In reply to: Michael Fuhr (#7)
Re: Error installing Postgres on Solaris 9

On Tue, Jul 05, 2005 at 01:46:42PM -0600, Michael Fuhr wrote:

On Tue, Jul 05, 2005 at 03:27:49PM -0400, Tom Lane wrote:

Michael Fuhr <mike@fuhr.org> writes:

I wonder what's different between Thanh's Solaris 9 box and mine.

It would be useful for you guys to compare the results of

cd /usr/include
grep projid_t *.h */*.h

Results from my box attached.

I just ran truss on gcc and noticed that it's reading <sys/types.h>
from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/include/sys/types.h
instead of from /usr/include/sys/types.h. I don't know if that
matters; I've attached the diff of the two.

Thanh, what compiler are you using?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Attachments:

types.h.difftext/plain; charset=us-asciiDownload+49-51
#10Thanh Q Lam
thanh.q.lam@alcatel.com
In reply to: Michael Fuhr (#7)
Re: Error installing Postgres on Solaris 9

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;charset=ISO-8859-15">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Tom/Michael,<br>
<br>
To answer Michael's question, I'm trying to install 7.4.8 on Solaris
9.ᅵ I tried 8.0 which failed at the same problem.<br>
<br>
Here is the result of grep from my box:<br>
<br>
ᅵ nsmapp1{postgres}: usr/include&gt; grep projid_t *.h */*.h<br>
nss_dbdefs.h:ᅵᅵᅵ projid_tᅵᅵᅵ projid;<br>
project.h:ᅵᅵᅵ projid_t pj_projid;ᅵᅵᅵ /* numerical project id */<br>
project.h:extern struct project *getprojbyid(projid_t, struct project
*, void *, size_t);<br>
project.h:extern projid_t getprojidbyname(const char *);<br>
project.h:extern projid_t getprojid(void);<br>
project.h:extern projid_t setproject(const char *, const char *, int);<br>
project.h:extern int project_walk(int (*)(projid_t, void *), void *);<br>
userdefs.h:ᅵᅵᅵ projid_t defproj;ᅵᅵᅵ /* default project id */<br>
sys/exacct_impl.h:ᅵᅵᅵ projid_t pu_projid;ᅵᅵᅵ /* project ID */<br>
sys/exacct_impl.h:ᅵᅵᅵ projid_t fu_projid;ᅵᅵᅵ /* project ID */<br>
sys/procfs.h:ᅵᅵᅵ projid_t pr_projid;ᅵᅵᅵ /* project id */<br>
sys/procfs.h:ᅵᅵᅵ projid_t pr_projid;ᅵᅵᅵ /* project id */<br>
sys/project.h:ᅵᅵᅵ projid_t ᅵᅵᅵ kpj_id;ᅵᅵᅵ ᅵᅵᅵ /* project IDᅵᅵᅵ ᅵᅵᅵ */<br>
sys/project.h:kproject_t *project_hold_by_id(projid_t, int);<br>
sys/project.h:projid_t curprojid(void);<br>
sys/stream.h:ᅵᅵᅵ projid_tᅵᅵᅵ db_projid;<br>
sys/task.h:extern task_t *task_create(projid_t);<br>
sys/task.h:extern taskid_t settaskid(projid_t, uint_t);<br>
sys/types.h:typedef id_tᅵᅵᅵ projid_t;<br>
<br>
ᅵ nsmapp1{postgres}: usr/include&gt; ls -l `grep -l projid_t *.h */*.h`<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵ 18587 Aprᅵ 6ᅵ 2002 nss_dbdefs.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵᅵ 1681 Aprᅵ 6ᅵ 2002 project.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵᅵ 4129 May 23ᅵ 2002 sys/exacct_impl.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵ 31559 Mar 18ᅵ 2004 sys/procfs.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵᅵ 1063 Aprᅵ 6ᅵ 2002 sys/project.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵ 25923 Mar 18ᅵ 2004 sys/stream.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵᅵ 1890 Aprᅵ 6ᅵ 2002 sys/task.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵ 16231 Mayᅵ 3 11:40 sys/types.h<br>
-rw-r--r--ᅵᅵ 1 rootᅵᅵᅵᅵ binᅵᅵᅵᅵᅵᅵᅵᅵ 3530 Aprᅵ 6ᅵ 2002 userdefs.h<br>
<br>
ᅵ nsmapp1{postgres}: usr/include&gt; what `grep -l projid_t *.h */*.h`<br>
nss_dbdefs.h:<br>
ᅵᅵᅵ nss_dbdefs.hᅵᅵᅵ 1.32ᅵᅵᅵ 01/02/08 SMI<br>
project.h:<br>
ᅵᅵᅵ project.hᅵᅵᅵ 1.3ᅵᅵᅵ 01/09/14 SMI<br>
userdefs.h:<br>
ᅵᅵᅵ userdefs.hᅵᅵᅵ 1.13ᅵᅵᅵ 01/09/20 SMI<br>
sys/exacct_impl.h:<br>
ᅵᅵᅵ exacct_impl.hᅵᅵᅵ 1.4ᅵᅵᅵ 02/03/15 SMI<br>
sys/procfs.h:<br>
ᅵᅵᅵ procfs.hᅵᅵᅵ 1.23ᅵᅵᅵ 02/10/08 SMI<br>
sys/project.h:<br>
ᅵᅵᅵ project.hᅵᅵᅵ 1.4ᅵᅵᅵ 01/09/07 SMI<br>
sys/stream.h:<br>
ᅵᅵᅵ stream.hᅵᅵᅵ 1.92ᅵᅵᅵ 03/01/28 SMI<br>
sys/task.h:<br>
ᅵᅵᅵ task.hᅵᅵᅵ 1.3ᅵᅵᅵ 01/04/05 SMI<br>
sys/types.h:<br>
ᅵᅵᅵ types.hᅵᅵᅵ 1.75ᅵᅵᅵ 04/01/06 SMI<br>
<br>
<br>
Michael Fuhr wrote:<br>
<blockquote type="cite" cite="mid20050705194642.GA98704@winnie.fuhr.org">
<pre wrap="">On Tue, Jul 05, 2005 at 03:27:49PM -0400, Tom Lane wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Michael Fuhr <a class="moz-txt-link-rfc2396E" href="mailto:mike@fuhr.org">&lt;mike@fuhr.org&gt;</a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">I wonder what's different between Thanh's Solaris 9 box and mine.
</pre>
</blockquote>
<pre wrap="">It would be useful for you guys to compare the results of

cd /usr/include
grep projid_t *.h */*.h
</pre>
</blockquote>
<pre wrap=""><!---->
Results from my box attached. Here are some other tidbits:

% ls -l `grep -l projid_t *.h */*.h`
-rw-r--r-- 1 root bin 18587 Apr 6 2002 nss_dbdefs.h
-rw-r--r-- 1 root bin 1681 Apr 6 2002 project.h
-rw-r--r-- 1 root bin 4129 May 23 2002 sys/exacct_impl.h
-rw-r--r-- 1 root bin 31559 Mar 18 2004 sys/procfs.h
-rw-r--r-- 1 root bin 1063 Apr 6 2002 sys/project.h
-rw-r--r-- 1 root bin 25923 Mar 18 2004 sys/stream.h
-rw-r--r-- 1 root bin 1890 Apr 6 2002 sys/task.h
-rw-r--r-- 1 root bin 16231 May 17 09:51 sys/types.h
-rw-r--r-- 1 root bin 3530 Apr 6 2002 userdefs.h

% what `grep -l projid_t *.h */*.h`
nss_dbdefs.h:
nss_dbdefs.h 1.32 01/02/08 SMI
project.h:
project.h 1.3 01/09/14 SMI
userdefs.h:
userdefs.h 1.13 01/09/20 SMI
sys/exacct_impl.h:
exacct_impl.h 1.4 02/03/15 SMI
sys/procfs.h:
procfs.h 1.23 02/10/08 SMI
sys/project.h:
project.h 1.4 01/09/07 SMI
sys/stream.h:
stream.h 1.92 03/01/28 SMI
sys/task.h:
task.h 1.3 01/04/05 SMI
sys/types.h:
types.h 1.75 04/01/06 SMI

</pre>
<pre wrap="">
<hr width="90%" size="4">
nss_dbdefs.h: projid_t projid;
project.h: projid_t pj_projid; /* numerical project id */
project.h:extern struct project *getprojbyid(projid_t, struct project *, void *, size_t);
project.h:extern projid_t getprojidbyname(const char *);
project.h:extern projid_t getprojid(void);
project.h:extern projid_t setproject(const char *, const char *, int);
project.h:extern int project_walk(int (*)(projid_t, void *), void *);
userdefs.h: projid_t defproj; /* default project id */
sys/exacct_impl.h: projid_t pu_projid; /* project ID */
sys/exacct_impl.h: projid_t fu_projid; /* project ID */
sys/procfs.h: projid_t pr_projid; /* project id */
sys/procfs.h: projid_t pr_projid; /* project id */
sys/project.h: projid_t kpj_id; /* project ID */
sys/project.h:kproject_t *project_hold_by_id(projid_t, int);
sys/project.h:projid_t curprojid(void);
sys/stream.h: projid_t db_projid;
sys/task.h:extern task_t *task_create(projid_t);
sys/task.h:extern taskid_t settaskid(projid_t, uint_t);
sys/types.h:typedef id_t projid_t;
</pre>
</blockquote>
</body>
</html>

#11Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Fuhr (#9)
Re: Error installing Postgres on Solaris 9

Michael Fuhr <mike@fuhr.org> writes:

I just ran truss on gcc and noticed that it's reading <sys/types.h>
from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/include/sys/types.h
instead of from /usr/include/sys/types.h. I don't know if that
matters; I've attached the diff of the two.

Good catch. The diffs in this file don't seem relevant to our problem,
but maybe there are other substituted headers that *are* relevant
(such as ones defining symbols that are used in #if's in this header...)

regards, tom lane

#12Thanh Q Lam
thanh.q.lam@alcatel.com
In reply to: Michael Fuhr (#5)
Re: Error installing Postgres on Solaris 9

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;charset=ISO-8859-15">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
My compiler is gcc 3.2.<br>
<br>
<br>
Thanks,<br>
Thanh<br>
<br>
Michael Fuhr wrote:<br>
<blockquote type="cite" cite="mid20050705191819.GA98562@winnie.fuhr.org">
<pre wrap="">On Tue, Jul 05, 2005 at 02:25:07PM -0400, Tom Lane wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hmm --- the "parse error" suggests that sys/socket.h on your platform
has some inclusion dependency that we are failing to provide for. Can
you find out what it is? (Hint: look for "projid_t")
</pre>
</blockquote>
<pre wrap=""><!---->
I wonder what's different between Thanh's Solaris 9 box and mine.
Mine's a sparc with all recommended patches; my compiler is gcc
3.4.2. I can build all versions of PostgreSQL from 7.2 through
HEAD (all from CVS) without any problems.

What version of PostgreSQL is this? Based on the line numbers in
the configure script I'd guess 7.4.X.

</pre>
</blockquote>
</body>
</html>

#13Tom Lane
tgl@sss.pgh.pa.us
In reply to: Thanh Q Lam (#12)
Re: Error installing Postgres on Solaris 9

Thanh Q Lam <thanh.q.lam@alcatel.com> writes:

My compiler is gcc 3.2.

I wonder if the problem is that the modified system header files used by
your copy of gcc are too far out of sync with the actual headers under
/usr/include. Michael indicates he's using gcc 3.4.2 which'd presumably
be a lot newer build, and probably derived from newer /usr/include files.

You might try updating the gcc installation, or running the fixincludes
script to re-sync the modified headers with /usr/include.

regards, tom lane