[Openmcl-devel] cl-cffi-gtx on OS X

Joshua Kordani jkordani at lsa2.com
Tue Dec 16 07:42:50 PST 2014


On 12/16/14 10:32 AM, Christopher Stacy wrote:
> I am trying to load  CL-CFFI-GTX (http://www.crategus.com/index.php/projekte/)
> on OS X Yosemite on CCL 1.10-r16196.
>
> First problem is that CFFI isn't finding the libraries.
>
> Unable to load any of the alternatives:
>     ("libglib-2.0.0.dylib" "libglib-2.0.dylib")
>     [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]
>
> I installed GTK using Homebrew and I can see the links to all the GTK libraries.
> In particular:
>
> /usr/local/lib/libglib-2.0.0.dylib -> ../Cellar/glib/2.42.1/lib/libglib-2.0.0.dylib
>
> Not sure why it isn't being found.
>
> My environment has no DYLD_LIBRARY_PATH set, which I believe is normal.
>
> I tried pushing /usr/local/lib onto cffi:*foreign-library-directories*
> but it still didn’t find it.
>
> I even went so far as to make a symbolic link from /usr/lib
>
> /usr/lib$ otool -L libglib-2.0.0.dylib
> libglib-2.0.0.dylib:
> /usr/local/lib/libglib-2.0.0.dylib (compatibility version 4201.0.0, current version 4201.1.0)
> /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
> /usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 157.0.0)
> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1151.16.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1151.16.0)
> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 62.0.0)
>
>
> but still no joy:
>
> CL-USER> (probe-file "/usr/lib/libglib-2.0.0.dylib")
> #P"/usr/local/Cellar/glib/2.42.1/lib/libglib-2.0.0.dylib"
> CL-USER> (asdf:load-system 'cl-cffi-gtk)
> ; Evaluation aborted on #<CFFI:LOAD-FOREIGN-LIBRARY-ERROR #xCE632BE>.
>
> Any idea what I’m doing wrong?
> (Probably something dumb…)
>
> Chris
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>

It took me forever to figure out what was going on.  If you are running the prebuild emacs app, the environment doesn't get inherited.  I now run the prebuild emacs app by opening a terminal window and running open -n /Applications/Emacs.  I can close the terminal window after that, and then that emacs instance will have the environment you expect.  Or at least thats what worked for me.  After that I could install libraries from macports and use them in lisp to my heart's content.

Joshua Kordani
LSA Autonomy



More information about the Openmcl-devel mailing list