#131 toolchain build errors, building with GCC 9.3.0

Open
opened 3 years ago by pi31415 · 2 comments
pi31415 commented 3 years ago

Hi, when I try to build librecmc, it fails with some error while trying to build the toolchain. I'm currently using GCC 9.3.0, but could try a different GCC major version if I knew which one(s) are supported.

Not sure how much additional info you care about at this point, but here is the system information and then the errors:

christopher@eowyn ~$ neofetch .. . christopher@eowyn --....` `....------------------- .-:///-:::.-:::///:-. OS: Guix System c8b8e612dd

  ````.:::`     `:::.````        Host: Vostro 230 00 
       -//:`    -::-             Kernel: 5.4.32-gnu 
        ://:   -::-              Uptime: 28 days, 3 hours, 35 mins 
        `///- .:::`              Packages: 57 (guix-system), 87 (guix-user) 
         -+++-:::.               Shell: bash 5.0.7 
          :+/:::-                Resolution: 1920x1200 
          `-....`                DE: GNOME 
                                 Theme: Adwaita [GTK2/3] 
                                 Icons: Adwaita [GTK2/3] 
                                 Terminal: .gnome-terminal 
                                 CPU: Intel Core 2 Duo E7500 (2) @ 2.623GHz 
                                 GPU: Intel 4 Series Chipset 
                                 Memory: 4821MiB / 7929MiB 

buix guix commit:

Generation 17 May 06 2020 11:20:32 guix 758f32a

repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 758f32afdbc6cf6018a2e76eef5085f6b693c15a

Build errors:

make[5]: Entering directory '/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0-initial/gcc' TARGET_CPU_DEFAULT="" \ HEADERS="auto-host.h ansidecl.h" DEFINES="" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh config.h TARGET_CPU_DEFAULT="((MASK_SPLIT_ADDRESSES)|MASK_EXPLICIT_RELOCS)|MASK_RELAX_PIC_CALLS" \ HEADERS="options.h insn-constants.h config/dbxelf.h config/elfos.h config/gnu-user.h config/linux.h config/linux-android.h config/glibc-stdint.h config/vxworks-dummy.h config/mips/mips.h config/mips/gnu-user.h config/mips/linux.h config/mips/linux-common.h config/initfini-array.h defaults.h" DEFINES="LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4 DEFAULT_LIBC=LIBC_MUSL ANDROID_DEFAULT=0" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh tm.h TARGET_CPU_DEFAULT="" \ HEADERS="config/mips/mips-protos.h config/linux-protos.h tm-preds.h" DEFINES="" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh tm_p.h TARGET_CPU_DEFAULT="" \ HEADERS="auto-host.h ansidecl.h" DEFINES="" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh bconfig.h g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/build -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/../include -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/../libcpp/include

In file included from ./bconfig.h:3,

             from /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/genmddeps.c:18:

./auto-host.h:2363:16: error: declaration does not declare anything [-fpermissive] 2363 | #define rlim_t long

  |                ^~~~

/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/system.h:488:14: error: conflicting declaration of C function 'void* sbrk(int)' 488 | extern void *sbrk (int);

  |              ^~~~

In file included from /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/genmddeps.c:19: /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/system.h:496:14: error: ambiguating new declaration of 'char* strstr(const char, const char)' 496 | extern char *strstr (const char *, const char *);

  |              ^~~~~~

/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/system.h:540:20: error: conflicting declaration of C function 'const char* strsignal(int)' 540 | extern const char *strsignal (int);

  |                    ^~~~~~~~~

/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/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);

  |              ^~~~~~~~
