Bug 206 - -SNAP-20020409: build failures on AIX 3.2.5 with XLC 1.2.1.16
Summary: -SNAP-20020409: build failures on AIX 3.2.5 with XLC 1.2.1.16
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: Other AIX
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-06 13:27 AEST by Matthew Clarke
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
Mods to configure.ac for IBM XLC 1.2.1.16 on AIX 3.2.5 (1.58 KB, patch)
2002-04-10 16:09 AEST, Matthew Clarke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Clarke 2002-04-06 13:27:40 AEST
This compiler doesn't seem to like monitor_fdpass.c.

Configured as:
./configure --with-prngd-socket=/usr/local/var/run/egd-pool --with-mantype=man

Compiler complaint, on several lines of monitor_fdpass.c:
"monitor_fdpass.c", line 42.36: 1506-043 (S) Sizeof operator cannot be used with 
functions, void, bit-fields, incomplete types, or arrays of unknown size.

monitor_fdpass.c line 42:
        char tmp[CMSG_SPACE(sizeof(int))];

CMSG_SPACE is being picked up from defines.h, line 464:
#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + 
__CMSG_ALIGN(len))
Comment 1 Matthew Clarke 2002-04-08 09:44:01 AEST
More investigation shows that adding "--with-cppflags=-D_BSD=44" triggers a 
"struct cmsghdr" definition in the system headers, fixing the compilation error.  
However, that triggers changes to the WIFEXITED() macro and friends, such that 
they expect a "struct wait" instead of an "int", which breaks the compile of entropy.c.

Read some traffic on the openssh-unix-dev mailing list about a similar "struct 
cmsghdr" compile error on SCO 3.2v4.2, and about a fix/workaround being in CVS.
Will try again with Monday's snapshot.
Comment 2 Matthew Clarke 2002-04-10 16:00:44 AEST
The weekend's changes in -current have fixed (or avoided) the "Sizeof operator 
cannot be used with functions, void, bit-fields, incomplete types or arrays of 
unknown size." errors.

Found a couple more build problems in this environment.

1.  The AIX 3.2.5 linker, unlike later ones, doesn't like the "-blibpath" option.  I 
have patched configure.ac to detect and deal with this condition.

2.  This compiler does not have a 64-bit type.  If fed "long long", it issues the 
warning "1506-114 (W) Duplicate length adjective long ignored." and treats the 
entity as "long".  Configure then thinks we have a "long long" type, and can 
therefore build sftp-server, which is wrong, because it won't work without 64-bit 
integers.  I've put a quick kludge into configure.ac to ignore any "long long int" 
that is 4 bytes in size.

With these changes, build completes, with a few warnings.  Preliminary testing is 
promising.

Will attach a patch for configure.ac to this bug in a minute or two.
Comment 3 Matthew Clarke 2002-04-10 16:09:14 AEST
Created attachment 68 [details]
Mods to configure.ac for IBM XLC 1.2.1.16 on AIX 3.2.5
Comment 4 Damien Miller 2002-04-23 23:23:25 AEST
Applied - thanks
Comment 5 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED