public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: gaiusmod@gmail.com, "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Missing dependencies in m2/ ?
Date: Sun, 8 Jan 2023 17:11:13 -0700	[thread overview]
Message-ID: <3fcd3c5b-b792-a157-2f18-2ce3ef85a5a1@gmail.com> (raw)


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

             reply	other threads:[~2023-01-09  0:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09  0:11 Jeff Law [this message]
2023-01-09  4:18 ` Gaius Mulley
2023-01-10  1:49   ` Jeff Law
2023-01-10  3:53     ` Gaius Mulley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3fcd3c5b-b792-a157-2f18-2ce3ef85a5a1@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gaiusmod@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).