[MacPorts] #55413: Uninstalling a selected port leaves broken symlinks (was: Gcc49 not available any longer: silent bug with select)
MacPorts
noreply at macports.org
Sun Nov 26 13:27:34 UTC 2017
#55413: Uninstalling a selected port leaves broken symlinks
-----------------------+--------------------
Reporter: lucbouge | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.4.2
Resolution: | Keywords: select
Port: |
-----------------------+--------------------
Changes (by ryandesign):
* component: ports => base
* port: gcc49 =>
Comment:
`sudo port select gcc mp-gcc49` should still work fine. Not sure why it
stopped working on your system.
{{{
$ sudo port select gcc mp-gcc49
Selecting 'mp-gcc49' for 'gcc' succeeded. 'mp-gcc49' is now active.
$ ls -l /opt/local/bin/g++
lrwxr-xr-x 1 root wheel 25 Nov 26 07:17 /opt/local/bin/g++ ->
/opt/local/bin/g++-mp-4.9
$ g++ --version
g++ (MacPorts gcc49 4.9.4_2+universal) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
}}}
But note that gcc49 is obsolete and is not supported on macOS High Sierra
or later. Consider using a newer version, such as gcc5, gcc6, or the
current stable version, gcc7.
Or perhaps that was the problem: Perhaps you have already upgraded to High
Sierra and were for that reason unable to reinstall gcc49 after upgrading
the OS, leaving your /opt/local/bin/g++ etc. symlinks broken.
I was surprised I couldn't find an existing ticket about that, though I've
thought of the problem often. It would be great if MacPorts would either
automatically "unselect" a port if you uninstall a port that is
"selected", or else prevent the uninstallation of a port until the user
manually "unselects" it, but currently neither of those occurs, and it is
possible to uninstall a selected port, resulting in dangling symlinks.
--
Ticket URL: <https://trac.macports.org/ticket/55413#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list