groff 1.21, and apparently many older releases, doesn't build with GCC2.95. The reason appears to be a simple name clash over "input_iterator" between src/roff/troff/input.cpp and old libstdc++:
c++ -I. -I/usr/obj/ports/groff-1.21/groff-1.21/src/roff/troff -I/usr/obj/ports/groff-1.21/build-sparc/src/include -I/usr/obj/ports/groff-1.21/groff-1.21/src/include -I/src/libs/gnulib/lib -DHAVE_CONFIG_H -O2 -pipe -c /usr/obj/ports/groff-1.21/groff-1.21/src/roff/troff/input.cpp /usr/obj/ports/groff-1.21/groff-1.21/src/roff/troff/input.cpp:159: `struct input_iterator' redeclared as different kind of symbol /usr/include/g++/stl_iterator.h:47: previous declaration of `template <class _Tp, class _Distance> struct input_iterator<_Tp,_Distance>' /usr/obj/ports/groff-1.21/groff-1.21/src/roff/troff/input.cpp:160: syntax error before `*' [...] The following (ugly) fix solves this problem. --- src/roff/troff/input.cpp.orig Wed Mar 16 21:33:07 2011 +++ src/roff/troff/input.cpp Wed Mar 16 21:33:35 2011 @@ -156,6 +156,7 @@ static symbol get_delim_name(); static void init_registers(); static void trapping_blank_line(); +#define input_iterator my_input_iterator class input_iterator; input_iterator *make_temp_iterator(const char *); const char *input_char_description(int); -- Christian "naddy" Weisgerber [email protected] _______________________________________________ bug-groff mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-groff
