From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: ffi-helper: looking for C libraries to try Date: Tue, 1 Aug 2017 09:20:33 -0700 Message-ID: <56AA0CAA-F1D0-4E1D-A01E-64C6CBF4185D@gmail.com> References: <22E467C6-8BCD-43B6-90B3-CFC43FC8799E@gmail.com> <6bc2d2c6d7229f221a32f7fd52919444@hypermove.net> <64F8FD69-D63A-4485-AE73-654533B7AEBB@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1501604516 18988 195.159.176.226 (1 Aug 2017 16:21:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 Aug 2017 16:21:56 +0000 (UTC) To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Aug 01 18:21:52 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcZvb-0004f0-9M for guile-user@m.gmane.org; Tue, 01 Aug 2017 18:21:51 +0200 Original-Received: from localhost ([::1]:43600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcZvh-0007Tf-3H for guile-user@m.gmane.org; Tue, 01 Aug 2017 12:21:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcZuT-00073D-KI for guile-user@gnu.org; Tue, 01 Aug 2017 12:20:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcZuQ-0000kX-Co for guile-user@gnu.org; Tue, 01 Aug 2017 12:20:41 -0400 Original-Received: from mail-pg0-x22d.google.com ([2607:f8b0:400e:c05::22d]:35266) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcZuQ-0000kF-6g for guile-user@gnu.org; Tue, 01 Aug 2017 12:20:38 -0400 Original-Received: by mail-pg0-x22d.google.com with SMTP id v189so9874931pgd.2 for ; Tue, 01 Aug 2017 09:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=JQd5R9j4o1YP4po5b/aHUso3p+lR1xsae9EJU1d2+0I=; b=XWX0lofkuAaagfSXJqC93glJN3GFfejg2DQLPqpr1mUT2GwyS8BV4GLy7kpmm5oCcA 17yLZ+ww23MlbhhmSBur0YdK4kgGN4Uz40i9l+9PR1djK7VP9l7DAWDfC3WW/9+cXqQp UuG/sAvTca7WHApi2SH5Fc2nDklwCOlgv7Vj6oqn+Rsc7uYOXhJlk8gf5iKWWMQ+/Ljy lvhwc3HXy/6in1iiel1fJZLxJNR1TpHZ5LC/z6DSzduEkU7asQvszjLg7+9GB7Fo+s1f ti1JnayEEt7EEMb96UD2N7LN4km5/wvRcUkzvk30qwp6i4pL10J98nQeWRNYxlcAAxbX BmuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=JQd5R9j4o1YP4po5b/aHUso3p+lR1xsae9EJU1d2+0I=; b=krN4oja9z1uc72zgjMsUkam+31fEJFKOIZ1KJXeXfIPC1lNSfy4NSBet5mnmdZqJ3z 7oDzDU4p+Ly3WktghzyVjMW/SJERgLj+dej2cx4z9xrjEI7d+CJUndAsYTFRnAjE7Uro gKzWk7hQot2esSTfKSdXmS7Tt8kWhZi1TnqrC8dgSMw9I/5MlZHl/XB26mIe5KKi+bQd 0isiloag0M9mEeyJpUxYnfUSMSaxCi/po8MkQgXvEczVmBs94YkHbpfLxbLp4sdbnKqI pKX/FlOS63TT7/P7ajsOwDEHmJhPfBKXOMepdRMR5eQ4ROnzB7CwvwT6NiN8djBRW8fg 0eqQ== X-Gm-Message-State: AIVw111lraatf8Azf3RrF/AKY4wk+QuGIS/JwHQG04kWzALVAeL5qfW5 u3tNrLBOA3GMa4XBOCw= X-Received: by 10.99.60.83 with SMTP id i19mr19490508pgn.51.1501604436644; Tue, 01 Aug 2017 09:20:36 -0700 (PDT) Original-Received: from nautilus.championbroadband.com (216-165-236-44.championbroadband.com. [216.165.236.44]) by smtp.gmail.com with ESMTPSA id f87sm54792450pfe.108.2017.08.01.09.20.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Aug 2017 09:20:36 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22d X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.lisp.guile.user:14006 Archived-At: > On Jul 15, 2017, at 6:15 AM, Matt Wette wrote: >=20 >=20 >> On Jul 14, 2017, at 9:35 PM, Matt Wette wrote: >>=20 >>=20 >>> On Jul 14, 2017, at 5:44 PM, Amirouche Boubekki = wrote: >>>=20 >>> On 2017-07-15 01:17, Matt Wette wrote: >>>> I tried git2 but those headers are too >>>> broken. >>>=20 >>> What do you mean by "too broken"? Maybe it will be easier in the = long run to maintain our own version of the headers than manually bind = everything. Even if it requires to create a shim layer in scheme to have = a proper set of bindings that schemer will enjoy. Also, git is a good = candidate since there are some tests already in guile-git [1]. >>=20 >> Maybe another bug in my CPP. =20 >>=20 >> (define-ffi-module (libgit2) >> #:include '("git2.h") >> #:inc-dirs '("/opt/local/include") >> #:library '("git2") >> ) >>=20 >> mwette$ guild compile-ffi libgit2.ffi=20 >> (unknown):1: not found: =E2=80=9Ccommon.h" >>=20 >=20 > I claim libgit2 headers are broken. The standard says, essentially, = =E2=80=9Chow headers are located is implementation defined=E2=80=9D. >=20 > The file =E2=80=A6/include/git2.h states: > #include =E2=80=9Cgit2/annotated_commit.h=E2=80=9D > #include =E2=80=9Cgit2/common.h=E2=80=9D > =E2=80=A6 >=20 > But the file include/git2/annotated_commit.h states: > #include =E2=80=9Ccommon.h=E2=80=9D >=20 > Note this is =E2=80=9Ccommon.h" not =E2=80=9Cgit2/common.h=E2=80=9D = How does gcc find common.h? =20 > The directory include/git2 is not in the include path. =20 > These are the ugly, undocumented, non-standard items that scare me. I found a reference for include file searching in gcc:=20 https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html I have returned to working on libgit2. It turns out glib uses this, and = include_next as well. So I have added this behavior plus include_next. Test/debug of the = fyi-helper goes on =E2=80=A6 I have been able too compile-ffi, almost everything from cairo, gdbm, = sqlite3. =20 Now working on rsvp and libgit2.=20 Not supported so far is va-args. That will require some help from the = user. (Libffi does not support va-args.) Matt=