delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/02/18/13:52:25

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <47B9D3EA.7010405@x-ray.at>
Date: Mon, 18 Feb 2008 19:52:26 +0100
From: Reini Urban <rurban AT x-ray DOT at>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.1.12) Gecko/20080201 SeaMonkey/1.1.8
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: cffi-devel AT common-lisp DOT net
Subject: Re: how to build gsl dll
References: <d990efca0802171021v4d90e1a9yeab45fd2cc88afab AT mail DOT gmail DOT com> <6910a60802180801q3b3b7fdbs71be7cf7dbe53805 AT mail DOT gmail DOT com> <d990efca0802180904o6cac124fyfcd3129f2a02c440 AT mail DOT gmail DOT com>
In-Reply-To: <d990efca0802180904o6cac124fyfcd3129f2a02c440@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Mirko Vukovic schrieb:
> On Mon, Feb 18, 2008 at 11:01 AM, Reini Urban  wrote:
>>  2008/2/17, Mirko Vukovic:
>>> I am trying to build a dll for gsl.  I want to link it to clisp.
>>  I would suggest not to use a static clisp module, just use the FFI.
>>  This is much simplier, smaller and easier to test. See libsvm or matlab,
>>  or pari for a more optimized binding.
>>
>>  I want to do this for my gdi module also, but had no time yet.
>>  And we still have no header parser, which could construct the
>>  FFI binding automatically. cffi might be useful.

> Reini,
> The reason why I need cffi is that I am trying to get nlisp to work on
> clisp+cygwin.  And nlisp is using cffi.  I have nlisp running at work
> on linux+sbcl, but my laptop has only cygwin.

$ cygcheck /bin/cyggsl-0.dll
f:\cygwin\bin\cyggsl-0.dll
   f:\cygwin\lib\lapack\cygblas.dll

Are you sure you have /lib/lapack or /usr/lib/lapack added to your path?

> I posted a message on the cffi mailing list, and Luis is helping me there.

I see.
$ clisp -q
(ASDF:OOS 'ASDF:LOAD-OP :ASDF-INSTALL)
(ASDF-INSTALL:INSTALL :nlisp)

Oops...
So I had to create a small patch
http://sourceforge.net/tracker/index.php?func=detail&aid=1896345&group_id=174776&atid=870580

nlisp.lisp:
(cffi:define-foreign-library libgslcblas
   (:darwin "libgslcblas.dylib")
   (:unix (:or "cyggslcblas-0.dll" "libgslcblas.so.0" "libgslcblas.so"))
...
(cffi:define-foreign-library libgsl
   (:darwin "libgsl.dylib")
   (:unix (:or "cyggsl-0.dll" "libgsl.so.0" "libgsl.so"))
...
(cffi:define-foreign-library libsndfile
   (:darwin "libsndfile.dylib")
   (:unix (:or "cygsndfile-1.dll" "libsndfile.so.1" "libsndfile.so"))

Luís, cannot this be a bit simplified for :cygwin?
I've always have to do this.
"libsndfile.so.1" can be automatically translated to "cygsndfile-1.dll". 
Unfortunately :cygwin is no define-foreign-library target, just :unix.

nlisp-core.lisp:
fixnum and double-float just name clisp types, no classes yet. This is 
just for cmucl/sbcl so far. CLHS does not require those.
The clisp numeric classes are listed in the impnotes Chapter 4.4. 
(NUMBER, COMPLEX, REAL, FLOAT, RATIONAL, RATIO, INTEGER)

Now (ASDF:OOS 'ASDF:LOAD-OP :NLISP) prints tons of 
FFI::FOREIGN-LIBRARY-FUNCTION warnings, but works fine.
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/
http://helsinki.at/  http://spacemovie.mur.at/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019