all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Zhu Zihao <all_but_last@163.com>
To: Guillaume Le Vaillant <glv@posteo.net>
Cc: 46021@debbugs.gnu.org
Subject: [bug#46021] Acknowledgement ([PATCH]: gnu: ecl: Propagate some dependencies used in header files)
Date: Fri, 29 Jan 2021 17:34:20 +0800	[thread overview]
Message-ID: <861re49jdv.fsf@163.com> (raw)
In-Reply-To: <87a6ssxh3f.fsf@yamatai>

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]


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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

  reply	other threads:[~2021-01-29  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 15:12 [bug#46021] [PATCH]: gnu: ecl: Propagate some dependencies used in header files Zhu Zihao
     [not found] ` <handler.46021.B.16112429855183.ack@debbugs.gnu.org>
2021-01-21 15:40   ` [bug#46021] Acknowledgement ([PATCH]: gnu: ecl: Propagate some dependencies used in header files) Zhu Zihao
2021-01-29  1:56     ` Zhu Zihao
2021-01-29  8:49       ` Guillaume Le Vaillant
2021-01-29  9:34         ` Zhu Zihao [this message]
2021-02-02  9:39           ` bug#46021: " Guillaume Le Vaillant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=861re49jdv.fsf@163.com \
    --to=all_but_last@163.com \
    --cc=46021@debbugs.gnu.org \
    --cc=glv@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.