building 7.4.3 on Solaris 9/Intel

Started by David Parkeralmost 22 years ago7 messagesgeneral
Jump to latest
#1David Parker
dparker@tazznetworks.com

Hi. I'm trying to build 7.4.3 on Solaris 9/Intel (gcc 3.2.2), and I get
the following:

========================================================================
================
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -fPIC -I. -I../../../src/include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -DFRONTEND
-DSYSCONFDIR='"/home/dparker/servers/install/i386/etc/postgresql"' -c
-o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: too few arguments to function `getpwuid_r'
========================================================================
================

This is the code from thread.c:

========================================================================
================
#if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) &&
defined(NEED_REENTRANT_FUNCS) && defined(HAVE_GETPWUID_R)

#ifdef GETPWUID_R_5ARG
/* POSIX version */
getpwuid_r(uid, resultbuf, buffer, buflen, result);
#else
/*
* Early POSIX draft of getpwuid_r() returns 'struct passwd *'.
* getpwuid_r(uid, resultbuf, buffer, buflen)
*/
*result = getpwuid_r(uid, resultbuf, buffer, buflen);
#endif
#else
========================================================================
================

The check for getpwuid_r in configure appeared to work OK, but it looks
like the POSIX version of getpwuid_r is not being called. Is there some
other switch I need to pass to configure to get that GETPWUID_R_5ARG
defined? This is what I get in pg_config.h:

========================================================================
================
/* Define to 1 to build client libraries as thread-safe code.
(--enable-thread-safety) */
#define ENABLE_THREAD_SAFETY 1

/* Define to 1 if getpwuid_r() takes a 5th argument. */
/* #undef GETPWUID_R_5ARG */
========================================================================
================

Thanks. Any clues appreciated.

- DAP
======================================================
David Parker Tazz Networks (401) 709-5130

#2Jim Seymour
jseymour@LinxNet.com
In reply to: David Parker (#1)
Re: building 7.4.3 on Solaris 9/Intel

"David Parker" <dparker@tazznetworks.com> wrote:

Hi. I'm trying to build 7.4.3 on Solaris 9/Intel (gcc 3.2.2), and I get
the following:

========================================================================
================
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -fPIC -I. -I../../../src/include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -DFRONTEND
-DSYSCONFDIR='"/home/dparker/servers/install/i386/etc/postgresql"' -c
-o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: too few arguments to function `getpwuid_r'
========================================================================
================

[snip]

7.4.3? Are you sure? This should be fixed in 7.4.3.

From an earlier reply I made to somebody in the [ADMIN] mailing
list, regarding trying to build 7.4.2 on Solaris 8:

This is fixed in CVS. Or you can apply this patch

http://jimsun.linxnet.com/misc/pgsql-7.4.2.patch

to a freshly-extracted 7.4.2 tarball (*before* running configure).

Standard Disclaimer: No warranties, express or implied.

I'm running 7.4.2 on both a Sparc Solaris 7 and a Sparc Solaris 8
machine, with that patch.

Jim

#3David Parker
dparker@tazznetworks.com
In reply to: Jim Seymour (#2)
Re: building 7.4.3 on Solaris 9/Intel

Thanks for the response. Yup, I'm sure it's 7.4.3.

From the config.log, it looks like the check for getpwuid_r test program
uses -D_POSIX_PTHREAD_SEMANTICS, which turns on the POSIX version of the
call, but the check for "fifth argument" test compile doesn't include
this define, so it fails, and the GETPWUID_R_5ARG doesn't get set:

configure:13411: checking for getpwuid_r
configure:13454: gcc -o conftest -O2 -fno-strict-aliasing -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wl,-i,-z,defs,-z,
ignore,-z,lazyload conftest.c -lz -lrt -lresolv -lgen -lsocket -lnsl
-ldl -lm -lpthread >&5
configure:13457: $? = 0
configure:13460: test -s conftest
configure:13463: $? = 0
configure:13473: result: yes
configure:13411: checking for gethostbyname_r
configure:13454: gcc -o conftest -O2 -fno-strict-aliasing -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wl,-i,-z,defs,-z,
ignore,-z,lazyload conftest.c -lz -lrt -lresolv -lgen -lsocket -lnsl
-ldl -lm -lpthread >&5
configure:13457: $? = 0
configure:13460: test -s conftest
configure:13463: $? = 0
configure:13473: result: yes
configure:13485: checking whether getpwuid_r takes a fifth argument
configure:13515: gcc -c -O2 -fno-strict-aliasing conftest.c >&5
configure: In function `main':
configure:13507: too many arguments to function `getpwuid_r'

Once I #defined the variable in pg_config.h, everything compiled fine,
of course, but one shouldn't have to....

- DAP

-----Original Message-----
From: Jim Seymour [mailto:jseymour@linxnet.com]
Sent: Tuesday, June 15, 2004 4:38 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] building 7.4.3 on Solaris 9/Intel

"David Parker" <dparker@tazznetworks.com> wrote:

Hi. I'm trying to build 7.4.3 on Solaris 9/Intel (gcc 3.2.2), and I
get the following:

======================================================================
==
================
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -fPIC -I. -I../../../src/include -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -DFRONTEND
-DSYSCONFDIR='"/home/dparker/servers/install/i386/etc/postgresql"' -c

-o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: too few arguments to function `getpwuid_r'
======================================================================
==
================

[snip]

7.4.3? Are you sure? This should be fixed in 7.4.3.

From an earlier reply I made to somebody in the [ADMIN] mailing list,
regarding trying to build 7.4.2 on Solaris 8:

This is fixed in CVS. Or you can apply this patch

http://jimsun.linxnet.com/misc/pgsql-7.4.2.patch

to a freshly-extracted 7.4.2 tarball (*before* running configure).

Standard Disclaimer: No warranties, express or implied.

I'm running 7.4.2 on both a Sparc Solaris 7 and a Sparc Solaris 8
machine, with that patch.

Jim

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

#4Jim Seymour
jseymour@LinxNet.com
In reply to: David Parker (#3)
Re: building 7.4.3 on Solaris 9/Intel

"David Parker" <dparker@tazznetworks.com> wrote:

Thanks for the response. Yup, I'm sure it's 7.4.3.

From the config.log, it looks like the check for getpwuid_r test program
uses -D_POSIX_PTHREAD_SEMANTICS, which turns on the POSIX version of the
call, but the check for "fifth argument" test compile doesn't include
this define, so it fails, and the GETPWUID_R_5ARG doesn't get set:

[snip]

So it's actually a configure problem.

Jim

#5David Parker
dparker@tazznetworks.com
In reply to: Jim Seymour (#4)
Re: building 7.4.3 on Solaris 9/Intel

Seems to be, which is why I originally asked about configure switches,
but it seems like just
--enable-thread-safety ought to be enough.

-----Original Message-----
From: Jim Seymour [mailto:jseymour@linxnet.com]
Sent: Tuesday, June 15, 2004 5:41 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] building 7.4.3 on Solaris 9/Intel

"David Parker" <dparker@tazznetworks.com> wrote:

Thanks for the response. Yup, I'm sure it's 7.4.3.

From the config.log, it looks like the check for getpwuid_r test
program uses -D_POSIX_PTHREAD_SEMANTICS, which turns on the POSIX
version of the call, but the check for "fifth argument" test compile
doesn't include this define, so it fails, and the GETPWUID_R_5ARG

doesn't get set:
[snip]

So it's actually a configure problem.

Jim

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

#6Bruce Momjian
bruce@momjian.us
In reply to: David Parker (#5)
Re: building 7.4.3 on Solaris 9/Intel

OK, I have fixed this so the configure test happens with the proper
thread flags. Patch attached, and it will be in 7.4.4.

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

David Parker wrote:

Seems to be, which is why I originally asked about configure switches,
but it seems like just
--enable-thread-safety ought to be enough.

-----Original Message-----
From: Jim Seymour [mailto:jseymour@linxnet.com]
Sent: Tuesday, June 15, 2004 5:41 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] building 7.4.3 on Solaris 9/Intel

"David Parker" <dparker@tazznetworks.com> wrote:

Thanks for the response. Yup, I'm sure it's 7.4.3.

From the config.log, it looks like the check for getpwuid_r test
program uses -D_POSIX_PTHREAD_SEMANTICS, which turns on the POSIX
version of the call, but the check for "fifth argument" test compile
doesn't include this define, so it fails, and the GETPWUID_R_5ARG

doesn't get set:
[snip]

So it's actually a configure problem.

Jim

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+7-4
#7David Parker
dparker@tazznetworks.com
In reply to: Bruce Momjian (#6)
Re: building 7.4.3 on Solaris 9/Intel

Thanks!

-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: Tuesday, June 15, 2004 11:49 PM
To: David Parker
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] building 7.4.3 on Solaris 9/Intel

OK, I have fixed this so the configure test happens with the proper
thread flags. Patch attached, and it will be in 7.4.4.

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

David Parker wrote:

Seems to be, which is why I originally asked about configure switches,

but it seems like just --enable-thread-safety ought to be enough.

-----Original Message-----
From: Jim Seymour [mailto:jseymour@linxnet.com]
Sent: Tuesday, June 15, 2004 5:41 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] building 7.4.3 on Solaris 9/Intel

"David Parker" <dparker@tazznetworks.com> wrote:

Thanks for the response. Yup, I'm sure it's 7.4.3.

From the config.log, it looks like the check for getpwuid_r test
program uses -D_POSIX_PTHREAD_SEMANTICS, which turns on the POSIX
version of the call, but the check for "fifth argument" test compile

doesn't include this define, so it fails, and the GETPWUID_R_5ARG

doesn't get set:
[snip]

So it's actually a configure problem.

Jim

---------------------------(end of
broadcast)---------------------------
TIP 8: explain analyze is your friend

---------------------------(end of
broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania
19073