guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#46021] Acknowledgement ([PATCH]: gnu: ecl: Propagate some dependenc


From: Zhu Zihao
Subject: [bug#46021] Acknowledgement ([PATCH]: gnu: ecl: Propagate some dependencies used in header files)
Date: Fri, 29 Jan 2021 17:34:20 +0800
User-agent: mu4e 1.4.14; emacs 27.1

Guillaume Le Vaillant writes:

> Zhu Zihao <all_but_last@163.com> 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 <ecl/ecl.h>

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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]