[plt-scheme] loading libraries into memory with ffi-lib on osx

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Sep 6 21:53:16 EDT 2006

At Wed, 06 Sep 2006 21:47:34 -0400, Jon Rafkind wrote:
> Do you mean ffi libraries should always bundle the native library on
> osx( and other os's )? Right now I depend on foreign.ss being able to
> find libz because I don't bundle it. On OSX( and *NIX) it always seems
> to be in /usr/lib. If libz happened to not be there in osx, but some
> crazy place like /Library/Youll/Never/Guess/To/Look/Here/lib would the
> better solution be to look in the directory of the planet package?

I think you can rely on libz being in place for Mac OS X. I don't know
about other platforms.

> Also one quick question, why does (system-library-subpath) return
> "ppc-macosx/3m" with the mzscheme3m collector? Is 3m really so different?

Non-3m extensions (e.g., the output of mzc --ld) do not work with
MzScheme3m, nor vice-versa.

You're looking for general libraries, instead of MzScheme-specific
extensions, though. Use `(system-library-subpath #f)' to get a
directory that's independent of whether you're running 3m.


Posted on the users mailing list.