[MacPorts] #62606: Strange "ports diag" complaint wrt ghc-8.10.4

MacPorts noreply at macports.org
Fri Apr 2 21:00:44 UTC 2021


#62606: Strange "ports diag" complaint wrt ghc-8.10.4
------------------------------+--------------------
  Reporter:  GussyFinkNottle  |      Owner:  (none)
      Type:  defect           |     Status:  new
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.6.4
Resolution:                   |   Keywords:
      Port:  ghc              |
------------------------------+--------------------

Comment (by ryandesign):

 Replying to [comment:3 GussyFinkNottle]:
 > Sadly, when uninstalling ghc, the first thing done seems to be to
 deactivate it.
 > sudo port uninstall ghc fails, with essentially the logfile I attached
 above.
 > I'm not terribly bothered. I've got ghc from elsewhere, and if a
 subsequent ghc version turns up in macports, perhaps that will deactivate
 what I currently have.

 If deactivating the port fails, as I see now from your log that it does,
 then uninstalling or upgrading the port won't work either, since
 uninstalling requires deactivating first and upgrading requires
 uninstalling first.


 > I also tried sudo port --force upgrade ghc, which rebuilt/reinstalled
 many ports, and then failed on ghc in the same way.

 The reason why many ports were rebuilt is that `--force` applies to the
 specified port and all dependencies. If you want to rebuild one port
 without rebuilding its dependencies, which is usually what you want if
 rebuilding is needed, then add the `-n` flag: `sudo port -n upgrade
 --force ...`.


 > For several decades, I've been longing to come across a single-bit
 cosmic-ray induced single-bit error.

 We've encountered several single-bit errors in user bug reports over the
 years, and I've even seen one or two on our Power Macintosh G5 build
 machine, back when that was running. I haven't seen any single-bit errors
 on our Xserve build machines; they use error-correcting ECC memory which
 corrects for this kind of problem.

 * https://lists.macports.org/pipermail/macports-
 dev/2012-February/017842.html
 * comment:ticket:41474:5
 * comment:ticket:54789:5


 > But in that time, I've seen dozens of mismatches where one piece of
 software (tcl?) sees a string through '...' quotes, and
 > passes it another (bash?), stripped of quotes (or vice versa).
 > If that might be the problem, is there some file, or perhaps database
 entry I can edit by hand, to restore or delete such quotes?
 > Or some file or directory I can simply delete?

 I still believe this is a single-bit error in the data that was recorded
 in your registry. Since it looks like this will prevent you from
 uninstalling or upgrading the port, it will have to be fixed by correcting
 the error in the registry. I believe this command would do it:

 {{{
 sudo sqlite3 /opt/local/var/macports/registry/registry.db 'update files
 set
 path="/opt/local/lib/ghc-8.10.4/time-1.9.3/Data/Time/Calendar/Week.p_hi"
 where
 path="/opt/local/lib/ghc-8.10.4/time-1*9.3/Data/Time/Calendar/Week.p_hi";'
 'select changes();'
 }}}

 It should print the number of changes made, which should be 1. If you run
 it a second time, it should print 0. You should then be able to
 deactivate, uninstall, or upgrade ghc, unless of course there are other
 similar errors, which we can fix the same way.

 Our registry database uses a custom collation and usually you need to load
 our custom sqlite extension to use it. I didn't seem to need to do this to
 run the above command on my system, but if you get an error like `Error:
 no such collation sequence: VERSION` let me know and I'll explain how to
 work around that.

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


More information about the macports-tickets mailing list