On Fri, Feb 07, 2020 at 10:08:29AM +0100, Charlene Wendling wrote:

> The latest version of cad/qrouter is broken in the current sparc64 bulk:

> > cc -O2 -pipe -Wno-return-type -O2 -pipe -Wno-return-type
> > -I/usr/X11R6/include  -fPIC -DPA CKAGE_NAME=\"\"
> > -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\"
> > -DPAC KAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1
> > -DHAVE_SETENV=1 -DHAVE_PUTENV=1 - DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1
> > -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB _H=1
> > -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
> > -DHAVE_INTTYPES_H=1 -DHAVE_ST DINT_H=1 -DHAVE_UNISTD_H=1
> > -DHAVE_SYS_MMAN_H=1 -DTCL_QROUTER=1 -DVERSION=\"1.4\" -DREVISI
> > ON=\"74\" -DUSE_TCL_STUBS -DUSE_TK_STUBS \
> > -DQROUTER_PATH=\"/usr/local/share/qrouter\"
> > -I/usr/local/include/tk8.5 -I/usr/loc al/include/tcl8.5 -c point.c -o
> > point.o
> > In file included from point.c:13: qrouter.h:535: error:
> > expected declaration specifiers or '...' before 'va_list'

> It's a missing include happening because upstream does not put includes
> in their header files to start with (imvho that's bad), since several C
> files want qrouter.h, adding the include there reduces the number of
> patches needed.

> With the below diff, it builds fine on powerpc [0]. REVISION bump is
> not needed, as i made the change to target GCC specifically, and this
> version has never been built on base-gcc archs.

> Comments/feedback are welcome,

> Charlène.

> [0] https://bin.charlenew.xyz/qrouter.log

This fixes it on the bulk build. ok kmos

--Kurt

> 
> Index: patches/patch-qrouter_h
> ===================================================================
> RCS file: /cvs/ports/cad/qrouter/patches/patch-qrouter_h,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 patch-qrouter_h
> --- patches/patch-qrouter_h   3 Feb 2020 22:21:57 -0000       1.2
> +++ patches/patch-qrouter_h   7 Feb 2020 09:03:36 -0000
> @@ -12,3 +12,13 @@ Index: qrouter.h
>   typedef int (*__compar_fn_t)(const void*, const void*);
>   #endif
>   
> +@@ -530,6 +530,9 @@ NET    getnettoroute(int order);
> + int    route_net_ripup(NET net, u_char graphdebug, u_char onlybreak);
> + 
> + #ifdef TCL_QROUTER
> ++#if !defined(__clang__) && defined(__OpenBSD__)
> ++#include <stdarg.h> /* needed for va_list with base-gcc */
> ++#endif
> + void   tcl_printf(FILE *, const char *, ...);
> + void   tcl_stdflush(FILE *);
> + void   tcl_vprintf(FILE *, const char *, va_list);
> 

Reply via email to