[MacPorts] #69119: boost: enable static libraries by default

MacPorts noreply at macports.org
Sun Jan 21 00:23:55 UTC 2024


#69119: boost: enable static libraries by default
-------------------------------------------------+-------------------------
  Reporter:  mohd-akram                          |      Owner:  (none)
      Type:  enhancement                         |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:
Resolution:                                      |   Keywords:
      Port:  boost169, boost171, boost176,       |
  boost178, boost181                             |
-------------------------------------------------+-------------------------

Comment (by ryandesign):

 While it's true that ports have historically provided both static and
 dynamic libraries and we still try to do so when we can, it was originally
 probably more of a coincidence of the default behavior of most autotools
 build systems. These days, many projects have switched to other build
 systems like cmake, and not only is building both kinds of libraries not
 the default in cmake, it's not possible at all, unless you do two
 completely separate builds, which the cmake portgroups are not programmed
 to do. And when forced to choose, obviously we must choose to provide the
 dynamic libraries and not the static ones. So more and more ports are
 providing only dynamic libraries.

 Distributing a single application bundle that contains dynamic libraries
 is not a problem. The dylibbundler tool, available in MacPorts, can help
 with that. If the goal is distributing a single executable file that does
 not reference any other library files, then it's true that static
 libraries would be needed to achieve that. But if this is the goal, why is
 this the goal?

 Dynamic libraries are better because the OS can load in only those
 libraries that are actually being used for a particular run of the
 program. With static libraries, the OS sees no difference between library
 code and program code and has to load everything into memory every time.

-- 
Ticket URL: <https://trac.macports.org/ticket/69119#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list