Opened 8 years ago

Last modified 8 years ago

#51552 new enhancement

Page LibcxxOnOlderSystems: some help with "uninstall all ports that use C++"

Reported by: fulopt (Tamás FÜLÖP) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: wiki Version:
Keywords: Cc:
Port:

Description (last modified by mf2k (Frank Schima))

On page wiki:LibcxxOnOlderSystems#LionandMountainLion, could you please add a one- or two-sentence help to the part "uninstall all ports that use C++"? Those having many hundreds of ports but not being experts would appreciate it ("Start with a new install of MacPorts" being a frightening option, and upgrading the OS probably excluded). Thank you!

Change History (4)

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Component: websiteguide
Description: modified (diff)
Owner: changed from jmpp@… to macports-tickets@…
Version: 2.3.4

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Component: guidewiki

It's not easy to provide additional guidance. MacPorts does not know which ports use C++, so it's difficult to help you identify them. One way would be: for each file the port installed (i.e. the output of port -q contents), check otool -L to see if the file links with libc++ or libstdc++. If it does, that port uses C++. Since it is difficult to identify which ports use C++ and just uninstall them, it's simpler to uninstall all ports, then reinstall the ones you want.

I wouldn't immediately exclude the possibility of upgrading your OS. In my opinion, that would be the best way to proceed, if your Mac supports it. It looks like all Macs that support 10.8 can be upgraded to 10.9, 10.10 or 10.11, and it's free to do so. There are a handful of older Macs that cannot be upgraded past 10.7; if you're using one of those, then you'll have to continue on with the wiki page instructions.

comment:3 Changed 8 years ago by fulopt (Tamás FÜLÖP)

Thank you for the additional information. Now the difficulty is clearer (the shell script I would write to automatize this process should make no mistake). Reinstalling all the ports will be safer.

Upgrading the OS (especially by four versions) would break so many things and would set back my productivity so considerably that I always do it only when support for the current OS has died out comparably seriously. (For my type of work and usage, OS 10.3 was already satisfactory...) Nevertheless, thank you for your suggestion.

comment:4 Changed 8 years ago by ken-cunningham-webuse

This was useful (from Jeremy Hu)

which installed ports are using c++:

grep -R 'c++' /opt/local and port provides .. ? =/

that gave a moderately long list of files, from which it wasn't too hard to do

port provides XYZ

and figure out which ports they belonged to.

In the end, on my system with hundreds of ports installed, it all came down to less than a dozen c++ ports, although it took 1/2 an hour to figure them all out. That was much faster than just bulldozing the whole installation, however.

Note: See TracTickets for help on using tickets.