[Top][All Lists]

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

bug#30718: coreutils-8.29 compilation failure using xlC on AIX

From: John Wiersba
Subject: bug#30718: coreutils-8.29 compilation failure using xlC on AIX
Date: Mon, 5 Mar 2018 20:48:46 +0000 (UTC)

Build environment:
AIX 6.1
xlC version:
    IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72)
    Version: 12.01.0000.0002
AIX make (/bin/make)

Environment variables:
export CC=xlC
export CFLAGS=-q64
export CXX=$CC
export LD=ld
export AR="ar -X64"
export LDFLAGS="-Wl,-bmaxdata:0x80000000"

./configure succeeds
make fails:
    CC       src/stat.o
    "src/stat.c", line 598.19: 1506-045 (S) Undeclared identifier 
    "src/stat.c", line 598.19: 1506-1324 (S) Array size must have integer type.
Problematic code in src/stat.c:
    enum { intmax_bufsize = INT_BUFSIZE_BOUND (intmax_t) };
    static char str[intmax_bufsize ...

I see this enum technique used in slightly different ways in other parts of the 

I'm not sure of the rationale for using enum here, but apparently the AIX xlC 
doesn't like it.  Since it is the only use of this variable (intmax_bufsize) in 

file, it is easy to replace the use of intmax_bufsize with its value 
which allows the compilation to finish correctly.  I'm not aware of any other 

workaround for this issue.  Maybe it's a compiler bug?  But in any case, it 
would be 

nice if a source change didn't have to be made.

As an additional comment, it took me quite a while to find working values for
CFLAGS, AR, and LDFLAGS.  I'm not sure how you might accomplish it, but it 
would be
friendlier if, once it's determined that gcc is not available and xlC is 
a reasonable set of default options were supplied, so that every user of xlC 
have to rediscover some set defaults which allow the build to succeed.

Finally, I'm attaching the test-suite.log indicating a couple of failures and a 
few errors.

Attachment: test-suite.log
Description: Binary data

reply via email to

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