[GSLL-devel] GSLL handling lib name under CCL
Liam Healy
lhealy at common-lisp.net
Tue Oct 18 03:16:36 UTC 2011
Yuan,
Thanks for the patch. I don't use MacOSX so I can't test it, but I've
committed it. If possible, in the future please join the mailing list
and post your items there. As far as your CFFI suggestions go, I
encourage you to post them on the cffi-devel list; Mac users seem to
have a lot of trouble with paths and anything that improves that
situation should be welcome.
Liam
On Thu, Oct 13, 2011 at 5:46 PM, Yuan MEI <yuan.mei at gmail.com> wrote:
> Hi Liam,
> I've started using GSLL. It is wonderful! I just discovered a
> glitch though, when using CCL under MacOSX, it complains that a
> #P"xxx.dylib" is not accepted. I'd rather think cffi should be blamed
> for not accepting a path, but I'd like to let you know that there is
> this issue and here is a quick fix. Actually a better portable way
> should be implemented to translate #P"" to a string that cffi could
> understand, or better cffi should be modified to accept #P in any CL
> implementation on any platform.
>
> Thanks,
>
> Yuan Mei
>
> diff --git a/init/init.lisp b/init/init.lisp
> index 41ef370..e632f09 100644
> --- a/init/init.lisp
> +++ b/init/init.lisp
> @@ -66,7 +66,9 @@
> (merge-pathnames pn (pathname (format nil "~a/" (gsl-config
> "--prefix"))))))
>
> (cffi:define-foreign-library libgslcblas
> - (:darwin #.(gsl-config-pathname "lib/libgslcblas.dylib"))
> + (:darwin #+ccl #.(ccl:native-translated-namestring
> + (gsl-config-pathname "lib/libgslcblas.dylib"))
> + #-ccl #.(gsl-config-pathname "lib/libgslcblas.dylib"))
> (:cygwin "cyggslcblas-0.dll")
> (:unix (:or "libgslcblas.so.0" "libgslcblas.so"))
> (t (:default "libgslcblas")))
> @@ -80,9 +82,12 @@
> (cffi:load-foreign-library "/lib/lapack/cygblas.dll")
>
> (cffi:define-foreign-library libgsl
> - (:darwin #. (gsl-config-pathname "lib/libgsl.dylib"))
> + (:darwin #+ccl #.(ccl:native-translated-namestring
> + (gsl-config-pathname "lib/libgsl.dylib"))
> + #-ccl #.(gsl-config-pathname "lib/libgsl.dylib"))
> (:cygwin "cyggsl-0.dll")
> (:unix (:or "libgsl.so.0" "libgsl.so"))
> (t (:default "libgsl")))
>
> (cffi:use-foreign-library libgsl)
>
More information about the gsll-devel
mailing list