[Cuis-dev] Cuis on macOS - Dynamic loading of Homebrew libraries
Jon Raiford
raiford at labware.com
Fri Apr 5 04:52:18 PDT 2024
As a quick follow up to this, I think we may have come up with a good compromise. I’m going to look into adding Cuis to homebrew so it can be installed like “brew install cuis” or “brew install cuis-smalltalk”. As part of the installation I’ll add the DYLD_LIBRARY_PATH reference. This way if everything is installed with Homebrew then it should all “just work” but won’t impose on the upstream Cuis project. Right now I’m just playing with this idea. If anyone has any comments or suggestions there will be plenty of time to consider them before publishing anything.
Jon
From: Cuis-dev <cuis-dev-bounces at lists.cuis.st> on behalf of Jon Raiford via Cuis-dev <cuis-dev at lists.cuis.st>
Date: Thursday, April 4, 2024 at 10:36 AM
To: Discussion of Cuis Smalltalk <cuis-dev at lists.cuis.st>
Cc: Jon Raiford <raiford at labware.com>
Subject: [Cuis-dev] Cuis on macOS - Dynamic loading of Homebrew libraries
Our group has tiptoed around this problem for a little bit but it would be nice to actually address it. I’m curious what you all think.
If you want to use FFI calls on a Mac to libraries installed via Homebrew (or other ways that don’t use the standard library path, really) then you have to set a library path just before launching Cuis. As I understand it, the environment variable DYLIB_LIBRARY_PATH is used to specify this path, however Apple wipes this at each startup as a security mechanism.
Here is an old discussion of a similar problem: https://forums.developer.apple.com/forums/thread/13161<https://forums.developer.apple.com/forums/thread/13161>
So the question is, should the Open Smalltalk VM reference the homebrew library paths to make digesting these libraries easier? Should Cuis add something like this to the launch script for Mac?
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/homebrew/lib
Or should this fall to application developers to do it themselves? I don’t think Homebrew folks have any intention of switching to the Apple standard library folders.
Ultimately I think it should be possible to launch a Cuis app from Launchpad and I don’t think it lets you launch from a script, but honestly I’m not very familiar with that.
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240405/688bcbd4/attachment.htm>
More information about the Cuis-dev
mailing list