From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Amirouche Newsgroups: gmane.lisp.guile.user Subject: Re: ffi-helper: looking for C libraries to try Date: Sat, 15 Jul 2017 10:24:04 +0200 Message-ID: <8fc9043d-b16d-b66a-e623-7f92327b12c2@hypermove.net> 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 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1500107031 3180 195.159.176.226 (15 Jul 2017 08:23:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 08:23:51 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Cc: Guile User , guile-user To: Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jul 15 10:23:45 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 1dWIMV-0000HM-Vr for guile-user@m.gmane.org; Sat, 15 Jul 2017 10:23:40 +0200 Original-Received: from localhost ([::1]:41171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWIMb-00085e-8a for guile-user@m.gmane.org; Sat, 15 Jul 2017 04:23:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWIMC-00085Y-6x for guile-user@gnu.org; Sat, 15 Jul 2017 04:23:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWIMB-0000n7-Eg for guile-user@gnu.org; Sat, 15 Jul 2017 04:23:20 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48353) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dWIM6-0000m1-9G; Sat, 15 Jul 2017 04:23:14 -0400 Original-Received: from [IPv6:2a01:e35:2ef3:d930:551b:e2e0:37f6:f2e7] (unknown [IPv6:2a01:e35:2ef3:d930:551b:e2e0:37f6:f2e7]) (Authenticated sender: amirouche@hypermove.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B2DB8C5A53; Sat, 15 Jul 2017 10:23:11 +0200 (CEST) In-Reply-To: <64F8FD69-D63A-4485-AE73-654533B7AEBB@gmail.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.194 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:13926 Archived-At: Le 15/07/2017 à 06:35, Matt Wette a écrit : >> On Jul 14, 2017, at 5:44 PM, Amirouche Boubekki wrote: >> >> 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. > > (define-ffi-module (libgit2) > #:include '("git2.h") > #:inc-dirs '("/opt/local/include") > #:library '("git2") > ) > > mwette$ guild compile-ffi libgit2.ffi > (unknown):1: not found: “common.h" > > With the following .ffi file: (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") ) I now have the following output: $ 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