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: Sat, 15 Jul 2017 05:37:29 -0700 Message-ID: <1D616E65-2FEE-495C-B990-4A5A2283B8EC@gmail.com> References: <22E467C6-8BCD-43B6-90B3-CFC43FC8799E@gmail.com> <6bc2d2c6d7229f221a32f7fd52919444@hypermove.net> <64F8FD69-D63A-4485-AE73-654533B7AEBB@gmail.com> <8fc9043d-b16d-b66a-e623-7f92327b12c2@hypermove.net> 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 1500122285 14127 195.159.176.226 (15 Jul 2017 12:38:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 12:38:05 +0000 (UTC) Cc: Guile User , guile-user To: Amirouche Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jul 15 14:38:00 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 1dWMKb-0003Gd-Ir for guile-user@m.gmane.org; Sat, 15 Jul 2017 14:37:57 +0200 Original-Received: from localhost ([::1]:42020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWMKh-00006S-0n for guile-user@m.gmane.org; Sat, 15 Jul 2017 08:38:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWMKI-000068-0f for guile-user@gnu.org; Sat, 15 Jul 2017 08:37:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWMKE-0000Bn-Ty for guile-user@gnu.org; Sat, 15 Jul 2017 08:37:38 -0400 Original-Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:36157) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWMKE-0000Bb-Nu; Sat, 15 Jul 2017 08:37:34 -0400 Original-Received: by mail-pf0-x241.google.com with SMTP id k24so296773pfj.3; Sat, 15 Jul 2017 05:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vZF4Q0LlbuPePARlWK44egTps3EE0EkAxX/JmLJFhKQ=; b=QMKcdehfgY5RlDB6EUv8J9hh3qZ6dM8//duR6/KVvbYs1CPZ+u6UliBBE7RmMf+0z8 bDABMLt4EJbCLM9TMz636NQbTv3GX1MJP7yH4kKZSCVyWbtZrNRzzqwxihc/XW18wgOw V64XIzFgsAZ/PtKDcwzn0ag+QXmWcclTYK45wD90b/my2RolvF/8s4JpI5g0THATbdLO s4Af1Kuhnx+jmNW6J2SUX9zZrKC+D7HI4NH/feZezmNL6iM9bslarKLENyQxnqRi5dpn kZkJ+Xb8u8LBcG+AnS1EecEST7Cr+yAefHsyPmIXWeVC2vIUsk+pES9kjNcDv1CTdToy 5UWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vZF4Q0LlbuPePARlWK44egTps3EE0EkAxX/JmLJFhKQ=; b=IVrpth12KxwovsbUdkNfdxJp0KCX222M2+MHryFyShogStPQtojPqVGLVyMPXsTY/5 Pmh6wmIIoipiUcwCWpdhCLPyuXWXzSnrSPzz5g6vp+WlotjMlGG60BVsxrC2fgk8Dpuq SL38smqRXs/Xng4TLYjerWdWCoTxi3rNbRPZx1orGIZptajgMmWQ+cs+giD48GwGcECl gbHPP1XGfesdUubiX6TomELWZLYx4OKD7obcUx59JfbmFzUhK9Rb26k/wU8twGospUiA q6APUMO6d77Mcm9EYbuPtsjV2P49EUHKRlrrOCkUldxq7UT1kPPHSCDl7bDU1qJv/x9M /U0g== X-Gm-Message-State: AIVw111ITkGkl1m4HG/6zvSl9N0YUsFKDwrFhS8ozqrg6SQDSqM1GVAT CdzbN/6cp98rYHlQHc8= X-Received: by 10.84.218.199 with SMTP id g7mr1205085plm.6.1500122253476; Sat, 15 Jul 2017 05:37:33 -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 w1sm8346966pge.59.2017.07.15.05.37.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 Jul 2017 05:37:32 -0700 (PDT) In-Reply-To: <8fc9043d-b16d-b66a-e623-7f92327b12c2@hypermove.net> 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:c00::241 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:13928 Archived-At: > On Jul 15, 2017, at 1:24 AM, Amirouche = wrote: >=20 >=20 >=20 > Le 15/07/2017 =C3=A0 06:35, Matt Wette a =C3=A9crit : >>> 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. >>> 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]. >> Maybe another bug in my CPP. >>=20 >> (define-ffi-module (libgit2) >> #:include '("git2.h") >> #:inc-dirs '("/opt/local/include") >> #:library '("git2") >> ) >>=20 >> mwette$ guild compile-ffi libgit2.ffi >> (unknown):1: not found: =E2=80=9Ccommon.h" >>=20 >>=20 > With the following .ffi file: >=20 > (define-ffi-module (libgit2) > #:include '("git2.h") > #:inc-dirs '("/usr/include" "/usr/include/git2" = "/usr/include/x86_64-linux-gnu/" "/usr/include/linux/") > #:library '("git2") > ) >=20 > I now have the following output: >=20 > $ guild compile-ffi libgit2/libgit2.ffi > TODO: compile-ffi args, arrays, extern variables > (unknown):1: parse failed at state 59, on input "__attribute__" > (unknown):1: C99 parse error >=20 No surprise that it doesn=E2=80=99t work right now on non-Mac. Add = #:inc-help =E2=80=98((=E2=80=9C__builtin=E2=80=9D = =E2=80=9C__attribute__(X)=3D=E2=80=9C)) My goal is release something that works in October 2017. That may be an = ambitious goal. Matt