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

* Re: Missing dependencies in m2/ ?
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Gaius Mulley @ 2023-01-09  4:18 UTC (permalink / raw)
  To: Jeff Law via Gcc-patches; +Cc: gaiusmod, Jeff Law

Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> writes:

> 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

Hi Jeff,

many apologies for the breakage - I've now added the Makefile
dependencies.  I've also regenerated the m2 configure scripts

regards,
Gaius

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

* Re: Missing dependencies in m2/ ?
  2023-01-09  4:18 ` Gaius Mulley
@ 2023-01-10  1:49   ` Jeff Law
  2023-01-10  3:53     ` Gaius Mulley
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2023-01-10  1:49 UTC (permalink / raw)
  To: Gaius Mulley, Jeff Law via Gcc-patches; +Cc: gaiusmod



On 1/8/23 21:18, Gaius Mulley wrote:
> Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> 
>> 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
> 
> Hi Jeff,
> 
> many apologies for the breakage - I've now added the Makefile
> dependencies.  I've also regenerated the m2 configure scripts
I'm still seeing it as of about 2 hours ago:

http://law-sandy.freeddns.org:8080/job/avr-elf/2125/console

A good run (yesterday):

http://law-sandy.freeddns.org:8080/job/avr-elf/2124/console


However, I did find that my scripts were enabling all languages -- sorry 
I stated otherwise and blamed it on the M2 front-end.  THe only issue we 
need to resolve is the dependency problems.

jeff

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

* Re: Missing dependencies in m2/ ?
  2023-01-10  1:49   ` Jeff Law
@ 2023-01-10  3:53     ` Gaius Mulley
  0 siblings, 0 replies; 4+ messages in thread
From: Gaius Mulley @ 2023-01-10  3:53 UTC (permalink / raw)
  To: Jeff Law; +Cc: Jeff Law via Gcc-patches, gaiusmod2

Jeff Law <jeffreyalaw@gmail.com> writes:

> I'm still seeing it as of about 2 hours ago:
>
> http://law-sandy.freeddns.org:8080/job/avr-elf/2125/console
>
> A good run (yesterday):
>
> http://law-sandy.freeddns.org:8080/job/avr-elf/2124/console
>
>
Hi Jeff,

many thanks for the urls above - useful I'll attempt to reproduce the
gcc compile.

> However, I did find that my scripts were enabling all languages --
> sorry I stated otherwise and blamed it on the M2 front-end.

No problem at all - it allowed me to find I was using wrong
version of autoconf :-).

> THe only issue we need to resolve is the dependency problems.

Yes indeed, I think I've found some missing dependencies which I'll push
to git when the bootstrap completes.  In the meantime here is the patch:

regards,
Gaius

------- o< ------- o< ------- o< ------- o< ------- o< ------- o< ------- o<
diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index 08d0f3b963f..5c173f22540 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -1360,7 +1360,7 @@ m2/boot-bin/mc$(exeext): $(BUILD-MC-BOOT-O) $(BUILD-MC-INTERFACE-O) \
          $(BUILD-MC-INTERFACE-O) m2/mc-boot/main.o \
          mcflex.o m2/gm2-libs-boot/RTcodummy.o -lm
 
-m2/mc-boot/$(SRC_PREFIX)%.o: m2/mc-boot/$(SRC_PREFIX)%.c
+m2/mc-boot/$(SRC_PREFIX)%.o: m2/mc-boot/$(SRC_PREFIX)%.c m2/gm2-libs/gm2-libs-host.h
 	$(CXX) -g -c -I. -I$(srcdir)/m2/mc-boot-ch -I$(srcdir)/m2/mc-boot -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) $< -o $@
 
 m2/mc-boot-ch/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.c m2/gm2-libs/gm2-libs-host.h
@@ -1373,7 +1373,7 @@ m2/mc-boot/main.o: $(M2LINK) $(srcdir)/m2/init/mcinit
 	unset CC ; $(M2LINK) -s --langc++ --exit --name m2/mc-boot/main.c $(srcdir)/m2/init/mcinit
 	$(CXX) -g -c -I. -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) m2/mc-boot/main.c -o $@
 
-mcflex.o: mcflex.c
+mcflex.o: mcflex.c m2/gm2-libs/gm2-libs-host.h
 	$(CC) -I$(srcdir)/m2/mc -g -c $< -o $@   # remember that mcReserved.h is copied into m2/mc
 
 mcflex.c: $(srcdir)/m2/mc/mc.flex

^ 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).