Hi Bruno,

At 2025-01-16T21:45:44+0100, Bruno Haible wrote:
> G. Branden Robinson wrote:
> > [please keep groff@ in CC list, as I'm not subscribed]
> > 
> > I'm having C++-related declaration clash trouble on Solaris 11.
> > Since both header files involved in the clash are generated by
> > gnulib, it's tempting not to blame the system headers.
> > 
> >   CXX      src/devices/grops/ps.o
> 
> Please make it easier for us to reproduce the problem.

I'll certainly try.

> 1) Details about the OS: There are several variants of Solaris 11. Which
>    one do you mean?

I'm using what's installed at gcc211.fsffrance.org.

$ uname -a
SunOS gcc-solaris11 5.11 11.3 sun4u sparc SUNW,SPARC-Enterprise

> 2) Which compiler?

$ g++ --version
g++ (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> 3) Please show the output of "gmake V=1", not "gmake". Automake's
>    silent rules are a disservice when it comes to reporting bugs.

Agreed.  And I think you've told me this before.  I'll put your advice
in my little memorandum file for future issues.  Then I have only to
remember to look there...

depbase=`echo src/devices/grops/ps.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I./src/include  -I./src/include -I./lib 
-I./src/include -I./lib -D_REENTRANT  -g -O2 -MT src/devices/grops/ps.o -MD -MP 
-MF $depbase.Tpo -c -o src/devices/grops/ps.o src/devices/grops/ps.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ./lib/unistd.h:40:0,
                 from ./src/include/posix.h:27,
                 from src/devices/grops/ps.cpp:44:
/usr/include/unistd.h:339:52: error: declaration of ‘int rpl_getopt(int, char* 
const*, const char*)’ has a different exception specifier
 extern int  getopt(int, char *const *, const char *);
                                                    ^
In file included from ./lib/getopt.h:85:0,
                 from src/devices/grops/ps.cpp:41:
./src/include/config.h:1256:25: error: from previous declaration ‘int 
rpl_getopt(int, char* const*, const char*) noexcept’
 #define __GETOPT_PREFIX rpl_
                         ^
gmake[2]: *** [Makefile:9212: src/devices/grops/ps.o] Error 1
gmake[2]: Leaving directory '/export/home/gbranden/groff-1.23.0.2765-27730'
gmake[1]: *** [Makefile:11593: all-recursive] Error 1
gmake[1]: Leaving directory '/export/home/gbranden/groff-1.23.0.2765-27730'
gmake: *** [Makefile:6792: all] Error 2

> 4) And, last not least, the tarball which you are attempting to compile?

8.1MB file available at <https://paste.c-net.org/WanderLedge>.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

  • Re: C++ problem bu... Bruno Haible via GNU roff typesetting system discussion
    • Re: C++ probl... G. Branden Robinson
      • Re: C++ p... Bruno Haible via GNU roff typesetting system discussion

Reply via email to