Compiling a port statically

Ryan Schmidt ryandesign at macports.org
Sun Dec 6 20:39:41 UTC 2020



On Dec 6, 2020, at 11:13, Richard L. Hamilton wrote:

> Of course, that also requires that every library port it depends on builds a static version as well as a shared version.
> 
> So I would imagine, even given the argument in favor of limited static executables, that there would be at most, very few indeed.

It is MacPorts policy that ports that can easily do so should provide both dynamic and static libraries. Most autotools-based build systems can do this, but most cmake-based build systems cannot, so as the number of projects that have migrated from autotools to cmake has increased, the number of ports that are able to provide this has decreased.


> Using MacPorts (or self-compiled) alternatives to the dropped functions of macOS Server might, or might not, also be an area of concern. For myself, I'd use self-built ones with no more dependencies than necessary, as similar as possible to the ones Apple supplied back when they did, and strictly following their suggestions for alternatives to their dropped functionality.

MacPorts now offers ports that help you replicate some of the setup that used to be possible with macOS Server. There is no need to introduce the distraction of static builds to this.




More information about the macports-users mailing list