* [PATCH] Add guile-fibers (needs help)
@ 2016-12-05 18:42 Christopher Allan Webber
2016-12-05 20:44 ` Ricardo Wurmus
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Allan Webber @ 2016-12-05 18:42 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2794 bytes --]
Hello,
I started a patch to add guile-fibers, which I know many of us are
intertested in giving a spin, but I haven't gotten things to build
right. The funny thing is I can get it to build fine from the tarball
itself. I'm missing something in the package, but I don't know what.
Here's the error I get during "make":
Backtrace:
In ice-9/boot-9.scm:
2788:17 19 (resolve-interface (fibers internal) #:select _ #:hide _ …)
2713:10 18 (_ (fibers internal) _ _ #:ensure _)
2989:16 17 (try-module-autoload _ _)
2325:4 16 (save-module-excursion #<procedure cf79f0 at ice-9/boot…>)
3009:22 15 (_)
In unknown file:
14 (primitive-load-path "fibers/internal" #<procedure c2d0…>)
In ice-9/eval.scm:
710:20 13 (primitive-eval (define-module (fibers internal) # (…) …))
In ice-9/psyntax.scm:
1209:36 12 (expand-top-sequence ((define-module (fibers #) # # …)) …)
1156:24 11 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
279:10 10 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
In ice-9/eval.scm:
293:34 9 (_ #<module (#{ g1042}#) a45480>)
In ice-9/boot-9.scm:
2849:10 8 (define-module* _ #:filename _ #:pure _ #:version _ # _ …)
2788:17 7 (resolve-interface (fibers epoll) #:select _ #:hide _ # …)
2713:10 6 (_ (fibers epoll) _ _ #:ensure _)
2989:16 5 (try-module-autoload _ _)
2325:4 4 (save-module-excursion #<procedure d2ad80 at ice-9/boot…>)
3009:22 3 (_)
In unknown file:
2 (primitive-load-path "fibers/epoll" #<procedure c96fa0 …>)
1 (load-extension "epoll" "init_fibers_epoll")
In ice-9/boot-9.scm:
753:26 0 (dispatch-exception _ _ _)
ice-9/boot-9.scm:753:26: In procedure dispatch-exception:
ice-9/boot-9.scm:753:26: In procedure dynamic-link: file: "epoll", message: "file not found"
make[1]: *** [Makefile:1381: fibers/channels.go] Error 1
make[1]: Leaving directory '/tmp/guix-build-guile-fibers-0.3.0.drv-0/fibers-0.3.0'
make: *** [Makefile:498: all] Error 2
phase `build' failed after 3.4 seconds
Funny thing is, if I become the builder user and then try running
./configure && make after sourcing the environment variables, things
build fine.
One of the two must be true, afaict:
- ... either there's something in the system environment that's being
included that I'm missing
- ... or Guix is patching the gnu-build-system stuff in such a way
that things are different than when I run ./configure && make?
I'd really like this package to work but am not sure I have the time to
continue on it soon. If someone wants to take over from here, go for
it. Maybe what I'm missing is something obvious...
- Chris
[-- Attachment #2: 0001-gnu-Add-guile-fibers.patch --]
[-- Type: text/x-patch, Size: 2323 bytes --]
From d7952e26edb3732516f1e1743383a4ef68832661 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Mon, 5 Dec 2016 12:18:23 -0600
Subject: [PATCH] gnu: Add guile-fibers.
* gnu/packages/guile.scm (guile-fibers): New variable.
---
gnu/packages/guile.scm | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 4572544..4568434 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015 Christopher Allan Webber <cwebber@dustycloud.org>
+;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
@@ -1412,4 +1412,32 @@ type system, elevating types to first-class status.")
dictionary and suggesting spelling corrections.")
(license gpl3+)))
+(define-public guile-fibers
+ (package
+ (name "guile-fibers")
+ (version "0.3.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://wingolog.org/pub/fibers/fibers-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1dc6d2ncclrd7napzf5b0mbw3xxsv43kb471ciz9v7r22277n9m7"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("texinfo" ,texinfo)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("guile" ,guile-next)))
+ (synopsis "Concurrent ML-like concurrency for Guile")
+ (description
+ "Fibers adds concurrency to Guile, inspired by systems like Concurrent ML
+and Erlang. Fibers are lightweight \"thread\"-like objects which communicate
+through channels.
+
+Note that Fibers makes use of some Guile 2.1/2.2-specific features and
+is not available for Guile 2.0.")
+ (home-page "https://github.com/wingo/fibers")
+ (license lgpl3+)))
+
;;; guile.scm ends here
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add guile-fibers (needs help)
2016-12-05 18:42 [PATCH] Add guile-fibers (needs help) Christopher Allan Webber
@ 2016-12-05 20:44 ` Ricardo Wurmus
0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2016-12-05 20:44 UTC (permalink / raw)
To: Christopher Allan Webber; +Cc: guix-devel
Christopher Allan Webber <cwebber@dustycloud.org> writes:
> Hello,
>
> I started a patch to add guile-fibers, which I know many of us are
> intertested in giving a spin, but I haven't gotten things to build
> right. The funny thing is I can get it to build fine from the tarball
> itself. I'm missing something in the package, but I don't know what.
With these arguments I can build fibers.
(arguments
`(#:parallel-build? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-epoll-path
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "fibers/epoll.scm"
(("load-extension \"epoll\"")
"load-extension \".libs/epoll\""))
#t)))))
I don’t think that’s right, though, because it probably won’t find epoll
at runtime. Maybe this can be avoided at build time with an environment
variable? In the end I think “epoll” should be replaced with the full
store path of the epoll shared object.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
http://elephly.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-05 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 18:42 [PATCH] Add guile-fibers (needs help) Christopher Allan Webber
2016-12-05 20:44 ` Ricardo Wurmus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).