bugzilla-daemon at mindrot.org
2002-Apr-10 22:57 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From stevesk at pobox.com 2002-04-11 08:57 ------- can you provide cpp output from the file (e.g., cc -E) for the tmp[] definition? can someone with some AIX knowledge help with this? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-11 08:07 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From dmanton at emea.att.com 2002-04-11 18:07 ------- Created an attachment (id=71) cpp output for monitor_fdpass.c ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-11 08:09 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From dmanton at emea.att.com 2002-04-11 18:09 ------- tmp[CMSG_SPACE(sizeof(int))]; evaluates to: char tmp[((ulong)((caddr_t)(sizeof(struct cmsghdr)) + sizeof (void *) - 1 - ((ulong)((caddr_t)(sizeof(struct cmsghdr)) + sizeof (void *) - 1) % sizeof (void *))) + (ulong)((caddr_t)(sizeof(int)) + sizeof (void *) - 1 - ((ulong)((caddr_t)(sizeof(int)) + sizeof (void *) - 1) % sizeof (void *))))]; ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-11 20:51 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From pspencer at fields.utoronto.ca 2002-04-12 06:51 ------- It seems the IBM compiler will not do pointer arithmetic at compile time. For example, assuming pointers are compatible with unsigned longs, the following program will not compile using the IBM compiler xlc, but using gcc it will compile just fine (printing "6" when it runs, assuming ints are 4 bytes long): int main() { char tmp[(unsigned long)((int *)(10) - 1)]; printf ("size is %d\n", sizeof(tmp)); } Without the "- 1", the program will compile and run correctly (printing "10") using either xlc or gcc. The CMSG_SPACE macro used in monitor_fdpass.c uses the ALIGN macro, which AIX defines in sys/socket.h using pointer arithmetic. One fix is to undefine AIX's ALIGN macro in favour of openssh's which does not use pointer arithmetic and works just fine. A quick-and-dirty way of doing this is to apply the following patch to defines.h then run configure with CFLAGS="-DCOMPILER_CHOKES_ON_SYSTEM_ALIGN": --- defines.h.orig Sat Apr 6 18:52:05 2002 +++ defines.h Thu Apr 11 15:51:06 2002 @@ -447,6 +447,11 @@ #ifndef ALIGNBYTES #define ALIGNBYTES (sizeof(int) - 1) #endif +#ifdef COMPILER_CHOKES_ON_SYSTEM_ALIGN +#ifdef ALIGN +#undef ALIGN +#endif +#endif #ifndef ALIGN #define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) #endif A better fix would be to have configure try to compile the following test program: #include <sys/socket.h> #ifndef ALIGN #define ALIGN(p) p #endif int main() { char tmp[ALIGN(1)]; } If sys/socket.h exists but this compilation fails, configure could set the COMPILER_CHOKES_ON_SYSTEM_ALIGN flag. However, since I have no experience with autoconf I'll let someone else suggest the appropriate patch. An alternative is to simply always use openssh's ALIGN macro (i.e., omit the #ifdef COMPILER_CHOKES_ON_SYSTEM_ALIGN from the defines.h patch) but I don't know if that would break anything on a system where the system's ALIGN macro has to be used because of something special it does. Two other changes are also needed to make this snapshot compile with the older version (4) of IBM's C compiler that I am using: It will not allow "enum {a,b,...,x,}" with nothing after the final comma -- this occurs twice in log.h and once in monitor.h, and if running in strict ANSI mode it will not allow the redefinition of TILDE in openbsd-compat/glob.c (the system header files already define it). These issues may apply to released versions of openssh also; I've never tried compiling it with IBM's compiler until I saw this bug report. If anyone wants me to I could open up a new bug report and attach a patch. I personally don't care about them too much since I use gcc, and presumably the current IBM compiler is okay since the reporter of this bug didn't mention any such problems. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-16 14:54 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From dmanton at emea.att.com 2002-04-17 00:54 ------- Created an attachment (id=77) My first ever attempt at an autoconf/autoheader configuration based on the above recommendation! Can someone knowlegable review with a view to having this committed? Thanks. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-16 15:05 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From dmanton at emea.att.com 2002-04-17 01:05 ------- Created an attachment (id=78) ...and the patch for defines.h to use COMPILER_CHOKES_ON_SYSTEM_ALIGN helps, too. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-22 14:34 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 ------- Additional Comments From dmanton at emea.att.com 2002-04-23 00:34 ------- openssh-SNAP-20020421 still shows this error. Can anyone spare some time to look into the above attachments? Thanks. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-23 13:01 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 djm at mindrot.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Additional Comments From djm at mindrot.org 2002-04-23 23:01 ------- Please try tommorrows snapshot (check that Bug #213 is mentioned in the Changelog). It should fix the problem. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2002-Apr-27 16:53 UTC
[Bug 213] -SNAP-20020410 fails to compile under AIX 4.3.3
http://bugzilla.mindrot.org/show_bug.cgi?id=213 dmanton at emea.att.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Additional Comments From dmanton at emea.att.com 2002-04-28 02:53 ------- openssh-SNAP-20020427 now compiles and runs with IBM xlc 5 under AIX 4.3.3 ML9. Thanks for the fix :-) ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.