Summary
Chicken doesn't compile with TCC anymore
Metadata
- Id: eb3b40c8851f203338eb4f503e9340efd459e33b
- Trac id: 1850
- Type: defect
- Reporter: zilti
- Owner:
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: minor
- Milestone: 6.0.0
- Version: 6.0.0
- Changetime: 2025-02-03 13:49:11 UTC
- Created: 2025-02-03 09:29:19 UTC
- Keywords:
Description
Using the latest TinyCC from the mob branch. Here's the compilation error:
tcc -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -c -Os -fomit-frame-pointer chicken.c -o chicken-static.o -> In file included from chicken.c:8: In file included from chicken.h:135: In file included from /nix/store/wlavaybjbzgllhq11lib6qgr7rm8imgp-glibc-2.39-52-dev/include/complex.h:110: /nix/store/wlavaybjbzgllhq11lib6qgr7rm8imgp-glibc-2.39-52-dev/include/bits/cmathcalls.h:55: error: _Complex is not yet supported make[1]: *** [rules.make:156: chicken-static.o] Error 1 make[1]: Leaving directory '/build' make: *** [rules.make:1041: boot-chicken] Error 2
Changes and comments
[2025-02-03 13:49:11 UTC] zilti changed status from new to closed
[2025-02-03 13:49:11 UTC] zilti set resolution to fixed
[2025-02-03 13:49:11 UTC] zilti wrote:
Fixed with the following patch:
--- chicken.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chicken.h b/chicken.h index 49e38d75..3ad970e9 100644 --- a/chicken.h +++ b/chicken.h @@ -94,6 +94,10 @@ # define C_GNU_ENV #endif +#if defined (__TINYC__) +# define __STDC_NO_COMPLEX__ +#endif + #if defined(__MINGW32__) /* * XXX This should probably be renamed or changed because it's misleading. --