From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Re: guile-2.0 on mingw: the sequel Date: Sat, 24 Aug 2013 10:05:13 +0200 Message-ID: References: <83vc2wj4hz.fsf@gnu.org> <83li3siues.fsf@gnu.org> <838uzrioqr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec548a443a2f0e804e4acfbf2 X-Trace: ger.gmane.org 1377331528 26354 80.91.229.3 (24 Aug 2013 08:05:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Aug 2013 08:05:28 +0000 (UTC) Cc: "guile-user@gnu.org" To: Eli Zaretskii Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Aug 24 10:05:31 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VD8qg-0007jD-Cj for guile-user@m.gmane.org; Sat, 24 Aug 2013 10:05:30 +0200 Original-Received: from localhost ([::1]:40721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VD8qf-0008WQ-Vw for guile-user@m.gmane.org; Sat, 24 Aug 2013 04:05:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VD8qV-0008WK-Uj for guile-user@gnu.org; Sat, 24 Aug 2013 04:05:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VD8qQ-0006jz-RW for guile-user@gnu.org; Sat, 24 Aug 2013 04:05:19 -0400 Original-Received: from mail-vb0-x235.google.com ([2607:f8b0:400c:c02::235]:39283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VD8qQ-0006js-LW; Sat, 24 Aug 2013 04:05:14 -0400 Original-Received: by mail-vb0-f53.google.com with SMTP id i3so971888vbh.26 for ; Sat, 24 Aug 2013 01:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=stz+TBR2DGSn+qd66F03nAKHnuLTZUKpJwmTFVMuZ4k=; b=CzbubgLSq8Ouymd/9cJautY+HdH/+oNbHuX4CcRZUmszsVMQJGVxjhvYqEUZJJCHCW 2ylIeiPZ9tD1PfE+9oZ2Xvz+C6MA6WTqsWczmPsYjZgUecSD4kgwa8d390kWD84ATPny nN7YGBhD92D9nrly8zRSULmCiZ0MlovCvqp8TxMLib2M1Dg2NF/e/QJhh/BijfqX5w6r vPSlknUwvYLybhpnYGNIreFzxG/wnSYPg0eI6Nvilj2/YCRSon5E5KlV3AdWrHhhDU6n NUXvHWfVVI6Xsc8Cvn580Xq4nMsIvEHc/dmQe8zqLQ31SYqi1/bOd5iemnAbwmuleU8O OIQw== X-Received: by 10.52.187.65 with SMTP id fq1mr2835022vdc.13.1377331514108; Sat, 24 Aug 2013 01:05:14 -0700 (PDT) Original-Received: by 10.221.45.135 with HTTP; Sat, 24 Aug 2013 01:05:13 -0700 (PDT) In-Reply-To: <838uzrioqr.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c02::235 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10681 Archived-At: --bcaec548a443a2f0e804e4acfbf2 Content-Type: text/plain; charset=ISO-8859-1 2013/8/24 Eli Zaretskii > > yes, it seems that this was the reason. So now the guile > > interpreter runs properly, but I still have a problem with > > running a program that, having been linked against > > libguile, would call scm_with_guile or scm_init_guile, e.g. > > === > > #include > > void hi(void *unused) { scm_puts("hello!\n", scm_current_output_port()); > } > > int main() { > > scm_with_guile(hi, NULL); > > return 0; > > } > > === > > Does this work on other platforms? (I know almost nothing about > linking C programs with libguile; maybe your program has a bug, or you > are missing some function call necessary for this to work?) > > It's the simplest example I could come up with. The same code executes properly (i.e. displays "hello!") on linux. I don't know whether windows requires any additional steps for that to work. > I compile it under msys in c:/guile-2.0/bin (i.e. prefix/bin) using > > $ gcc -o hello.exe hello.c -I ../include/guile/2.0 -lguile-2.0 > > There should be no need to compile under MSYS, you can compile from > the Windows cmd window. I don't think that's the reason for your > problems, but it's worth a try. > I did, but the result's still the same (i.e. stack overflow exception). I could try linking it with libguile-1.8 and see if that works, but I''d be truly grateful if anyone who's had some experience with libguile-2.0 linkage on mingw could help me (if such person exists :D) Still, thanks for pushing my work ahead a little :) --bcaec548a443a2f0e804e4acfbf2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2013/8/24 Eli Zaretskii <eliz@gnu.org>
> yes, it seems that this was the reason. So now the g= uile
> interpreter runs properly, but I still have a problem with
> running a program that, having been linked against
> libguile, would call scm_with_guile or scm_init_guile, e.g.
> =3D=3D=3D
> #include <libguile.h>
> void hi(void *unused) { scm_puts("hello!\n", scm_current_out= put_port()); }
> int main() {
> =A0 =A0scm_with_guile(hi, NULL);
> =A0 return 0;
> }
> =3D=3D=3D

Does this work on other platforms? =A0(I know almost nothing about linking C programs with libguile; maybe your program has a bug, or you
are missing some function call necessary for this to work?)


It's the s= implest example I could come up with.
The same code executes prop= erly (i.e. displays "hello!") on linux.
I don't kno= w whether windows requires any additional steps for that
to work.

> I compile it under msys in c:/guile-2.0/bin (i.e. prefix/bin) using > $ gcc -o hello.exe hello.c -I ../include/guile/2.0 -lguile-2.0

There should be no need to compile under MSYS, you can compile from the Windows cmd window. =A0I don't think that's the reason for your=
problems, but it's worth a try.

I did, but the resu= lt's still the same (i.e. stack overflow exception).
I could try linking it with libguile-1.8 and see if that work= s, but
I''d be truly grateful if anyone who'= ;s had some experience with
libguile-2.0 li= nkage on mingw could help me (if such person exists :D)

Still, thanks for pushing my work ahea= d a little :)
--bcaec548a443a2f0e804e4acfbf2--