Hi all,
I'm trying to solve this problem: I have a built chicken with a 5 suffix. When I compile with csc5, it fails:
2314 address@hidden /t/bar ➤ cat bar.scm
(print "test")
2317 address@hidden /t/bar ➤ csc5 -v bar.scm
'/usr/bin/chicken5' 'bar.scm' -output-file 'bar.c' -verbose
'gcc' 'bar.c' -o 'bar.o' -c -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I/usr/include/chicken
bar.c:8:10: fatal error: chicken.h: No such file or directory
#include "chicken.h"
^~~~~~~~~~~
compilation terminated.
Error: shell command terminated with non-zero exit status 256: 'gcc' 'bar.c' -o 'bar.o' -c -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I/usr/include/chicken
It fails because C_TARGET_INCLUDE_HOME is "$(TARGET_PREFIX)/include/chicken", which doesn't contain the 5 suffix.
Invoking csc with -host makes the problem disappear. That's why this problem didn't pop up before, as chicken-install always issues csc with -host.
Felix says the C_TARGET_ are correct: they should not contain suffix/prefix because those are intended for the build machine (the host binaries gets the arm- prefix, for example, not the target binaries).
This patch essentially adds the "-host" parameter on by default whenever you're compiling with a non cross-chicken.
K.