bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-{6,7} will not compile on AIX 6.1


From: Jeremy Olexa
Subject: Re: coreutils-{6,7} will not compile on AIX 6.1
Date: Tue, 6 Jan 2009 12:49:35 -0600

On Sun, Jan 4, 2009 at 2:25 AM, Jim Meyering <address@hidden> wrote:
> "Jeremy Olexa" <address@hidden> wrote:
>> New subscriber here and I would like to get some help with this issue
>> on AIX 6.1.
>>
>> Here is the relevant code snippet:
>> depbase=`echo getloadavg.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>>         powerpc-ibm-aix6.1.0.0-gcc -std=gnu99  -I.      -g -O2 -MT
>> getloadavg.o -MD -MP -MF $depbase.Tpo -c -o getloadavg.o getloadavg.c
>> &&\
>>         mv -f $depbase.Tpo $depbase.Po
>> In file included from /usr/include/sys/corral.h:25,
>>                  from /usr/include/libperfstat.h:28,
>>                  from getloadavg.c:410:
>> /usr/include/netinet/in6_var.h:65: error: array type has incomplete element 
>> type
>> make[4]: *** [getloadavg.o] Error 1
>>
>>>From my research I have found that the line 65 in in6_var.h is a
>> invalid type for gcc (maybe as of gcc-4 or newer - not exactly sure).
>> Line 65 is:
>> extern  CONST struct protosw inet6sw[];
>
> Thanks for the report.
> AIX 6.1 appears to have libperfstat, so is using this code:
>
> # if defined HAVE_LIBPERFSTAT
> #  include <libperfstat.h>
> #  include <sys/proc.h>
> #  ifndef SBITS
> #   define SBITS 16
> #  endif
> # endif
>
> From the looks of that diagnostic, some new header should
> be included before one of those two, in order to get the
> declaration of "struct protosw".
>
> Please see if there is a man page for libperfstat.
> It may tell which headers must be included there.
> Once we know that we should be able to fix it.
>
>

Thanks for the hint, Jim. I have attached a (one-liner) patch which I
have tested under the follow conditions:
- AIX 5.3 with coreutils-6.12 (no previous problems, and no
regressions with patch)
- AIX 6.1 with coreutils-6.12 (would not compile without patch, does
seem to work with patch just fine)
- AIX 6.1 with coreutils-7.0 (compile test passed, did not runtime
test - no reason to believe that there will be any regressions)

Please confirm the inclusion of this patch when you get a chance.
Also, is there an ETA for >7.0 alpha release of coreutils? (So I can
know when to stop tracking this patch)

Thanks much!
-Jeremy

Attachment: coreutils-6.12-aix.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]