Compiling a port statically

Ryan Schmidt ryandesign at macports.org
Sun Dec 6 22:00:57 UTC 2020



On Dec 6, 2020, at 15:27, Dave Horsfall wrote:

> On Sun, 6 Dec 2020, Riccardo Mottola via macports-users wrote:
> 
>> I can think of two scenarios [ for static binaries ]:
>> - building "always safe" binaries which can be used at system level, e.g. login shells, tools, things put in launchd. That is things you want to always work, even if you are during a MacPorts upgrade. NetBSD offers two packages for the same thing, e.g. bash and bash-static, IIRC. perhaps in MacPorts it could be a "variant"?
> 
> Agreed; FreeBSD has an "/sbin" directory (and "/usr/local/sbin") containing stuff that absolutely must be available, even in the lack of absence of shared libraries.

According to the FHS, sbin is for "Utilities used for system administration". There is no requirement, guarantee, or suggestion that they should be statically linked. We're not offering statically-linked programs in MacPorts.


More information about the macports-users mailing list