Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-standalone fails with "configP.h: file not found" #1013

Closed
shirok opened this issue Apr 10, 2024 · 2 comments
Closed

build-standalone fails with "configP.h: file not found" #1013

shirok opened this issue Apr 10, 2024 · 2 comments

Comments

@shirok
Copy link
Owner

shirok commented Apr 10, 2024

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.

@shirok
Copy link
Owner Author

shirok commented Apr 10, 2024

Aah, gauche/static.h turns LIBGAUCHE_BODY on.

shirok added a commit that referenced this issue Apr 10, 2024
@shirok
Copy link
Owner Author

shirok commented Apr 10, 2024

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.

@shirok shirok closed this as completed Apr 10, 2024
shirok added a commit that referenced this issue Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant