tkchia / gcc-ia16

Fork of Lambertsen & Jenner (& al.)'s IA-16 (Intel 16-bit x86) port of GNU compilers ― added far pointers & more • use https://github.com/tkchia/build-ia16 to build • Ubuntu binaries at https://launchpad.net/%7Etkchia/+archive/ubuntu/build-ia16/ • DJGPP/MS-DOS binaries at https://gitlab.com/tkchia/build-ia16/-/releases • mirror of https://gitlab.com/tkchia/gcc-ia16

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ubuntu compile error: field ‘uc’ has incomplete type

ppsilv opened this issue · comments

Error when compiling in:
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble

./md-unwind-support.h:141:18: error: field ‘uc’ has incomplete type struct ucontext uc;
make[5]: *** [../../.././libgcc/shared-object.mk:14: unwind-dw2.o] Error 1
make[5]: Leaving directory '/home/pdsilva/Projects/gcc-ia16/x86_64-pc-linux-gnu/32/libgcc'
make[4]: *** [Makefile:1161: multi-do] Error 1
make[4]: Leaving directory '/home/pdsilva/Projects/gcc-ia16/x86_64-pc-linux-gnu/libgcc'
make[3]: *** [Makefile:120: all-multi] Error 2
make[3]: Leaving directory '/home/pdsilva/Projects/gcc-ia16/x86_64-pc-linux-gnu/libgcc'
make[2]: *** [Makefile:17378: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/home/pdsilva/Projects/gcc-ia16'
make[1]: *** [Makefile:23677: stage1-bubble] Error 2
make[1]: Leaving directory '/home/pdsilva/Projects/gcc-ia16'
make: *** [Makefile:914: all] Error 2

This happen to tag 20240218, this bug is getting older and older.
In file included from ../../.././libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function ‘x86_fallback_frame_state’:
./md-unwind-support.h:141:18: error: field ‘uc’ has incomplete type
struct ucontext uc;
^~
make[5]: *** [../../.././libgcc/shared-object.mk:14: unwind-dw2.o] Error 1
make[5]: Leaving directory '/home/pdsilva/Downloads/gcc-ia16-20240218/x86_64-pc-linux-gnu/32/libgcc'
make[4]: *** [Makefile:1161: multi-do] Error 1
make[4]: Leaving directory '/home/pdsilva/Downloads/gcc-ia16-20240218/x86_64-pc-linux-gnu/libgcc'
make[3]: *** [Makefile:120: all-multi] Error 2
make[3]: Leaving directory '/home/pdsilva/Downloads/gcc-ia16-20240218/x86_64-pc-linux-gnu/libgcc'
make[2]: *** [Makefile:17378: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/home/pdsilva/Downloads/gcc-ia16-20240218'
make[1]: *** [Makefile:23677: stage1-bubble] Error 2
make[1]: Leaving directory '/home/pdsilva/Downloads/gcc-ia16-20240218'
make: *** [Makefile:914: all] Error 2

x86_fallback_frame_state is never used when building a compiler for the ia16 target. It is only used when building an x86 or x86_64 cross compiler targetting Linux or Solaris:

[... gcc-ia16]$ grep -R x86_fallback_frame_state libgcc
libgcc/ChangeLog:	* config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove
libgcc/ChangeLog:	* config/i386/sol2-unwind.h (x86_fallback_frame_state): Likewise.
libgcc/ChangeLog:	* config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
libgcc/ChangeLog:	* config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove
libgcc/config/i386/sol2-unwind.h:#define MD_FALLBACK_FRAME_STATE_FOR x86_fallback_frame_state
libgcc/config/i386/sol2-unwind.h:x86_fallback_frame_state (struct _Unwind_Context *context,
libgcc/config/i386/linux-unwind.h:#define MD_FALLBACK_FRAME_STATE_FOR x86_fallback_frame_state
libgcc/config/i386/linux-unwind.h:x86_fallback_frame_state (struct _Unwind_Context *context,

In general, it is recommended to use https://codeberg.org/tkchia/build-ia16/ to build the toolchain.