Skip Menu |
 

Date: Mon, 20 Dec 2004 09:25:14 -0800
From: sharma <sam.sharma@gat.com>
To: krb5-bugs@mit.edu
Subject: compilation error on AIX 5.1 and gcc 3.4.4
Download (untitled) / with headers
text/plain 3.5KiB
Hi

I have a compilation error with setenv API redefinition in krb code
./libtelnet/forward.c and system header files on AIX 5.1 with gcc 3.4.4
[2.95 also] compiler.

The message looks like this, for any other information I will happy to
provide you. I hope you are the right person to forward all errors in
future, otherwise let me know.

I looked into the problem and found that in compilation the -DHAVE_SETENV=1
and -DNEED_SETENV=1 are going in and ./libtelnet/forward.c has code like

#include "krb5.h"
#include <errno.h>

#include "krb5forw.h"

#if defined(NEED_SETENV) || defined(NEED_SETENV_PROTO)
extern int setenv(char *, char *, int);
#endif

Redefines the system's prototype which is

extern int setenv(const char *, const char *, int);


COMPILATION ERROR MESSAGE:

making all in appl/telnet/libtelnet...
gmake[4]: Entering directory
`/home/srbpkg/srbpkg/kerberos/32/krb5-1.4-beta2/src/appl/telnet/libtelnet'
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DKRB5_KRB4_COMPAT=1
-DHAVE_BT_RSEQ=1 -DKRB5_PRIVATE=1 -DKRB5_DEPRECATED=1
-DKRB5_DNS_LOOKUP_KDC=1 -DKRB5_DNS_LOOKUP=1 -DHAVE_RES_NSEARCH=1
-DHAVE_RES_SEARCH=1 -DHAVE_NS_INITPARSE=1 -DHAVE_NS_NAME_UNCOMPRESS=1
-DHAVE_DN_SKIPNAME=1 -DDELAY_INITIALIZER=1 -DCONSTRUCTOR_ATTR_WORKS=1
-DDESTRUCTOR_ATTR_WORKS=1 -DUSE_LINKER_FINI_OPTION=1 -DENABLE_THREADS=1
-DHAVE_PTHREAD=1 -DHAVE_PTHREAD_ONCE=1 -DHAVE_PTHREAD_RWLOCK_INIT=1
-DHAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB=1 -DHAVE_STRCASECMP=1
-DHAVE_STRDUP=1 -DHAVE_SETSID=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1
-DHAVE_GETOPT=1 -DHAVE_HERROR=1 -DHAVE_SETENV=1 -DHAVE_GETENV=1
-DHAVE_VSNPRINTF=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_UNISTD_H=1 -DHAVE_ARPA_NAMESER_H=1 -DHAVE_SYS_SELECT_H=1
-DHAVE_ARPA_INET_H=1 -DHAVE_CURSES_H=1 -DHAVE_UTMP_H=1 -DHAVE_SYS_TIME_H=1
-DHAVE_SYS_STREAM_H=1 -DHAVE_SYS_UTSNAME_H=1 -DHAVE_MEMORY_H=1
-DNEED_SETENV=1 -DKRB4=1 -DHAVE_UNISTD_H=1 -DHAVE_FORK=1 -DHAVE_VFORK=1
-DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DHAVE_STDARG_H=1
-DHAVE_TERM_H=1 -DHAVE_SA_LEN=1 -DHAVE_STRUCT_SOCKADDR_STORAGE=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_NETINET_IN_H=1
-DHAVE_NETDB_H=1 -DHAVE_INET_NTOP=1 -DHAVE_INET_PTON=1 -DHAVE_GETNAMEINFO=1
-DHAVE_GETADDRINFO=1 -DKRB5_USE_INET6=1 -DHAVE_SETUPTERM=1 -DUSE_TERMIO=1
-DNEED_PARSETOS_PROTO=1 -DNEED_HERROR_PROTO=1 -DPOSIX_SIGNALS=1 -DKRB4=1
-DHAVE_REGCOMP=1 -DTIME_WITH_SYS_TIME=1 -DSTREAMSPTY=1
-DNEED_UNSETENV_PROTO=1 -DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION
-DKRB5 -DFORWARD -UNO_LOGIN_F -DLOGIN_CAP_F -DLOGIN_PROGRAM=KRB5_PATH_LOGIN
-I../../../include -I./../../../include -I../../../include/krb5
-I./../../../include/krb5 -I.. -I./.. -I./../../../include/kerberosIV
-I../../../include/kerberosIV -D_THREAD_SAFE -c forward.c
forward.c:39: error: conflicting types for `setenv'
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.4/include/stdlib.h:480:
error: previous declaration of `setenv'
gmake[4]: *** [forward.o] Error 1
gmake[4]: Leaving directory
`/home/srbpkg/srbpkg/kerberos/32/krb5-1.4-beta2/src/appl/telnet/libtelnet'
gmake[3]: *** [all-recurse] Error 1
gmake[3]: Leaving directory
`/home/srbpkg/srbpkg/kerberos/32/krb5-1.4-beta2/src/appl/telnet'
gmake[2]: *** [all-recurse] Error 1
gmake[2]: Leaving directory
`/home/srbpkg/srbpkg/kerberos/32/krb5-1.4-beta2/src/appl'
gmake[1]: *** [all-recurse] Error 1
gmake[1]: Leaving directory
`/home/srbpkg/srbpkg/kerberos/32/krb5-1.4-beta2/src'
gmake: *** [krb32] Error 2
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2839] compilation error on AIX 5.1 and gcc 3.4.4
From: Tom Yu <tlyu@mit.edu>
Date: Tue, 21 Dec 2004 16:24:24 -0500
RT-Send-Cc:
Show quoted text
>>>>> "sharma" == sharma via RT <rt-comment@krbdev.mit.edu> writes:

Show quoted text
sharma> I have a compilation error with setenv API redefinition in krb code
sharma> ./libtelnet/forward.c and system header files on AIX 5.1 with gcc 3.4.4
sharma> [2.95 also] compiler.

[...]

Show quoted text
sharma> I looked into the problem and found that in compilation the -DHAVE_SETENV=1
sharma> and -DNEED_SETENV=1 are going in and ./libtelnet/forward.c has code like

[...]

Show quoted text
sharma> #if defined(NEED_SETENV) || defined(NEED_SETENV_PROTO)
sharma> extern int setenv(char *, char *, int);
sharma> #endif

Ok, that's very interesting. Could you please send the output of the
configure script starting from "configuring in telnet" and continuing
up until the "configuring in tests"?

---Tom
Date: Wed, 22 Dec 2004 12:15:08 -0800
From: sharma <sam.sharma@gat.com>
Subject: RE: [krbdev.mit.edu #2839] compilation error on AIX 5.1 and gcc 3.4.4
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 1.8KiB
Hi

I am attaching config.log and config.status file from
krb5-1.4-beta2/src/appl/telnet directory. I hope config.log will be able to
help you.

Also I searched all config.log files on my system for SETENV word. The
result is

bash-2.04$ find . -name config.log -exec grep SETENV {} \;
#define HAVE_SETENV 1
#define NEED_SETENV 1
#define NEED_UNSETENV_PROTO 1
#define HAVE_SETENV 1
#define HAVE_SETENV 1

bash-2.04$ find . -name config.log -exec grep -l SETENV {} \;
./krb5-1.4-beta2/src/appl/telnet/config.log
./krb5-1.4-beta2/src/clients/config.log
./krb5-1.4-beta2/src/include/config.log

Here ./krb5-1.4-beta2/src/clients and ./krb5-1.4-beta2/src/include
config.log files seem to set SETENV properly. I suspect some thing in
./krb5-1.4-beta2/src/appl/telnet configure script which is reflected in its
config.log file where something is wrong with setenv detection program.

Hope this will help.

Thanks

SAM

Show quoted text
-----Original Message-----
From: 0000-Admin [mailto:daemon@MIT.EDU] On Behalf Of Tom Yu via RT
Sent: Tuesday, December 21, 2004 1:24 PM
To: sam.sharma@gat.com
Cc: krb5-prs@mit.edu
Subject: Re: [krbdev.mit.edu #2839] compilation error on AIX 5.1 and gcc
3.4.4

>>>>> "sharma" == sharma via RT <rt-comment@krbdev.mit.edu> writes:

sharma> I have a compilation error with setenv API redefinition in krb code
sharma> ./libtelnet/forward.c and system header files on AIX 5.1 with gcc
3.4.4
sharma> [2.95 also] compiler.

[...]

sharma> I looked into the problem and found that in compilation the
-DHAVE_SETENV=1
sharma> and -DNEED_SETENV=1 are going in and ./libtelnet/forward.c has code
like

[...]

sharma> #if defined(NEED_SETENV) || defined(NEED_SETENV_PROTO)
sharma> extern int setenv(char *, char *, int);
sharma> #endif

Ok, that's very interesting. Could you please send the output of the
configure script starting from "configuring in telnet" and continuing
up until the "configuring in tests"?

---Tom
Download config.status
application/octet-stream 26.9KiB

Message body not shown because it is not plain text.

Download config.log
application/octet-stream 32.6KiB

Message body not shown because it is not plain text.

To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #2839] compilation error on AIX 5.1 and gcc 3.4.4
From: Tom Yu <tlyu@mit.edu>
Date: Wed, 05 Jan 2005 17:58:45 -0500
RT-Send-Cc:
Show quoted text
>>>>> "sharma" == sharma via RT <rt-comment@krbdev.mit.edu> writes:

Show quoted text
sharma> I am attaching config.log and config.status file from
sharma> krb5-1.4-beta2/src/appl/telnet directory. I hope config.log
sharma> will be able to help you.

Unfortunately, that's not really enough. I would need to see the
output that the configure script writes to the terminal, between the
lines "configuring in telnet" and "configuring in tests". Also, do
you know whether setenv is subject to symbol renaming on AIX 5?

---Tom
Date: Tue, 18 Jan 2005 10:15:03 -0800
From: sharma <sam.sharma@gat.com>
Subject: RE: [krbdev.mit.edu #2839] compilation error on AIX 5.1 and gcc 3.4.4
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
Download (untitled) / with headers
text/plain 2.8KiB
Hi

I generated a config.txt file using the following command as you requested.

./configure --prefix=/home/srbpkg/srbpkg/kerberos/32/install
--exec-prefix=/home/srbpkg/srbpkg/kerberos/32/install --enable-shared=no
--enable-static=yes CC="gcc " CXX="g++ " CFLAGS="" LDFLAGS="-lm" >
config.txt

Also attaching the following files where this problem happens:

./appl/telnet/config.log
./appl/telnet/config.status
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.4/include/stdlib.h

My observation is that the setting in appl/telnet/configure file generates
this program for testing the existence of setenv api, where the setenv
prototype in stdlib.h
extern int setenv(const char *, const char *, int);
is different from the program as shown below.

configure: In function `main':
configure:5376: error: conflicting types for `setenv'
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.4/include/stdlib.h:480:
error: previous declaration of `setenv'
configure:5376: warning: extern declaration of `setenv' doesn't match global
one
configure:5389: $? = 1
configure: failed program was:
#line 5364 "configure"
#include "confdefs.h"
#include <stdlib.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
struct k5foo {int foo; } xx;
extern int setenv (struct k5foo*);
setenv(&xx);

;
return 0;
}

I hope this will help you to locate the problem. The same setenv definitions
in other directories were right. I greped the setenv keyword in the
following files:

find . -name "config.*" -exec grep -il SETENV {} \;

./appl/bsd/config.log
./appl/bsd/config.status
./appl/gssftp/config.log
./appl/gssftp/config.status
./appl/telnet/config.log
./appl/telnet/config.status
./appl/config.log
./clients/config.log
./clients/config.status
./include/config.log
./include/config.status
./kadmin/config.log
./lib/apputils/config.log
./lib/crypto/config.log
./lib/des425/config.log
./lib/gssapi/config.log
./lib/kadm5/config.log
./lib/kdb/config.log
./lib/krb4/config.log
./lib/krb5/config.log
./lib/rpc/unit-test/config.log
./lib/rpc/config.log
./tests/config.log
./config.cache

Thanks

SAM


Show quoted text
-----Original Message-----
From: 0000-Admin [mailto:daemon@MIT.EDU] On Behalf Of Tom Yu via RT
Sent: Wednesday, January 05, 2005 2:59 PM
To: sam.sharma@gat.com
Cc: krb5-prs@mit.edu
Subject: Re: [krbdev.mit.edu #2839] compilation error on AIX 5.1 and gcc
3.4.4

>>>>> "sharma" == sharma via RT <rt-comment@krbdev.mit.edu> writes:

sharma> I am attaching config.log and config.status file from
sharma> krb5-1.4-beta2/src/appl/telnet directory. I hope config.log
sharma> will be able to help you.

Unfortunately, that's not really enough. I would need to see the
output that the configure script writes to the terminal, between the
lines "configuring in telnet" and "configuring in tests". Also, do
you know whether setenv is subject to symbol renaming on AIX 5?

---Tom
Download config.txt
text/plain 110.2KiB

Message body is not shown because sender requested not to inline it.

Download config.log
application/octet-stream 32.6KiB

Message body not shown because it is not plain text.

Download config.status
application/octet-stream 26.9KiB

Message body not shown because it is not plain text.

Download stdlib.h
application/octet-stream 15.7KiB

Message body not shown because it is not plain text.