RE: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

2006-12-14 Thread Lamar.Saxon

The saga of 1.5.1 continues with me on AIX.  Using CC ( XLC/XLC++ 8.0 )
on AIX 5.3, I am now getting this error:

making all in lib/rpc/unit-test...
Target "all" is up to date.
cc   -I../../../include -I./../../../include -I.
-DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1   -D_
LARGE_FILES -DLANL -DLANL_ICN -qhalt=e -O -D_THREAD_SAFE   -c client.c
cc   -I../../../include -I./../../../include -I.
-DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1   -D_
LARGE_FILES -DLANL -DLANL_ICN -qhalt=e -O -D_THREAD_SAFE   -c
rpc_test_clnt.c
cc -L../../../lib
-blibpath:/usr/local/kerberos/lib::/usr/lib:/lib -D_LARGE_FILES -DLANL
-DL
ANL_ICN -qhalt=e -O -D_THREAD_SAFE   -o client client.o rpc_test_clnt.o
-lgssrpc -lgssapi_krb5 -lkr
b5 -lk5crypto -lcom_err -lkrb5support  -lpthreads
ld: 0706-006 Cannot find or open library file: -l gssrpc
ld:open(): A file or directory in the path name does not exist.
ld: 0706-006 Cannot find or open library file: -l gssapi_krb5
ld:open(): A file or directory in the path name does not exist.
ld: 0706-006 Cannot find or open library file: -l krb5
ld:open(): A file or directory in the path name does not exist.
ld: 0706-006 Cannot find or open library file: -l k5crypto
ld:open(): A file or directory in the path name does not exist.
ld: 0706-006 Cannot find or open library file: -l com_err
ld:open(): A file or directory in the path name does not exist.
ld: 0706-006 Cannot find or open library file: -l krb5support
ld:open(): A file or directory in the path name does not exist.
make: 1254-004 The error code from the last command is 255.


Stop.
make: 1254-004 The error code from the last command is 1.

Anyone else experiencing this problem ?

Thanks,
Lamar

