From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Andreas Rottmann <a.rottmann@gmx.at>
Newsgroups: gmane.lisp.guile.user
Subject: Re: Failing to build g-wrap for guile 1.9.10
Date: Wed, 02 Jun 2010 21:29:11 +0200
Message-ID: <87sk55b5dk.fsf@delenn.lan>
References: <1275349131.20213.11.camel@romel-compaq>
	<m34ohnqfcr.fsf@pobox.com> <1275417850.3290.13.camel@romel-compaq>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Trace: dough.gmane.org 1275507270 2495 80.91.229.12 (2 Jun 2010 19:34:30 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Wed, 2 Jun 2010 19:34:30 +0000 (UTC)
Cc: Andy Wingo <wingo@pobox.com>, guile-user@gnu.org
To: Romel Sandoval <romel@lavabit.com>
Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jun 02 21:34:28 2010
connect(): No such file or directory
Return-path: <guile-user-bounces+guile-user=m.gmane.org@gnu.org>
Envelope-to: guile-user@m.gmane.org
Original-Received: from lists.gnu.org ([199.232.76.165])
	by lo.gmane.org with esmtp (Exim 4.69)
	(envelope-from <guile-user-bounces+guile-user=m.gmane.org@gnu.org>)
	id 1OJths-0006lJ-Bh
	for guile-user@m.gmane.org; Wed, 02 Jun 2010 21:34:28 +0200
Original-Received: from localhost ([127.0.0.1]:35015 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1OJthr-00014Q-6X
	for guile-user@m.gmane.org; Wed, 02 Jun 2010 15:34:27 -0400
Original-Received: from [140.186.70.92] (port=47530 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1OJtd1-0005SB-J1
	for guile-user@gnu.org; Wed, 02 Jun 2010 15:29:35 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <a.rottmann@gmx.at>) id 1OJtcv-0001yL-Lq
	for guile-user@gnu.org; Wed, 02 Jun 2010 15:29:26 -0400
Original-Received: from mail.gmx.net ([213.165.64.20]:58022)
	by eggs.gnu.org with smtp (Exim 4.69)
	(envelope-from <a.rottmann@gmx.at>) id 1OJtcv-0001xy-AU
	for guile-user@gnu.org; Wed, 02 Jun 2010 15:29:21 -0400
Original-Received: (qmail invoked by alias); 02 Jun 2010 19:29:18 -0000
Original-Received: from 83-215-154-5.hage.dyn.salzburg-online.at (EHLO nathot.lan)
	[83.215.154.5]
	by mail.gmx.net (mp070) with SMTP; 02 Jun 2010 21:29:18 +0200
X-Authenticated: #3102804
X-Provags-ID: V01U2FsdGVkX1+b5f95xZ6bxUTkM9BmjadwXyN8G28zhsvf5gx1Sy
	4TvqVFzMiYLYP8
Original-Received: from localhost (localhost.localdomain [127.0.0.1])
	by nathot.lan (Postfix) with ESMTP id A2CBD3A6B1;
	Wed,  2 Jun 2010 21:29:17 +0200 (CEST)
Original-Received: from nathot.lan ([127.0.0.1])
	by localhost (nathot.lan [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id JNQXu+TgfbUM; Wed,  2 Jun 2010 21:29:12 +0200 (CEST)
Original-Received: from delenn.lan (delenn.lan [192.168.3.11])
	by nathot.lan (Postfix) with ESMTP id C673E3A6B0;
	Wed,  2 Jun 2010 21:29:12 +0200 (CEST)
Original-Received: by delenn.lan (Postfix, from userid 1000)
	id 86C6A74E4C; Wed,  2 Jun 2010 21:29:12 +0200 (CEST)
In-Reply-To: <1275417850.3290.13.camel@romel-compaq> (Romel Sandoval's message
	of "Tue, 01 Jun 2010 13:44:10 -0500")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-BeenThere: guile-user@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: General Guile related discussions <guile-user.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/guile-user>,
	<mailto:guile-user-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/guile-user>
List-Post: <mailto:guile-user@gnu.org>
List-Help: <mailto:guile-user-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/guile-user>,
	<mailto:guile-user-request@gnu.org?subject=subscribe>
Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org
Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.lisp.guile.user:7821
Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.user/7821>

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Romel Sandoval <romel@lavabit.com> writes:

> After configure while trying to build I got this:
>
> ..
> Making all in g-wrap
> make[2]: se ingresa al directorio `/home/romel/src/g-wrap/g-wrap'
> make  all-am
> make[3]: se ingresa al directorio `/home/romel/src/g-wrap/g-wrap'
> /bin/bash ../libtool --tag=3DCC   --mode=3Dcompile gcc -DHAVE_CONFIG_H -I.
> -I..  -I..  -I/home/romel/usr/include
> -I/home/romel/usr/include/guile/2.0  -g -O2 -Wall -Wmissing-prototypes
> -Werror -std=3Dgnu99 -MT core-runtime.lo -MD -MP
> -MF .deps/core-runtime.Tpo -c -o core-runtime.lo core-runtime.c
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I..
> -I/home/romel/usr/include -I/home/romel/usr/include/guile/2.0 -g -O2
> -Wall -Wmissing-prototypes -Werror -std=3Dgnu99 -MT core-runtime.lo -MD
> -MP -MF .deps/core-runtime.Tpo -c core-runtime.c  -fPIC -DPIC
> -o .libs/core-runtime.o
> cc1: warnings being treated as errors
> core-runtime.c: In function =E2=80=98gw_raise_error=E2=80=99:
> core-runtime.c:55: error: ignoring return value of =E2=80=98vasprintf=E2=
=80=99, declared
> with attribute warn_unused_result
>
Could you try the attached patch? It should fix this issue. As noted by
Andy Wingo, you can also use `--disable-Werror' when running configure.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment; filename=+vasprintf.patch

diff --git a/g-wrap/core-runtime.c b/g-wrap/core-runtime.c
index cb0f310..66c24a5 100644
--- a/g-wrap/core-runtime.c
+++ b/g-wrap/core-runtime.c
@@ -1,5 +1,5 @@
 /**********************************************************************
-Copyright (C) 2003-2004 Andreas Rottmann
+Copyright (C) 2003-2004, 2010 Andreas Rottmann
  
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as
@@ -50,15 +50,21 @@ gw_raise_error (GWLangArena arena, const char *proc, const char *fmt, ...)
 {
   char *message = NULL;
   va_list args;
-
+  int bytes_allocated;
+  
   va_start (args, fmt);
-  vasprintf (&message, fmt, args);
+  bytes_allocated = vasprintf (&message, fmt, args);
   va_end (args);
-  
-  gw_lang->raise_error (arena, proc, message);
-  
-  /* FIXME: we leak 'message' here, since this line won't be reached */
-  free (message);
+
+  if (bytes_allocated >= 0)
+  {
+    gw_lang->raise_error (arena, proc, message);
+    
+    /* FIXME: we leak 'message' here, since this line won't be reached */
+    free (message);
+  }
+  else
+    gw_lang->raise_error (arena, proc, "could not allocate error message");
 }
 
 void

--=-=-=


Regards, Rotty
-- 
Andreas Rottmann -- <http://rotty.yi.org/>

--=-=-=--