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

Reply via email to