-Original Message-
From: Marcus Watts [mailto:[EMAIL PROTECTED]
Sent: Monday, September 18, 2006 9:44 PM
To: Saxon, Lamar
Cc: kerberos@mit.edu
Subject: Re: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

[EMAIL PROTECTED] writes:
> Subject: RE: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3
> Date: Mon, 18 Sep 2006 21:01:12 -0500
> Message-ID:
<[EMAIL PROTECTED]
om>
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Cc: kerberos@mit.edu
>
>
> Believe it or not; both solutions seem to work and compilation
succeeds
> !

Right.  Take Ken's solution.  He's correct, there's definitely no
guarantee that automatic storage inside the GET_HOST_BY_NAME block will
still be live afterwards.  Also, my fix of just declaring the storage
isn't good enough; that will probably result in calling the library
gethostbyname_r function, ignoring its results, and instead using
uninitialized storage for the result.

Beware: GET_HOST_BY_ADDR right afterwards also has the automatic
storage problem.  (It doesn't have the unitialized storage problem
because it doesn't use TMP at all.)  You probably aren't hitting that
case since you'd most likely get a compiler error from passing the
wrong # of arguments to the macro if you were using it.

-Marcus



Privileged and Confidential.  This e-mail, and any attachments there to, is 
intended only for use by the addressee(s) named herein and may contain 
privileged or confidential information.  If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail.  
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.


Kerberos mailing list   Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos


Re: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

2006-09-18 Thread Marcus Watts
[EMAIL PROTECTED] writes:
> Subject: RE: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3 
> Date: Mon, 18 Sep 2006 21:01:12 -0500
> Message-ID: <[EMAIL PROTECTED]>
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Cc: kerberos@mit.edu
> 
> 
> Believe it or not; both solutions seem to work and compilation succeeds
> !

Right.  Take Ken's solution.  He's correct, there's definitely no
guarantee that automatic storage inside the GET_HOST_BY_NAME block will
still be live afterwards.  Also, my fix of just declaring the storage
isn't good enough; that will probably result in calling the library
gethostbyname_r function, ignoring its results, and instead using
uninitialized storage for the result.

Beware: GET_HOST_BY_ADDR right afterwards also has the automatic
storage problem.  (It doesn't have the unitialized storage problem
because it doesn't use TMP at all.)  You probably aren't hitting that
case since you'd most likely get a compiler error from passing the
wrong # of arguments to the macro if you were using it.

-Marcus

Kerberos mailing list   Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos


RE: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

2006-09-18 Thread Lamar.Saxon

Believe it or not; both solutions seem to work and compilation succeeds
!

#define GET_HOST_BY_NAME(NAME, HP, ERR, TMP) \
{   \
(HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data)\
? 0 \
: &TMP.data);   \
(ERR) = h_errno;\
}

Worked and so did...

#define GET_HOST_BY_NAME(NAME, HP, ERR, TMP) \
{   \
struct hostent my_h_ent; \
(HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data)\
? 0 \
: &my_h_ent);   \
(ERR) = h_errno;\
}

Thanks for the help !  I will continue testing with my current install
base on AIX.  I really appreciate the rapid responses and solutions !

Lamar




-Original Message-
From: Ken Raeburn [mailto:[EMAIL PROTECTED]
Sent: Monday, September 18, 2006 5:13 PM
To: Marcus Watts
Cc: Saxon, Lamar; kerberos@mit.edu
Subject: Re: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

On Sep 18, 2006, at 17:56, Marcus Watts wrote:
> [EMAIL PROTECTED] writes:
> ...
>> making all in util...
>> making all in util/support...
>> cc   -I../../include -I./../../include -I. -I.
>> -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1   -D_LARGE_FILES -DLA
>> L -DLANL_ICN -qhalt=e -O -D_THREAD_SAFE   -c fake-addrinfo.c
>> "fake-addrinfo.c", line 1212.9: 1506-045 (S) Undeclared identifier
>> my_h_ent.
>> make: 1254-004 The error code from the last command is 1.
> ...
>
> I hesitate to recommend this as the totally right answer, but
> it looks like the "#ifdef _AIX" case in util/support/fake-addrinfo.c
> defines a GET_HOST_BY_NAME which doesn't declare any local storage.
> It should probably have a line that reads
>   struct hostent my_h_ent; \
> inserted immediately before the line that reads
>   (HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data)\
> (on or around line 178).

I think "&my_h_ent" was supposed to be changed to "&TMP.ent" in that 
macro.  (The "TMP" stuff was because making such narrowly-scoped 
automatic variables may not guarantee that the storage is still live 
when the pointer gets used.  Instead, now the caller has to supply a 
variable of a type controlled in this header, system-specific, that 
holds all the longer-lived storage we need.)

Lamar, could you let me know if that works for you?

Ken





Privileged and Confidential.  This e-mail, and any attachments there to, is 
intended only for use by the addressee(s) named herein and may contain 
privileged or confidential information.  If you have received this e-mail in 
error, please notify me immediately by a return e-mail and delete this e-mail.  
You are hereby notified that any dissemination, distribution or copying of this 
e-mail and/or any attachments thereto, is strictly prohibited.


Kerberos mailing list   Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos


Re: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

2006-09-18 Thread Ken Raeburn
On Sep 18, 2006, at 17:56, Marcus Watts wrote:
> [EMAIL PROTECTED] writes:
> ...
>> making all in util...
>> making all in util/support...
>> cc   -I../../include -I./../../include -I. -I.
>> -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1   -D_LARGE_FILES -DLA
>> L -DLANL_ICN -qhalt=e -O -D_THREAD_SAFE   -c fake-addrinfo.c
>> "fake-addrinfo.c", line 1212.9: 1506-045 (S) Undeclared identifier
>> my_h_ent.
>> make: 1254-004 The error code from the last command is 1.
> ...
>
> I hesitate to recommend this as the totally right answer, but
> it looks like the "#ifdef _AIX" case in util/support/fake-addrinfo.c
> defines a GET_HOST_BY_NAME which doesn't declare any local storage.
> It should probably have a line that reads
>   struct hostent my_h_ent; \
> inserted immediately before the line that reads
>   (HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data)\
> (on or around line 178).

I think "&my_h_ent" was supposed to be changed to "&TMP.ent" in that  
macro.  (The "TMP" stuff was because making such narrowly-scoped  
automatic variables may not guarantee that the storage is still live  
when the pointer gets used.  Instead, now the caller has to supply a  
variable of a type controlled in this header, system-specific, that  
holds all the longer-lived storage we need.)

Lamar, could you let me know if that works for you?

Ken



Kerberos mailing list   Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos


Re: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

2006-09-18 Thread Christopher D. Clausen
[EMAIL PROTECTED] wrote:
> Any one had any success compiling KRB5 1.5.1 on AIX 5.2 or 5.3 ?  I am
> experiencing the same errors as a previous poster; but have not seen
> any solutions.  Configure is successful with the following flags:
>
> export CC=cc
> export CFLAGS='-D_LARGE_FILES -DLANL -DLANL_ICN'; export CFLAGS
> ./configure --prefix=/usr/local/kerberos --enable-dns-for-realm
> --with-tcl=/usr/local --with-vague-errors
>
> Same config I use to compile 1.4.4 successfully with the LANL patches
> provided by Milton Turley.
>
> After running make, I get the following errors:
>
> making all in util...
> making all in util/support...
>cc   -I../../include -I./../../include -I. -I.
> -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1   -D_LARGE_FILES -DLA
> L -DLANL_ICN -qhalt=e -O -D_THREAD_SAFE   -c fake-addrinfo.c
> "fake-addrinfo.c", line 1212.9: 1506-045 (S) Undeclared identifier
> my_h_ent.
> make: 1254-004 The error code from the last command is 1.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 1.
>
>
> Stop.
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> Same errors on AIX 5.2 as well as AIX 5.3.  Also, same errors with CC
> or GCC 4.
>
> Any help is appreciated and I can beta test any patches.

I can tell you that I had similar problems and simply reverted to 1.4.4 
instead of trying to fight 1.5.1.  I was using IBM's Visual Age 
compiler.



Re: Kerberos 5 v1.5.1 on AIX 5.2 or AIX 5.3

2006-09-18 Thread Marcus Watts
[EMAIL PROTECTED] writes:
...
> making all in util...
> making all in util/support...
> cc   -I../../include -I./../../include -I. -I.
> -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE=1   -D_LARGE_FILES -DLA
> L -DLANL_ICN -qhalt=e -O -D_THREAD_SAFE   -c fake-addrinfo.c
> "fake-addrinfo.c", line 1212.9: 1506-045 (S) Undeclared identifier
> my_h_ent.
> make: 1254-004 The error code from the last command is 1.
...

I hesitate to recommend this as the totally right answer, but
it looks like the "#ifdef _AIX" case in util/support/fake-addrinfo.c
defines a GET_HOST_BY_NAME which doesn't declare any local storage.
It should probably have a line that reads
struct hostent my_h_ent; \
inserted immediately before the line that reads
(HP) = (gethostbyname_r((NAME), &TMP.ent, &TMP.data)\
(on or around line 178).

-Marcus Watts

Kerberos mailing list   Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos