* Re: Problem compiling related to block-growth-factor fluid
[not found] ` <20111121104333.GA17397@ccellier.rd.securactive.lan>
@ 2011-11-21 13:35 ` rixed
2011-11-23 11:55 ` bug#10093: " Andy Wingo
0 siblings, 1 reply; 2+ messages in thread
From: rixed @ 2011-11-21 13:35 UTC (permalink / raw)
To: guile-user; +Cc: bug-guile
[-- Attachment #1: Type: text/plain, Size: 279 bytes --]
Here is a minimal example reproducing the problem.
Note that it only fails the first time (when scheme.scm is compiled).
Note: I put bug-guile on CC, hoping it will not trash the attachments,
because with this example I'm starting to believe there is something
wrong going on.
[-- Attachment #2: Makefile --]
[-- Type: text/plain, Size: 131 bytes --]
CFLAGS += $(shell guile-config compile) -std=c99
LDLIBS += $(shell guile-config link) -lpthread
all: main
clean:
rm -f *.o main
[-- Attachment #3: scheme.scm --]
[-- Type: text/plain, Size: 162 bytes --]
(define-module (test))
(use-modules (system base compile))
(define prog '(lambda (a b c)
(+ a b c)))
(define (f)
(compile prog)
(display "done\n"))
[-- Attachment #4: main.c --]
[-- Type: text/x-csrc, Size: 690 bytes --]
#include <stdlib.h>
#include <pthread.h>
#include <libguile.h>
static void *eval_string(void *str)
{
SCM module = scm_c_resolve_module("guile-user");
(void)scm_c_eval_string_in_module(str, module);
return NULL;
}
static void *do_call_f(void *name)
{
SCM module = scm_c_resolve_module("test");
SCM proc_var = scm_c_module_lookup(module, name);
SCM proc = scm_variable_ref(proc_var);
(void)scm_call_0(proc);
return NULL;
}
void *thread(void *arg)
{
(void)arg;
scm_with_guile(do_call_f, "f");
return NULL;
}
int main(void)
{
pthread_t pt;
scm_with_guile(eval_string, "(load \"scheme.scm\")");
pthread_create(&pt, NULL, thread, NULL);
pthread_join(pt, NULL);
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#10093: Problem compiling related to block-growth-factor fluid
2011-11-21 13:35 ` Problem compiling related to block-growth-factor fluid rixed
@ 2011-11-23 11:55 ` Andy Wingo
0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2011-11-23 11:55 UTC (permalink / raw)
To: rixed; +Cc: guile-user, 10093-done
On Mon 21 Nov 2011 14:35, rixed@happyleptic.org writes:
> Here is a minimal example reproducing the problem.
> Note that it only fails the first time (when scheme.scm is compiled).
Fixed in stable-2.0. Thanks for the report!
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-23 11:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20111121092607.GA26768@ccellier.rd.securactive.lan>
[not found] ` <20111121104333.GA17397@ccellier.rd.securactive.lan>
2011-11-21 13:35 ` Problem compiling related to block-growth-factor fluid rixed
2011-11-23 11:55 ` bug#10093: " Andy Wingo
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).