Re: gtk-1.2.6 + AIX 4.3.2 == coredump



On Sat, Nov 06, 1999 at 12:37:01PM -0800, Guy Harris wrote:
> > (4) Downloaded gtk+-1.2.6, configured, and built.
> 
> Did you build GTK+ with "xlc_r" as well?  I'm *not* an AIX expert, but

Yes, I compiled gtk+ with xlc_r as well.

> > (2) In config.h, had to change:
> >     #undef HAVE_GETPWUID_R_POSIX
> >     to:
> >     #define HAVE_GETPWUID_R_POSIX 1
> > 
> >     getpwuid_r() changed to the POSIX compliant version in AIX 4.3,
> >     and the configure script does not correctly detect this. 
> 
> Hmm.  What does the "config.log" script say?  I'm curious why it didn't
> detect the API change?

This is from config.log:

configure:5164: checking for getpwuid_r
configure:5184: xlc_r -o conftest -g  -D_REENTRANT -D_THREAD_SAFE   conftest.c
1>&5
configure:5209: checking whether getpwuid_r is posix like
configure:5222: xlc_r -c -g  -D_REENTRANT -D_THREAD_SAFE  conftest.c 1>&5
"configure", line 5218.11: 1506-098 (E) Missing argument(s).

The return code from xlc_r is 0 in this case, so configure assumes 
that the test passes.

I looked inside the configure script, and this is what is going on:

==============================================================================
echo "configure:5209: checking whether getpwuid_r is posix like" >&5
                        # getpwuid_r(0, NULL, NULL, 0) is the signature on
                        # solaris, if that is not found, the prog below won't
                        # compile, then the posix signature is assumed as
                        # the default.
                        cat > conftest.$ac_ext <<EOF
#line 5215 "configure"
#include "confdefs.h"
#include <pwd.h>
int main() {
getpwuid_r(0, NULL, NULL, 0);
; return 0; }
EOF                                
==============================================================================

What is happening is, xlc_r compiles this program, and flags it with the
"(E) Missing arguments" warning.  The return code from xlc_r in this case is
 0, so configure assumes that the test passed, and gives the
prototype as int getpwuid_r(uid_t, struct passwd *, char *, int).

However, the POSIX prototype for this function is:
int getpwuid_r(uid_t, struct passwd *, char * , size_t ,  struct passwd **)

(See http://www.opengroup.org/onlinepubs/007908799/xsh/getpwuid.html)

So I think that this test is incorrect.  It should test for the POSIX
version of getpwuid_r() first, not the other one.  It doesn't help
that xlc_r doesn't return a proper error code. :( :(

Who maintains the configure script for gtk?  I think this needs to be
fixed.

This still doesn't solve my problem of gtk programs coredumping either. :( :(

I think I'm getting a headache. :) 

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@mediaone.net          



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]