dbTalk Databases Forums  

[BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue - 06-15-2004 , 01:20 PM







The following bug has been logged online:

Bug reference: 1167
Logged by: James Helm

Email address: jjhelm (AT) att (DOT) net

PostgreSQL version: 7.4

Operating system: Solaris 9 Sparc

Description: POSIX getpwuid_r 4arg vs 5arg issue

Details:

I just downloaded the 7.4.3 tarball with timestamp 6/15 00:02, and am still
having issues with threads on a freshly loaded Solaris 9 server. Looks like
maybe the latest Solaris 9 supports the 5 arg version of getpwuid_r? I'm
just going to build without thread safety since I don't really need it for
now, but I thought you'd want to know it was still not 100% fixed.

Thanks.

Jim

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations
-fPIC -I. -I../../../src/include -I/pbengine/postgres/include
-I/pbengine/openssl/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-DFRONTEND
-DSYSCONFDIR='"/pbengine/postgres/etc"' -c -o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: error: too few arguments to function `getpwuid_r'
thread.c:119: warning: assignment makes pointer from integer without a cast
gmake[3]: *** [thread.o] Error 1


Here's my configure:

sh configure \
--prefix=/pbengine/postgres \
--with-includes=/pbengine/postgres/include \
--with-libs=/pbengine/postgres/lib \
--with-perl \
--with-openssl=/pbengine/openssl \
--enable-thread-safety




---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue - 06-15-2004 , 08:45 PM







Well, shame you reported it today, rather than a few days before the
release. I added code which should have detected whether your system
uses 4 or 5 args to getpwuid_r, but obviously it didn't work in your
case.

I need to see your config.log's references to getpwuid_r to find the
cause of the failure.

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

PostgreSQL Bugs List wrote:
Quote:
The following bug has been logged online:

Bug reference: 1167
Logged by: James Helm

Email address: jjhelm (AT) att (DOT) net

PostgreSQL version: 7.4

Operating system: Solaris 9 Sparc

Description: POSIX getpwuid_r 4arg vs 5arg issue

Details:

I just downloaded the 7.4.3 tarball with timestamp 6/15 00:02, and am still
having issues with threads on a freshly loaded Solaris 9 server. Looks like
maybe the latest Solaris 9 supports the 5 arg version of getpwuid_r? I'm
just going to build without thread safety since I don't really need it for
now, but I thought you'd want to know it was still not 100% fixed.

Thanks.

Jim

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations
-fPIC -I. -I../../../src/include -I/pbengine/postgres/include
-I/pbengine/openssl/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-DFRONTEND
-DSYSCONFDIR='"/pbengine/postgres/etc"' -c -o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: error: too few arguments to function `getpwuid_r'
thread.c:119: warning: assignment makes pointer from integer without a cast
gmake[3]: *** [thread.o] Error 1


Here's my configure:

sh configure \
--prefix=/pbengine/postgres \
--with-includes=/pbengine/postgres/include \
--with-libs=/pbengine/postgres/lib \
--with-perl \
--with-openssl=/pbengine/openssl \
--enable-thread-safety




---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) 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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue - 06-15-2004 , 10:57 PM



--ELM1087357680-26393-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII


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.

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

PostgreSQL Bugs List wrote:
Quote:
The following bug has been logged online:

Bug reference: 1167
Logged by: James Helm

Email address: jjhelm (AT) att (DOT) net

PostgreSQL version: 7.4

Operating system: Solaris 9 Sparc

Description: POSIX getpwuid_r 4arg vs 5arg issue

Details:

I just downloaded the 7.4.3 tarball with timestamp 6/15 00:02, and am still
having issues with threads on a freshly loaded Solaris 9 server. Looks like
maybe the latest Solaris 9 supports the 5 arg version of getpwuid_r? I'm
just going to build without thread safety since I don't really need it for
now, but I thought you'd want to know it was still not 100% fixed.

Thanks.