Hi, when I try to build librecmc, it fails with some error while trying to build the toolchain. I'm currently using GCC 9.3.0, but could try a different GCC major version if I knew which one(s) are supported. Not sure how much additional info you care about at this point, but here is the system information and then the errors: christopher@eowyn ~$ neofetch .. `. christopher@eowyn `--..```..` `..```..--` ----------------- .-:///-:::. `-:::///:-. OS: Guix System c8b8e612dddf6249fafbaa34ce ````.:::` `:::.```` Host: Vostro 230 00 -//:` -::- Kernel: 5.4.32-gnu ://: -::- Uptime: 28 days, 3 hours, 35 mins `///- .:::` Packages: 57 (guix-system), 87 (guix-user) -+++-:::. Shell: bash 5.0.7 :+/:::- Resolution: 1920x1200 `-....` DE: GNOME Theme: Adwaita [GTK2/3] Icons: Adwaita [GTK2/3] Terminal: .gnome-terminal CPU: Intel Core 2 Duo E7500 (2) @ 2.623GHz GPU: Intel 4 Series Chipset Memory: 4821MiB / 7929MiB buix guix commit: Generation 17 May 06 2020 11:20:32 guix 758f32a repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 758f32afdbc6cf6018a2e76eef5085f6b693c15a Build errors: make[5]: Entering directory '/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0-initial/gcc' TARGET_CPU_DEFAULT="" \ HEADERS="auto-host.h ansidecl.h" DEFINES="" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh config.h TARGET_CPU_DEFAULT="((MASK_SPLIT_ADDRESSES)|MASK_EXPLICIT_RELOCS)|MASK_RELAX_PIC_CALLS" \ HEADERS="options.h insn-constants.h config/dbxelf.h config/elfos.h config/gnu-user.h config/linux.h config/linux-android.h config/glibc-stdint.h config/vxworks-dummy.h config/mips/mips.h config/mips/gnu-user.h config/mips/linux.h config/mips/linux-common.h config/initfini-array.h defaults.h" DEFINES="LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4 DEFAULT_LIBC=LIBC_MUSL ANDROID_DEFAULT=0" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh tm.h TARGET_CPU_DEFAULT="" \ HEADERS="config/mips/mips-protos.h config/linux-protos.h tm-preds.h" DEFINES="" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh tm_p.h TARGET_CPU_DEFAULT="" \ HEADERS="auto-host.h ansidecl.h" DEFINES="" \ /bin/sh /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/mkconfig.sh bconfig.h g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/build -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/../include -I/home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/../libcpp/include \ In file included from ./bconfig.h:3, from /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/genmddeps.c:18: ./auto-host.h:2363:16: error: declaration does not declare anything [-fpermissive] 2363 | #define rlim_t long | ^~~~ /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/system.h:488:14: error: conflicting declaration of C function 'void* sbrk(int)' 488 | extern void *sbrk (int); | ^~~~ In file included from /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/genmddeps.c:19: /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/system.h:496:14: error: ambiguating new declaration of 'char* strstr(const char*, const char*)' 496 | extern char *strstr (const char *, const char *); | ^~~~~~ /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/gcc/system.h:540:20: error: conflicting declaration of C function 'const char* strsignal(int)' 540 | extern const char *strsignal (int); | ^~~~~~~~~ /home/christopher/Build/librecmc-20200423-simple-nor/build_dir/toolchain-mips_24kc_gcc-7.5.0_musl/gcc-7.5.0/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); | ^~~~~~~~
RISCI_ATOM commented 3 years ago
Collaborator

Hi, when I try to build librecmc, it fails with some error while trying to build the toolchain. I'm currently using GCC 9.3.0, but could try a different GCC major version if I knew which one(s) are supported.

libreCMC v1.5.x has been built using gcc 5.4 (Trisquel 8 / ubuntu 16.04), 7.3.0 (Trisquel 9 / ubuntu 18.04) and 9.3.0 (ubuntu 20.04 / Fedora 31). I've also built it using GCC 10.1 with a few patches.

> Hi, when I try to build librecmc, it fails with some error while trying to build the toolchain. I'm currently using GCC 9.3.0, but could try a different GCC major version if I knew which one(s) are supported. libreCMC v1.5.x has been built using gcc 5.4 (Trisquel 8 / ubuntu 16.04), 7.3.0 (Trisquel 9 / ubuntu 18.04) and 9.3.0 (ubuntu 20.04 / Fedora 31). I've also built it using GCC 10.1 with a few patches.
pi31415 commented 3 years ago
Poster

Am getting the same errors building with GCC 7.5.

From the error output, seems that functions being built for the librecmc gcc-toolchain are conflicting with the declarations in the host gcc-toolchain. Presumably my environment must be missing some kind of flag or something that prevents that. Guess I'll have to get myself educated on how gcc compiles itself without these conflicts.

Am getting the same errors building with GCC 7.5. From the error output, seems that functions being built for the librecmc gcc-toolchain are conflicting with the declarations in the host gcc-toolchain. Presumably my environment must be missing some kind of flag or something that prevents that. Guess I'll have to get myself educated on how gcc compiles itself without these conflicts.
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.