On Fri, 7 Feb 2020 17:20:53 +0000
Stuart Henderson wrote:

> On 2020/02/07 10:08, Charlene Wendling wrote:
> > Hi,
> > 
> > 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
> > 
> > 
> > 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
> 
> I don't see why it should be conditional..

I changed it below, it builds fine on amd64 and powerpc (it was quite
like this before the patches were removed anyway).

> Can you send it upstream please?
> (https://github.com/RTimothyEdwards/qrouter/)

Alessandro, i prefer not sending a PR just for that include given you
opened an issue, is it possible for you to change it please, with that
added?

--

Index: Makefile
===================================================================
RCS file: /cvs/ports/cad/qrouter/Makefile,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Makefile
--- Makefile    3 Feb 2020 22:21:57 -0000       1.5
+++ Makefile    7 Feb 2020 17:31:50 -0000
@@ -2,6 +2,7 @@
 
 COMMENT =      multi-level, over-the-cell maze router for VLSI design
 DISTNAME =     qrouter-1.4.74
+REVISION =     0
 EXTRACT_SUFX = .tgz
 CATEGORIES =   cad
 
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 17:31:50 -0000
@@ -12,3 +12,12 @@ Index: qrouter.h
  typedef int (*__compar_fn_t)(const void*, const void*);
  #endif
  
+@@ -530,6 +530,8 @@ NET    getnettoroute(int order);
+ int    route_net_ripup(NET net, u_char graphdebug, u_char onlybreak);
+ 
+ #ifdef TCL_QROUTER
++/* XXX needed for va_list with base-gcc */
++#include <stdarg.h>
+ void   tcl_printf(FILE *, const char *, ...);
+ void   tcl_stdflush(FILE *);
+ void   tcl_vprintf(FILE *, const char *, va_list);

Reply via email to