Jim

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations
-fPIC -I. -I../../../src/include -I/pbengine/postgres/include
-I/pbengine/openssl/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-DFRONTEND
-DSYSCONFDIR='"/pbengine/postgres/etc"' -c -o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: error: too few arguments to function `getpwuid_r'
thread.c:119: warning: assignment makes pointer from integer without a cast
gmake[3]: *** [thread.o] Error 1


Here's my configure:

sh configure \
--prefix=/pbengine/postgres \
--with-includes=/pbengine/postgres/include \
--with-libs=/pbengine/postgres/lib \
--with-perl \
--with-openssl=/pbengine/openssl \
--enable-thread-safety




---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) 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

--ELM1087357680-26393-0_
Content-Transfer-Encoding: 7bit
Content-Type: text/plain
Content-Disposition: inline; filename="/bjm/diff"

Index: configure
================================================== =================
RCS file: /cvsroot/pgsql-server/configure,v
retrieving revision 1.310.2.10
diff -c -c -r1.310.2.10 configure
*** configure 8 Jun 2004 15:36:34 -0000 1.310.2.10
--- configure 16 Jun 2004 03:14:51 -0000
***************
*** 13482,13489 ****
fi
done

! CFLAGS="$_CFLAGS"
! LIBS="$_LIBS"
echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
--- 13482,13488 ----
fi
done

! # do this test with the proper thread flags
echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
***************
*** 13543,13548 ****
--- 13542,13549 ----

fi

+ CFLAGS="$_CFLAGS"
+ LIBS="$_LIBS"
fi


Index: configure.in
================================================== =================
RCS file: /cvsroot/pgsql-server/configure.in,v
retrieving revision 1.301.2.8
diff -c -c -r1.301.2.8 configure.in
*** configure.in 8 Jun 2004 15:36:35 -0000 1.301.2.8
--- configure.in 16 Jun 2004 03:14:53 -0000
***************
*** 1059,1067 ****
CFLAGS="$CFLAGS $THREAD_CPPFLAGS"
LIBS="$LIBS $THREAD_LIBS"
AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
CFLAGS="$_CFLAGS"
LIBS="$_LIBS"
- PGAC_FUNC_GETPWUID_R_5ARG
fi


--- 1059,1068 ----
CFLAGS="$CFLAGS $THREAD_CPPFLAGS"
LIBS="$LIBS $THREAD_LIBS"
AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])
+ # do this test with the proper thread flags
+ PGAC_FUNC_GETPWUID_R_5ARG
CFLAGS="$_CFLAGS"
LIBS="$_LIBS"
fi



--ELM1087357680-26393-0_
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

--ELM1087357680-26393-0_--


Reply With Quote
  #4  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue - 06-17-2004 , 11:58 AM



Jim Helm wrote:
Quote:
Thanks. I wish I had seen it earlier myself. I've been busy on other
projects and haven't been following the 7.4.X releases. Doesn't hurt me
any, since I was able to just build without thread support, but I
thought it would be good for other to know about it.

Thanks again - for this, and all the work you guys have put into
PostgreSQL.
CVS had the same bug were we were testing without the thread flags.

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) 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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #5  
Old   
Jim Helm
 
Posts: n/a

Default Re: [BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue - 06-20-2004 , 01:32 PM



Thanks. I wish I had seen it earlier myself. I've been busy on other
projects and haven't been following the 7.4.X releases. Doesn't hurt me
any, since I was able to just build without thread support, but I
thought it would be good for other to know about it.

Thanks again - for this, and all the work you guys have put into
PostgreSQL.

--Jim

Quote:
-----Original Message-----
From: Bruce Momjian [mailtogman (AT) candle (DOT) pha.pa.us]
Sent: Tuesday, June 15, 2004 8:48 PM
To: James Helm
Cc: pgsql-bugs (AT) postgresql (DOT) org
Subject: Re: [BUGS] BUG #1167: POSIX getpwuid_r 4arg vs 5arg issue



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.

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

PostgreSQL Bugs List wrote:

The following bug has been logged online:

Bug reference: 1167
Logged by: James Helm

Email address: jjhelm (AT) att (DOT) net

PostgreSQL version: 7.4

Operating system: Solaris 9 Sparc

Description: POSIX getpwuid_r 4arg vs 5arg issue

Details:

I just downloaded the 7.4.3 tarball with timestamp 6/15
00:02, and am still
having issues with threads on a freshly loaded Solaris 9
server. Looks like
maybe the latest Solaris 9 supports the 5 arg version of
getpwuid_r? I'm
just going to build without thread safety since I don't
really need it for
now, but I thought you'd want to know it was still not 100% fixed.

Thanks.

Jim

gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations
-fPIC -I. -I../../../src/include -I/pbengine/postgres/include
-I/pbengine/openssl/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
-DFRONTEND
-DSYSCONFDIR='"/pbengine/postgres/etc"' -c -o thread.o thread.c
thread.c: In function `pqGetpwuid':
thread.c:119: error: too few arguments to function `getpwuid_r'
thread.c:119: warning: assignment makes pointer from
integer without a cast
gmake[3]: *** [thread.o] Error 1


Here's my configure:

sh configure \
--prefix=/pbengine/postgres \
--with-includes=/pbengine/postgres/include \
--with-libs=/pbengine/postgres/lib \
--with-perl \
--with-openssl=/pbengine/openssl \
--enable-thread-safety




---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to
majordomo (AT) postgresql (DOT) org)


--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) 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


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.