The opam started throwing up stack overflow.

Asked 2 years ago, Updated 2 years ago, 137 views

I installed various packages in opam, but the package installation was successful, but then opam returned Stack overflow.Is there any solution?

$ opam update

=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
Fatal error:
Stack overflow
Backtrace:
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "pervasives.ml", line 214, characters 22-31
  Called from file "solver/opamSolver.ml", line 330, characters 8-44
  Called from file "client/opamClient.ml", line 805, characters 6-356
  Called from file "client/opamClient.ml", line 1211, characters 12-34
  Called from file "core/opamFilename.ml", line 324, characters 12-15

A similar error occurs when using a new package installation. You can do an opam switch.

The environment is as follows:

  • opam 1.2.2
  • OCaml 4.02.3
  • Ubuntu 12.04

ocaml

2022-09-30 20:12

1 Answers

I have never been in a situation like this, but opam update has a phase to check if it can be upgraded after that.That's why the restriction solver inside opam is dead from consuming the stack.

For example, why not use an external solver: More information can be found at http://cudf-solvers.irill.org/index.html.

According to https://github.com/ocaml/opam/issues/2544, this situation seems to be known, and you are encouraged to use an external solver there as well.


2022-09-30 20:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.