[MacPorts] #56042: Bundle libc++ with MacPorts on 10.6

MacPorts noreply at macports.org
Mon Mar 19 15:28:14 UTC 2018


#56042: Bundle libc++ with MacPorts on 10.6
--------------------------+-------------------------
  Reporter:  ryandesign   |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:
Resolution:               |   Keywords:  snowleopard
      Port:               |
--------------------------+-------------------------

Comment (by ryandesign):

 Ken, I want to keep this ticket focused on the narrow task of bundling
 libc++ with MacPorts on 10.6, and not expand it to your proposal of
 automatically installing ports. Your proposal would only help those
 MacPorts users who receive binaries. I want to help all users, even those
 who don't receive binaries (because they use a nonstandard MacPorts
 prefix, or for whatever other reason.)

 libc++ is special in that the libcxx port already installs it directly to
 /usr and doesn't uninstall it when the port is deactivated. So the user
 experience would not differ much if we bundled it.

 Building libc++ requires clang 3.4, which is a large port with a not
 insignificant number of dependencies. You'll note from the wiki page that
 the user must install this port ''before'' having changed `cxx_stdlib` to
 libc++. (Changing `cxx_stdlib` first would make the dependencies fail to
 build since libc++ doesn't exist yet.) Bundling libc++ saves the user from
 having to install clang 3.4 and all of those dependencies from source. (We
 wouldn't have binaries available, since our binaries would in future be
 built for libc++.) In addition, the user must ''uninstall'' clang 3.4 and
 the other dependencies of libcxx after changing `cxx_stdlib` to libc++.
 (Granted, the new and improved rev-upgrade in MacPorts 2.5 should handle
 that.) Bundling libc++ saves us from having to modify the portfiles of
 clang 3.4 and all of its dependencies so that they use libstdc++ if libc++
 is not yet installed. (I suppose we could put that logic into MacPorts
 base instead: if /usr/lib/libc++.dylib exists, `cxx_stdlib` defaults to
 libc++, otherwise it defaults to libstdc++. But bundling it saves us from
 having to do that.)

 Given libc++'s extensive dependencies, we should probably bundle the
 /opt/local/var/system_roots/libcxx-5.0.1-1.tgz file inside the
 libcxx-5.0.1_1+universal.darwin_10.i386-x86_64.tbz2 binary built by the
 buildbot, instead of trying to make libc++ build from source at MacPorts
 base installation time. The .tgz file doesn't contain any references to
 the MacPorts prefix so it's not a problem it the user uses a nonstandard
 prefix.

 The installation of libc++ should be done by the Makefile, so that both
 selfupdate and the macOS Installer package will benefit from it.

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


More information about the macports-tickets mailing list