Subject: pkg/23877: editors/abiword2 doesn't compile from pkgsrc without a tweak for macppc on 1.6.1 formal
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <dhgutteridge@hotmail.com>
List: netbsd-bugs
Date: 12/25/2003 03:18:58
>Number:         23877
>Category:       pkg
>Synopsis:       editors/abiword2 doesn't compile from pkgsrc without a tweak for macppc on 1.6.1 formal
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 25 03:19:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     David H Gutteridge
>Release:        1.6.1 (formal release)
>Organization:
>Environment:
NetBSD arcusv.nonus-porta.net 1.6.1 NetBSD 1.6.1 (ARCUSV) #0: Sun Nov 30 21:59:09 UTC 2003    root@arcusv.nonus-porta.net:/usr/src/sys/arch/macppc/compile/ARCUSV macppc
>Description:
editors/abiword2 (the non-GNOME version at least) doesn't compile from the pkgsrc distribution on macppc (and by extension on any other architecture in the 1.6.1 formal release that suffers from the following problem), because the file ut_string_class.cpp assumes that there's a definition of __va_copy() available in stdarg.h, which isn't the case here.  The fix is trivial, there's one line in ut_string_class.cpp I had to change.

349c349
< #  define VA_COPY(ap1,ap2)     __va_copy((ap1),(ap2))
---
> #  define VA_COPY(ap1,ap2)	  ((ap1) = (ap2))

With that everything compiled.  Of course, in the process, one of the dependent packages wiped out a file that xterm needs, but that's another story...  Having looked at your CVS repository, I can see that stdarg.h has since been altered to include the necessary definition, so I'd assume your "current" release wouldn't exhibit this problem, but I thought I'd pass it along in case anyone else encounters this.
>How-To-Repeat:
Try compiling abiword2 on any architecture on 1.6.1 formal that has a stdarg.h file without a definition of __va_copy().
>Fix:
As above, I did this:

349c349
< #  define VA_COPY(ap1,ap2)     __va_copy((ap1),(ap2))
---
> #  define VA_COPY(ap1,ap2)	  ((ap1) = (ap2))

A cleverer way would be to simply change stdarg.h, but I didn't bother.  (Silly me.)
>Release-Note:
>Audit-Trail:
>Unformatted: