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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

MacPorts
#56042: Bundle libc++ with MacPorts on 10.6
-------------------------+-----------------
 Reporter:  ryandesign   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:
 Keywords:  snowleopard  |       Port:
-------------------------+-----------------
 We want to switch the default `cxx_stdlib` for 10.6-10.8 from libstdc++ to
 libc++. 10.7 and later ship with libc++, but 10.6 doesn't.
 [wiki:LibcxxOnOlderSystems#LeopardandSnowLeopardIntel Bootstrapping this
 system to libc++] is complicated by this fact. We might be able to solve a
 lot of those bootstrapping problems by having MacPorts base install libc++
 as well on 10.6 only.

--
Ticket URL: <https://trac.macports.org/ticket/56042>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

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

MacPorts
#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 kencu):

 It might be useful if MacPorts could be instructed to automatically
 install one or more specified ports when first run after being installed.

 On 10.6.8, for example, an automatic binary install of libcxx and the
 updated default toolchain would go a long way to getting the system in a
 workable state quickly.

--
Ticket URL: <https://trac.macports.org/ticket/56042#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

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

MacPorts
In reply to this post by MacPorts
#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
Reply | Threaded
Open this post in threaded view
|

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

MacPorts
In reply to this post by MacPorts
#56042: Bundle libc++ with MacPorts on 10.6
--------------------------+----------------------------
  Reporter:  ryandesign   |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:  MacPorts 2.6.0
 Component:  base         |    Version:
Resolution:               |   Keywords:  snowleopard
      Port:               |
--------------------------+----------------------------
Changes (by mojca):

 * milestone:   => MacPorts 2.6.0


--
Ticket URL: <https://trac.macports.org/ticket/56042#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

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

MacPorts
In reply to this post by MacPorts
#56042: Bundle libc++ with MacPorts on 10.6
--------------------------+----------------------------
  Reporter:  ryandesign   |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:  MacPorts 2.6.0
 Component:  base         |    Version:
Resolution:               |   Keywords:  snowleopard
      Port:               |
--------------------------+----------------------------

Comment (by mojca):

 I don't know if this is actually feasible, but I boldly set the same
 milestone as for other legacy mac support issues (we can always push it
 "back to the more distant future").

 This seems pretty important to me, even more for 10.5 in fact (I don't
 know why your ticket only mentions 10.6 unless the idea is to only use gcc
 there, also for i386), but I don't know what the best way to implement it
 would be. I asked the exact same question a few years back and remember
 the answer being "this bootstrapping problem with be solved automatically
 once we start providing binaries".

 Ryan, do you have any suggestions about the best way to do this?

 (What I did for my own "bootstrapping-like purposes" was to simply
 manually fetch libcxx binaries from our packages and manually extracted
 the contents to `/usr/lib`.)

--
Ticket URL: <https://trac.macports.org/ticket/56042#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

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

MacPorts
In reply to this post by MacPorts
#56042: Bundle libc++ with MacPorts on 10.6
--------------------------+----------------------------
  Reporter:  ryandesign   |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:  MacPorts 2.6.0
 Component:  base         |    Version:
Resolution:               |   Keywords:  snowleopard
      Port:               |
--------------------------+----------------------------

Comment (by ryandesign):

 This ticket is only about bundling libc++ with MacPorts on 10.6. Our
 current goal is to switch 10.6-10.8 to libc++. This is easy on 10.7-10.8
 because they include libc++, and hard on 10.6 because it does not.
 Bundling libc++ with MacPorts on 10.6 makes it easier.

 I have not given specific thought to how it would be accomplished, other
 than what I've already said above. We could either do it in the Makefile
 as I suggested above, or we could have separate implementations for the
 installer pkg and for installing from source.

 As far as I remember, libc++ doesn't work as well, or at all without some
 patching that Ken mentioned somewhere previously, on 10.5. clang doesn't
 work on 10.5 on PowerPC. I don't know/remember if libc++ can be used with
 gcc. Since we are not currently planning on switching 10.5 to libc++, we
 don't need to consider how to do this now.

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