Guillaume Le Vaillant writes: > Zhu Zihao skribis: > >> ECL's header includes the header of gmp, libgc, libatomic-ops and >> libffi. This help fix some program use ecl as build input failed to link >> with it. > > I tried a `guix environment -C --ad-hoc ecl -- ecl --eval '(compile-file "test.lisp")'` > and ECL compiled the file successfully, so it must have found the > headers it needed. Because we already wrapped ECL executable with CPATH and LIBRARY_PATH environment variable. so any compilation done in ECL can find the library and header. If some 3-rd party program want to link with ECL(If they use ECL as thier extension language). Compiler will failed to find gmp, libgc etc. A simple example here, start with `guix environment --ad-hoc ecl` ``` chino@asus-laptop:~/tmp$ cat test.c #include int main() { cl_boot(0, NULL); return 0; } chino@asus-laptop:~/tmp$ CFLAGS="$(ecl-config --cflags) $(ecl-config --ldflags) $(ecl-config --libs)" chino@asus-laptop:~/tmp$ LANG=en_US.utf-8 gcc -c test.c -o test $CFLAGS In file included from /gnu/store/lzfxjn036h3kis13lcc222rpwcnqazkr-ecl-20.4.24/include/ecl/ecl.h:37, from test.c:1: /gnu/store/lzfxjn036h3kis13lcc222rpwcnqazkr-ecl-20.4.24/include/ecl/config.h:59:10: fatal error: gmp.h: No such file or directory 59 | #include "gmp.h" | ^~~~~~~ compilation terminated. ``` -- Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao