[Gsll-devel] gsll+clisp+cygwin

Liam Healy lhealy at common-lisp.net
Sat Dec 27 20:52:40 UTC 2008


Mirko,

My platform is Debian x86-64.  All libraries go in /usr/lib as in
other architectures.   So your conditionals

((:and :unix (:not :x86-64))
   (:or "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so"
	"/bin/cyggslcblas-0.dll"))
 ((:and :unix :x86-64)
   (:or "/usr/lib64/libgslcblas.so.0" "/usr/lib64/libgslcblas.so"))

breaks the path to /usr/lib because of the (:not :x86-64).  It turns
out that Debian actually has a /usr/lib64 which is just a link to
/usr/lib, but you shouldn't count on that link being there since
/usr/lib is the normal place to put libraries.   There is nothing
wrong with minimizing the number of conditionals; it is an ":or"
search path, so if it doesn't find it at the early locations, it just
keeps on searching.  Thus

(:unix
 (:or "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so"
"/bin/cyggslcblas-0.dll" "/usr/lib64/libgslcblas.so.0"
"/usr/lib64/libgslcblas.so"))

should work everywhere.  If there is a feature that indicates cygwin,
it might be better to separate that off into another conditional.
Please post *features* from your implementation.  Thanks.

Liam



On Sat, Dec 27, 2008 at 3:16 PM, Mirko Vukovic <mirko.vukovic at gmail.com> wrote:
> Liam,
>
> Unfortunately, I am confused:  As far as I can see I did two things:
>
> - for non-64-bit unix, I added another library location:
> /bin/cyg...dll for both gsl and gslcblas
> - for clisp+cygwin I explicitly specified loading of
> /lib/lapack/cygblas.dll before loading the gsl library.
>
> I did not touch the x86-64 specifiactions.
>
> Could it be that I modified an older version of init.lisp? (mine is
> from March 4, 2006).
>
> Mirko
>
>
> On Sat, Dec 27, 2008 at 9:38 AM, Liam Healy <lhealy at common-lisp.net> wrote:
>> Mirko,
>>
>> Thanks for your contribution.  Unfortunately, it might break other
>> platforms because it now compels x86-64 to only look in /usr/lib64,
>> which might not be present.  See if something like this will work for
>> you:
>>
>> (cffi:define-foreign-library libgslcblas
>>  (:darwin
>>   (:or "/opt/local/lib/libgslcblas.dylib" "/sw/lib/libgslcblas.dylib"
>>        "/usr/local/lib/libgslcblas.dylib"))
>>  (:unix (:or "/usr/lib/libgslcblas.so.0" "/usr/lib/libgslcblas.so"
>>              "/usr/lib64/libgslcblas.so.0" "/usr/lib64/libgslcblas.so"))
>>  (t (:default "libgslcblas")))
>>
>> (and similarly for the other library).  If it works, I will put it in
>> the upcoming release.
>>
>> Liam
>>
>> On Fri, Dec 26, 2008 at 9:32 PM, Mirko Vukovic <mirko.vukovic at gmail.com> wrote:
>>> Hello,
>>>
>>> I was able to load gsll on cygwin by pointing to cygwin's gsll
>>> libraries in gsll/init/init.lisp file.  I am attaching the modified
>>> version.  It also makes a note for making gsll loadable from within
>>> slime+emacs_NT (tested with cygwin+clisp)
>>>
>>> Mirko
>>
>




More information about the gsll-devel mailing list