`build-standalone` fails with "configP.h: file not found"
shirok opened this issue · comments
Shiro Kawai commented
t.scm:
(define (main args) (print "Hello, world.") 0)
and:
$ gosh tools/build-standalone t.scm
gcc -fPIC -I/usr/lib/gauche-0.98/0.9.14-p1/include -o t tAKoF4N.c -L/usr/lib/gauche-0.98/0.9.14-p1/x86_64-pc-linux-gnu -lgauche-static-0.98 -lgdbm -lz -lmbedtls -lmbedx509 -lmbedcrypto -lmbedtls -lcrypt -lrt -lm -lpthread
In file included from tAKoF4N.c:3:
/usr/lib/gauche-0.98/0.9.14-p1/include/gauche.h:45:10: fatal error: gauche/priv/configP.h: No such file or directory
45 | #include "gauche/priv/configP.h" /* Only used while compiling Gauche itself */
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
configP.h
is included only if LIBGAUCHE_BODY
is set before gauche.h
.
build-standalone
shouldn't set it, or we need a different flag to control configP.h
inclusion.
Additionally, tests failed to detect this because from the source directiory confiP.h
is visible.
Shiro Kawai commented
Aah, gauche/static.h
turns LIBGAUCHE_BODY
on.
Shiro Kawai commented
Fixed.
There's a test of build-standalone
in test/script.scm
but it failed to detect this case, since in the testing environment configP.h
is visible. It'll be a bit tricky to construct tests that detects this, for we need a temporary installment. We could use github workflow, maybe.