flagxor / ueforth

Apache License 2.0
95 stars 26 forks source link

Error building with gcc 13.2.1 #69

Open erlanger opened 4 months ago

erlanger commented 4 months ago

Using archlinux to build.

$ ninja posix
FAILED: out/posix/ueforth 
g++ -O2 -I . -I out -s -DUEFORTH_MINIMAL -fno-exceptions -ffreestanding -fno-stack-protector -fomit-frame-pointer -fno-ident -ffunction-sections -fdata-sections -fmerge-all-constants -Wl,--build-id=none -std=c++11 -Wall -Werror -no-pie -Wl,--gc-sections -s -Wl,--gc-sections -no-pie -Wl,--build-id=none posix/main.c -o out/posix/ueforth -ldl -MD -MF out/posix/ueforth.d && strip -S --strip-unneeded --remove-section=.note.gnu.gold-version --remove-section=.comment --remove-section=.note --remove-section=.note.gnu.build-id --remove-section=.note.ABI-tag out/posix/ueforth
In file included from /usr/include/c++/13.2.1/cmath:41,
                 from /usr/include/c++/13.2.1/math.h:36,
                 from ./common/floats.h:15,
                 from posix/main.c:22:
/usr/include/c++/13.2.1/bits/requires_hosted.h:34:4: error: #error "This header is not available in freestanding mode."
   34 | #  error "This header is not available in freestanding mode."
      |    ^~~~~
In file included from /usr/include/features.h:503,
                 from /usr/include/dlfcn.h:22,
                 from posix/main.c:15:
/usr/include/stdlib.h:740:38: error: ‘int at_quick_exit(void (*)())’ conflicts with a previous declaration
  740 |      __THROW __asm ("at_quick_exit") __nonnull ((1));
      |                                      ^~~~~~~~~
In file included from /usr/include/c++/13.2.1/stdlib.h:36,
                 from ./common/tier0_opcodes.h:17,
                 from posix/main.c:19:
/usr/include/c++/13.2.1/cstdlib:63:18: note: previous declaration ‘int std::at_quick_exit(void (*)())’
   63 |   extern "C" int at_quick_exit(void (*)(void)) _GLIBCXX_NOTHROW;
      |                  ^~~~~~~~~~~~~
ninja: build stopped: subcommand failed.