[PATCH]: gnu: ecl: Propagate some dependencies used in header files

  • Done
  • quality assurance status badge
Details
2 participants
  • Zhu Zihao
  • Guillaume Le Vaillant
Owner
unassigned
Submitted by
Zhu Zihao
Severity
normal
Z
Z
Zhu Zihao wrote on 21 Jan 2021 16:12
(address . guix-patches@gnu.org)
86im7q8gti.fsf@163.com
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.



--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYAmZ2RUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQvkKzUqn2gh9w9gEAsAaP8tQs2CUMM+il72WiiSdL2f5v
4CD+dOd7feJds1kA/Azz3lTUITPIneAWysAOrPWH6pxncEQeRhEKN02tcVAE
=S5l2
-----END PGP SIGNATURE-----

Z
Z
Zhu Zihao wrote on 21 Jan 2021 16:40
Re: bug#46021: Acknowledgement ([PATCH]: gnu: ecl: Propagate some dependencies used in header files)
(address . 46021@debbugs.gnu.org)
86bldi8fid.fsf@163.com

-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYAmgehUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQvkKzUqn2gh8e3gD/YKTOHQsp18HndcbCIlQkm3bcZ8ca
7Rfbgd6x9jjJWWkBAIylpM1rmoaasbZa3+Fyc124rEKf8JnxRW5CSbasRhkM
=pz74
-----END PGP SIGNATURE-----

From 191564b413e7e95e0e246935026392cd152464fe Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 21 Jan 2021 23:06:52 +0800
Subject: [PATCH] gnu: ecl: Propagate some dependencies used in header files.

* gnu/packages/lisp.scm(ecl)[inputs]: Remove.
[propagated-inputs]: Add gmp, libatomic-ops, libgc, libffi.
---
gnu/packages/lisp.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 3c09b0af8a..fb4f7cb7bd 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -236,7 +236,7 @@ interface to the Tk widget system.")
`(("cl-asdf" ,cl-asdf)
("which" ,which)
("texinfo" ,texinfo)))
- (inputs
+ (propagated-inputs
`(("gmp" ,gmp)
("libatomic-ops" ,libatomic-ops)
("libgc" ,libgc)
--
2.30.0
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
From 191564b413e7e95e0e246935026392cd152464fe Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Thu, 21 Jan 2021 23:06:52 +0800
Subject: [PATCH] gnu: ecl: Propagate some dependencies used in header files.

* gnu/packages/lisp.scm(ecl)[inputs]: Remove.
[propagated-inputs]: Add gmp, libatomic-ops, libgc, libffi.
---
gnu/packages/lisp.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 3c09b0af8a..fb4f7cb7bd 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -236,7 +236,7 @@ interface to the Tk widget system.")
`(("cl-asdf" ,cl-asdf)
("which" ,which)
("texinfo" ,texinfo)))
- (inputs
+ (propagated-inputs
`(("gmp" ,gmp)
("libatomic-ops" ,libatomic-ops)
("libgc" ,libgc)
--
2.30.0
Z
Z
Zhu Zihao wrote on 29 Jan 2021 02:56
(address . 46021@debbugs.gnu.org)
86mtwsa4l6.fsf@163.com
ping.
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYBNrRRUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQvkKzUqn2gh/liAD/Rd8O/SPAGnDViUdQZsFNgNoeEWdf
qBH9cwnMVVYuLEcA/R6Kan+WP8jatN9cJidTnrGDD+pVJb7Oqb4ZQb21ikwB
=jaLZ
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 29 Jan 2021 09:49
Re: [bug#46021] Acknowledgement ([PATCH]: gnu: ecl: Propagate some dependencies used in header files)
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 46021@debbugs.gnu.org)
87a6ssxh3f.fsf@yamatai
Zhu Zihao <all_but_last@163.com> skribis:

Toggle quote (4 lines)
> 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.

Could you give an example of build failure solved by your patch?
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYBPMNA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j/I0gD/Yqt6HWKcIEEVqmb5X2h02God2IdjvPghF0X7
9q+kVlMBAI4MxW4guOUk1nncusSP+KShgmyAfoDlyMKyJyKQWEJV
=/eVM
-----END PGP SIGNATURE-----

Z
Z
Zhu Zihao wrote on 29 Jan 2021 10:34
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 46021@debbugs.gnu.org)
861re49jdv.fsf@163.com
Guillaume Le Vaillant writes:

Toggle quote (10 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYBPWnBUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQvkKzUqn2gh/uYgD+PESHNXs+jj4ISXja7w46auSo4ysm
6IkFqHnaO1tMb8sBAMtvOXLzn308hBaT0tZLRWbERHS0viaA2uOp3S8rqC0H
=QVI6
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 2 Feb 2021 10:39
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 46021-done@debbugs.gnu.org)
87o8h295bd.fsf@yamatai
Patch pushed as 90ad8bd1a63abbf94f2ebb9f10630773d1f15ece.
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYBkd1g8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+sngEAmxOdKYktqaKAvejfBzfj0UEvKEp1LkRQ2pat
qpzlIHYA/3ipgetPAjNgTSS4GkVWgzrV0ymbvN71d7mhVmbCHUq1
=ageE
-----END PGP SIGNATURE-----

Closed
?