Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails #2

Open
sikmir opened this issue Oct 29, 2016 · 4 comments
Open

Build fails #2

sikmir opened this issue Oct 29, 2016 · 4 comments

Comments

@sikmir
Copy link
Member

sikmir commented Oct 29, 2016

Host gcc 6.2.1.

In file included from ../../gcc-4.9.2/gcc/cp/except.c:1013:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined
make[1]: *** [Makefile:1057: cp/except.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/sikmir/projects/crosstool/build-microblaze/build-gcc/gcc'
make: *** [Makefile:3976: all-gcc] Error 2
Building gcc failed
@sikmir sikmir changed the title microblaze build fails Build fails Oct 29, 2016
@AntonKozlov
Copy link
Member

Hi!

I faced same issue. As far as I can see, it's not an warning that treated as error (like -werror), but a real error detected only by newer gcc.

What is your host OS? You can use prebuilt toolchain in case you're on linux:
https://github.com/embox/crosstool/releases/tag/current

@anton-bondarev
Copy link
Contributor

Please try in #4 I update all tools version

@sikmir
Copy link
Member Author

sikmir commented Jul 11, 2018

$ gcc -v
<...>
gcc version 8.1.1 20180531 (GCC)
$ ./crosstool.sh i386
<...>
../../gcc-6.3.0/gcc/ubsan.c: In function ‘bool ubsan_use_new_style_p(location_t)’:
../../gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       || xloc.file == '\0' || xloc.file[0] == '\xff'
                       ^~~~
make[1]: *** [Makefile:1085: ubsan.o] Error 1
make[1]: Leaving directory '/home/sikmir/Projects/crosstool/build-i386/build-gcc/gcc'
make: *** [Makefile:4135: all-gcc] Error 2
Building gcc failed

@AntonKozlov
Copy link
Member

AntonKozlov commented Jul 14, 2018

I can confirm the error. It's obviously because gcc 6.3 bug is detected by recent gcc's. The filename (ubsan) hints that the bug is not in the core but in utilities, so there is no rush to update gcc version.

I can assume several options:

  1. Use prebuilt toolchain. Will that suit for you, i.e. is your host OS is Linux?
  2. Update to more recent gcc. I personally would not prefer this, it's hard to predict what other issues we'll face during update and later while using new toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants