GNU bug report logs - #41091
can't build external gcc

Previous Next

Package: guix;

Reported by: Tim Komarov <happycorsair <at> yandex.ru>

Date: Tue, 5 May 2020 01:50:01 UTC

Severity: normal

To reply to this bug, email your comments to 41091 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#41091; Package guix. (Tue, 05 May 2020 01:50:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tim Komarov <happycorsair <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 05 May 2020 01:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tim Komarov <happycorsair <at> yandex.ru>
To: bug-guix <bug-guix <at> gnu.org>
Subject: can't build external gcc
Date: Tue, 05 May 2020 04:35:31 +0300
[Message part 1 (text/plain, inline)]
Many projects (Buildroot, coreboot, Yocto) require building a toolchain.

Every time it tries to build it (I've checked Buildroot and coreboot) it fails with the following errors:

In file included from ./bconfig.h:3:0,
                 from ../../gcc/gengtype-lex.c:4:
./auto-host.h:2396:16: error: declaration does not declare anything [-fpermissive]
 #define rlim_t long
                ^
In file included from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:0:
../../gcc/system.h:488:14: error: conflicting declaration of C function ‘void* sbrk(int)’
 extern void *sbrk (int);

In file included from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:0:
../../gcc/system.h:496:14: error: ambiguating new declaration of ‘char* strstr(const char*, const char*)’
 extern char *strstr (const char *, const char *);

In file included from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:0:
../../gcc/system.h:540:20: error: conflicting declaration of C function ‘const char* strsignal(int)’
 extern const char *strsignal (int);

In file included from ../../gcc/system.h:691:0,
                 from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:
../../gcc/../include/libiberty.h:112:14: error: ambiguating new declaration of ‘char* basename(const char*)’
 extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);

Switching gcc versions doesn't help.

One can find a simple way to reproduce in buildroot.txt, build-gcc.log provides a complete log.

Looking forward for your help. Thanks!

-- 
Best Regards,
Timofey Komarov
[build-gcc.log (text/x-c, attachment)]
[buildroot.txt (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#41091; Package guix. (Wed, 06 May 2020 10:22:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: raingloom <raingloom <at> riseup.net>
To: bug-guix <at> gnu.org
Subject: Re: bug#41091: can't build external gcc
Date: Wed, 6 May 2020 12:21:20 +0200
On Tue, 05 May 2020 04:35:31 +0300
Tim Komarov <happycorsair <at> yandex.ru> wrote:

> Many projects (Buildroot, coreboot, Yocto) require building a
> toolchain.
> 
> Every time it tries to build it (I've checked Buildroot and coreboot)
> it fails with the following errors:
> 
> In file included from ./bconfig.h:3:0,
>                  from ../../gcc/gengtype-lex.c:4:
> ./auto-host.h:2396:16: error: declaration does not declare anything
> [-fpermissive] #define rlim_t long
>                 ^
> In file included from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:0:
> ../../gcc/system.h:488:14: error: conflicting declaration of C
> function ‘void* sbrk(int)’ extern void *sbrk (int);
> 
> In file included from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:0:
> ../../gcc/system.h:496:14: error: ambiguating new declaration of
> ‘char* strstr(const char*, const char*)’ extern char *strstr (const
> char *, const char *);
> 
> In file included from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:0:
> ../../gcc/system.h:540:20: error: conflicting declaration of C
> function ‘const char* strsignal(int)’ extern const char *strsignal
> (int);
> 
> In file included from ../../gcc/system.h:691:0,
>                  from /d/gcc-8.4.0/gcc-8.4.0/gcc/gengtype-lex.l:30:
> ../../gcc/../include/libiberty.h:112:14: error: ambiguating new
> declaration of ‘char* basename(const char*)’ extern char *basename
> (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
> 
> Switching gcc versions doesn't help.
> 
> One can find a simple way to reproduce in buildroot.txt,
> build-gcc.log provides a complete log.
> 
> Looking forward for your help. Thanks!
> 
> -- 
> Best Regards,
> Timofey Komarov

What I'm trying to do (currently with devkitPro and EDK2) is to just
create a Guix package for the patched GCC toolchain and either use that
directly (devkitPro) or convince the build scripts to use the packaged
toolchain (EDK2).

I'm not sure if it will work out, but in the long run, it seems like
the better choice. That is, if it will work at all.




This bug report was last modified 3 years and 327 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.