public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Missing dependencies in m2/ ?
@ 2023-01-09  0:11 Jeff Law
  2023-01-09  4:18 ` Gaius Mulley
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2023-01-09  0:11 UTC (permalink / raw)
  To: gaiusmod, gcc-patches


I've been getting sporatic errors like this since the introduction of 
the modula-2 front-end:

> In file included from ../../..//gcc/gcc/m2/mc-boot/GSFIO.c:29:
> ../../..//gcc/gcc/system.h:556:20: error: conflicting declaration of C function 'const char* strsignal(int)'
>   556 | extern const char *strsignal (int);
>       |                    ^~~~~~~~~
> In file included from /usr/include/c++/12/cstring:42,
>                  from ../../..//gcc/gcc/system.h:241:
> /usr/include/string.h:478:14: note: previous declaration 'char* strsignal(int)'
>   478 | extern char *strsignal (int __sig) __THROW;
>       |              ^~~~~~~~~
> In file included from ../../..//gcc/gcc/system.h:707:
> ../../..//gcc/gcc/../include/libiberty.h:112:14: error: ambiguating new declaration of 'char* basename(const char*)'
>   112 | extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
>       |              ^~~~~~~~
> /usr/include/string.h:524:26: note: old declaration 'const char* basename(const char*)'
>   524 | extern "C++" const char *basename (const char *__filename)
>       |                          ^~~~~~~~
> make[1]: *** [../../..//gcc/gcc/m2/Make-lang.in:1364: m2/mc-boot/GSFIO.o] Error 1


They seem to come and go without rhyme or reason.  For example build 
#1885 on lm32-elf failed, while #1884 passed.

Aside from the fact that I coonfigure with --enable-languages=c,c++ and 
yet modula-2 stuff still gets built (can that be fixed?) it seems like 
we're missing dependencies to ensure that the generated config.h file is 
made before building the modula-2 stuff.

In a good build you'll see something like this:

config.status: creating auto-host.h
[ ... ]
Build GSFIO.o:
g++ -g -c -I. -I../../..//gcc/gcc/m2/mc-boot-ch 
-I../../..//gcc/gcc/m2/mc-boot -I../../..//gcc/gcc/../include 
-I../../..//gcc/gcc -I. -Im2/mc-boot -I../../..//gcc/gcc 
-I../../..//gcc/gcc/m2/mc-boot -I../../..//gcc/gcc/../include 
-I../../..//gcc/gcc/../libcpp/include -I../../..//gcc/gcc/../libcody 
-I../../..//gcc/gcc/../libdecnumber 
-I../../..//gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I../../..//gcc/gcc/../libbacktrace 
../../..//gcc/gcc/m2/mc-boot/GSFIO.c -o m2/mc-boot/GSFIO.o

Which naturally works just fine.

In a bad build, auto-host.h is _not_ created before trying to build GSFIO.o.

Can you please take care of this.  It's rather annoying to have builds 
failing in the continuous testing system like this, particularly when 
modula-2 isn't even enabled.

Jeff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-10  3:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09  0:11 Missing dependencies in m2/ ? Jeff Law
2023-01-09  4:18 ` Gaius Mulley
2023-01-10  1:49   ` Jeff Law
2023-01-10  3:53     ` Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).