[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AIX-4.3.3.0, tar-1.13.22, compile problem --
From: |
Paul Townsend |
Subject: |
AIX-4.3.3.0, tar-1.13.22, compile problem -- |
Date: |
Sat, 15 Sep 2001 04:19:00 -0500 (EST) |
=====
To the *tar* maintainers who probably already know this,
I encountered the problem below when attempting to compile the most
recent release of *tar* (tar-1.13.22) on an RS6000 with AIX-4.3.3.0.
An additional screwup, mostly mine (:@{), was encountered in `configure'.
If you set "CFLAGS=-O[45]", the check for the existence of "-lcposix"
succeeds even though the library doesn't exist. Apparently, the linker
used when "-O[45]" is set is different from the linker when "-O3" or
lower is set and it has a relaxed view of fatal errors. In this case,
"strerror" exists in "-lc" also. Since the linkage is satisfied, the
alternate linker allows the non-existence of "cposix". A similar
problem happened with the "-ldir" check.
-- Paul Townsend (address@hidden)
=-=-=-=-=-=
"tar" was configured with the following `ksh' script.
#!/bin/ksh
if [[ -z "${CFLAGS}" ]]; then
HOSTOS=`uname -s`
case $HOSTOS in
AIX)
CFLAGS="-O3 -qstrict"
;;
SunOS)
CFLAGS=-xO5
;;
*)
CFLAGS=
;;
esac
fi
CC=cc CFLAGS=${CFLAGS}\
configure --prefix=$HOME --program-prefix=g 2>&1
=-=-=-=-=-=
#44 > cd tar-1.13.22/lib
#45 > uname -s; /usr/bin/oslevel
AIX
4.3.3.0
#46 > gmake strtoumax.o
source='strtoumax.c' object='strtoumax.o' libtool=no \
depfile='.deps/strtoumax.Po' tmpdepfile='.deps/strtoumax.TPo' \
depmode=aix /bin/sh ../depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -O3 -qstrict -c `test -f strtoumax.
c || echo './'`strtoumax.c
"strtoimax.c", line 87.43: 1506-045 (S) Undeclared identifier ptr.
"strtoimax.c", line 87.48: 1506-045 (S) Undeclared identifier endptr.
"strtoimax.c", line 87.56: 1506-045 (S) Undeclared identifier base.
"strtoimax.c", line 88.47: 1506-045 (S) Undeclared identifier ptr.
"strtoimax.c", line 88.52: 1506-045 (S) Undeclared identifier endptr.
"strtoimax.c", line 88.60: 1506-045 (S) Undeclared identifier base.
gmake: *** [strtoumax.o] Error 1
#47 >
=-=-=-=-=-=
The following patch eliminates the above errors. I don't think it
changes the intent of the original code.
--- tar-1.13.22/lib/strtoimax.c.orig Tue Aug 28 17:07:24 2001
+++ tar-1.13.22/lib/strtoimax.c Sat Sep 15 02:41:04 2001
@@ -84,14 +84,14 @@
{
#if HAVE_UNSIGNED_LONG_LONG
verify (size_is_that_of_long_or_long_long,
- (sizeof (INT) == sizeof strtol (ptr, endptr, base)
- || sizeof (INT) == sizeof strtoll (ptr, endptr, base)));
+ (sizeof (INT) == sizeof strtol (NULL, NULL, 0)
+ || sizeof (INT) == sizeof strtoll (NULL, NULL, 0)));
- if (sizeof (INT) != sizeof strtol (ptr, endptr, base))
+ if (sizeof (INT) != sizeof strtol (NULL, NULL, 0))
return strtoll (ptr, endptr, base);
#else
verify (size_is_that_of_long,
- sizeof (INT) == sizeof strtol (ptr, endptr, base));
+ sizeof (INT) == sizeof strtol (NULL, NULL, 0));
#endif
return strtol (ptr, endptr, base);
- AIX-4.3.3.0, tar-1.13.22, compile problem --,
Paul Townsend <=