> On Jul 15, 2017, at 1:24 AM, Amirouche <amirou...@hypermove.net> wrote: > > > > Le 15/07/2017 à 06:35, Matt Wette a écrit : >>> On Jul 14, 2017, at 5:44 PM, Amirouche Boubekki <amirou...@hypermove.net> >>> 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 >
No surprise that it doesn’t work right now on non-Mac. Add #:inc-help ‘((“__builtin” “__attribute__(X)=“)) My goal is release something that works in October 2017. That may be an ambitious goal. Matt