ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.23k stars 351 forks source link

`opam upgrade` wants to downgrade lots of packages #985

Closed amirmc closed 10 years ago

amirmc commented 10 years ago

I'm on the HEAD version of opam (I just did brew reinstall opam --HEAD) and tried to update my packages as I haven't done this in a while. Opam upgrade didn't appear to do its thing and then suggested I downgrade a bunch of packages.

This doesn't seem like normal behaviour and below is the output. Please let me know if I can provide something more specific.

AmirMacBook:ocaml.org amir$ opam update
opamdoc    Fetching git://github.com/avsm/opamdoc-dev
default    Downloading https://opam.ocaml.org/urls.txt
Updating ~/.opam/repo/compiler-index ...
Updating ~/.opam/compilers/ ...
Updating ~/.opam/repo/package-index ...
Updating ~/.opam/packages/ ...
Updating the cache of metadata (~/.opam/state.cache) ...
0 to install | 15 to reinstall | 8 to upgrade | 0 to downgrade | 0 to remove
You can now run 'opam upgrade' to upgrade your system.
AmirMacBook:ocaml.org amir$ opam upgrade
The brute-force exploration algorithm timed-out [353 states, 5s].
You might need to add explicit version constraints to your request to get a better answer.

The following actions will be performed:
 - downgrade obuild.0.0.4 to 0.0.2
 - downgrade ocamlfind.1.4.0 to 1.3.2 [required by github, mirage, mirage-unix, ocamlrss, omd]
 - recompile camomile.0.8.5 [use ocamlfind]
 - recompile cmdliner.0.9.2 [use ocamlfind]
 - recompile easy-format.1.0.1 [use ocamlfind]
 - recompile extlib.1.5.4 [use ocamlfind]
 - downgrade fd-send-recv.1.0.1 to 1.0.0 [required by mirage-unix]
 - recompile herelib.109.35.00 [use ocamlfind]
 - recompile ipaddr.0.2.3 [use ocamlfind]
 - downgrade menhir.20130912 to 20130911 [required by github]
 - recompile mpp.0.1.1 [use ocamlfind]
 - downgrade ocamlgraph.1.8.3 to 1.8.2
 - recompile ocamlify.0.0.1 [use ocamlfind]
 - downgrade omd.0.6.1 to 0.5
 - recompile optcomp.1.4 [use ocamlfind]
 - downgrade ounit.2.0.0 to 1.1.2 [required by github, mirage, mirage-unix]
 - recompile pipebang.109.28.00 [use ocamlfind]
 - recompile re.1.2.1 [use ocamlfind]
 - downgrade react.0.9.4 to 0.9.3 [required by github, mirage, mirage-unix]
 - recompile res.4.0.3 [use ocamlfind]
 - recompile ssl.0.4.6 [use ocamlfind]
 - upgrade type_conv.109.41.00 to 109.47.00
 - downgrade typerex.1.99.6-beta to 1.99.4-beta
 - recompile ulex.1.1 [use ocamlfind]
 - recompile xmlm.1.2.0 [use ocamlfind]
 - downgrade biniou.1.0.6 to 1.0.5 [required by github]
 - recompile tuntap.0.7.0 [use ocamlfind]
 - recompile atd.1.0.3 [use ocamlfind]
 - downgrade ocplib-endian.0.4 to 0.3 [required by mirage, mirage-unix]
 - recompile fileutils.0.4.4 [use ocamlfind]
 - downgrade uri.1.3.11 to 1.3.10 [required by github]
 - recompile zed.1.2 [use ocamlfind]
 - downgrade lwt.2.4.3 to 2.4.2 [required by github, mirage, mirage-unix]
 - downgrade ocamlnet.3.7.3 to 3.6.5
 - upgrade bin_prot.109.45.00 to 109.47.00
 - recompile comparelib.109.27.00 [use ocamlfind]
 - recompile deriving-ocsigen.0.5 [use ocamlfind]
 - recompile dyntype.0.9.0 [use ocamlfind]
 - recompile fieldslib.109.20.00 [use ocamlfind]
 - recompile ocaml-data-notation.0.0.10 [use ocamlfind]
 - recompile pa_ounit.109.36.00 [use ocamlfind]
 - upgrade sexplib.109.41.00 to 109.47.00
 - recompile variantslib.109.15.00 [use ocamlfind]
 - downgrade ocp-build.1.99.6-beta to 1.99.4-beta
 - downgrade ocamlrss.2.2.2 to 2.0
 - downgrade yojson.1.1.6 to 1.0.3 [required by github]
 - recompile ocamlmod.0.0.4 [use ocamlfind]
 - downgrade cohttp.0.9.10 to 0.9.2 [required by github]
 - recompile cstruct.0.8.0 [use ocamlfind]
 - recompile lambda-term.1.5 [use ocamlfind]
 - recompile weberizer.0.7.6 [use ocamlfind]
 - recompile js_of_ocaml.1.3.2 [use ocamlfind]
 - downgrade cow.0.7.0 to 0.6.0
 - recompile custom_printf.109.27.00 [use ocamlfind]
 - upgrade core_kernel.109.45.00 to 109.47.00
 - recompile cudf.0.6.3 [use ocamlfind]
 - recompile atdgen.1.2.4 [use ocamlfind]
 - recompile oasis.0.3.0 [use ocamlfind]
 - recompile dns.0.7.0 [use ocamlfind]
 - downgrade shared-memory-ring.0.4.3 to 0.4.2 [required by mirage-unix]
 - install xenstore.1.2.0 [required by mirage]
 - upgrade core.109.45.00 to 109.47.00
 - recompile dose.3.1.2 [use ocamlfind]
 - downgrade github.0.6.1 to 0.4.2
 - recompile ctypes.0.1.1 [use ocamlfind]
 - downgrade mirage-unix.0.9.7 to 0.9.6
 - downgrade mirage.0.9.7 to 0.4.1
 - recompile frag.0.1.0 [use ocamlfind]
 - recompile opam-lib.0.9.4 [use ocamlfind]
 - recompile sodium.0.1.0 [use ocamlfind]
 - recompile opam2web.1.2.0 [use ocamlfind]
 - recompile dnscurve.0.1.0 [use ocamlfind]
1 to install | 43 to reinstall | 5 to upgrade | 23 to downgrade | 0 to remove
Do you want to continue ? [Y/n] n
AmirMacBook:ocaml.org amir$ 
samoht commented 10 years ago
$ opam upgrade
The brute-force exploration algorithm timed-out [353 states, 5s].

OPAM is telling you that the SAT problem it is trying to solve is too hard. That's happen sometimes unfortunately. If you still have the same state, some useful command for us to try to reproduce the issue:

amirmc commented 10 years ago

All the above files are posted as gists now. I hope people find them useful

amirmc commented 10 years ago

I dealt with it last time by running opam remove on a number of packages and then trying to run opam upgrade until I seemed to get something sensible (I didn't actually keep track though). Then I did opam install to get some of those removed packages back. That appeared to get me somewhere sensible. However, the above problem happened again for me just now.

The brute-force exploration algorithm timed-out [371 states, 5s].
You might need to add explicit version constraints to your request to get a better answer.

I've pasted the output into gists as below. I'm not sure if my switch is unusual in any way but my next step is going to be to remove the ~/.opam folder entirely and start from scratch. If this problem reoccurs after that, then I don't really know what to do.

AltGr commented 10 years ago

Thanks @amirmc. @samoht wouldn't it be worth trying with the external aspcud ?

samoht commented 10 years ago

@AltGr this not available under OSX unfortunately

rdicosmo commented 10 years ago

Hmmm... ok, time to ping the POTASSCO team to ask for a package for OSX

On Mon, Nov 18, 2013 at 01:30:16AM -0800, Thomas Gazagnaire wrote:

@AltGr this not available under OSX unfortunately

— Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA PPS E-mail: roberto@dicosmo.org Universite Paris Diderot WWW : http://www.dicosmo.org Case 7014 Tel : ++33-(0)1-57 27 92 20 5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments: MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor) Batiment Sophie Germain Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

AltGr commented 10 years ago

Amir's cudf files seem to be processed alright by aspcud

amirmc commented 10 years ago

Hi folks, last night I archived my old .opam folder and started again from scratch. i.e brew reinstall opam --HEAD followed by opam init and opam switch 4.01.0.

After that, I thought I'd try installing a lot of packages at once to see what would happen and it seemed to work fine (this downloaded 58 packages).

AmirMacBook:~ amir$ opam install github omd mpp core \ 
                                      lwt ctypes utop cow mirari tuntap async \ 
                                      yojson core_extended core_bench cohttp \
                                      async_graphics cryptokit menhir

Not sure if everything is ok now or if I might come across the problem next time I opam update. I'm happy to close this for the time being if you prefer.

kit-ty-kate commented 10 years ago

I just got the same bug :(

avsm commented 10 years ago

Which solver are you using @jpdeplaix ?

kit-ty-kate commented 10 years ago

The default one.

avsm commented 10 years ago

Really need to port aspcud to MacOS X. The built-in solver won't ever be quite as comprehensive as it, but aspcud is only really packaged on Debian at the moment sadly...

kit-ty-kate commented 10 years ago

Ok, I've just installed aspcud and it works (I'm on debian) and even faster ! Thanks

hhugo commented 10 years ago

just got the same issue (with osx)

hhugo commented 10 years ago

I got it to work by setting env variable OPAMSOLVERTIMEOUT=60 It took around 30 sec to find a solution.

the error message in case of timeout could be improved and propose more alternatives. You might need to add explicit version constraints to your request to get a better answer.

hhugo commented 10 years ago

It's getting worse. It takes 1 minutes to realize everything is up-to-date

OPAMSOLVERTIMEOUT=160 time opam upgrade
.Already up-to-date.
       68.38 real        62.85 user         0.76 sys
AltGr commented 10 years ago

Marking as 1.2 as it is mostly independent of the release, but too important to close.

philtomson commented 10 years ago

Is the source to aspcud available somewhere (for those of us not on Debian)?

amirmc commented 10 years ago

If you're on Mavericks then the aspcud solver is the default/recommended one. Just brew reinstall opam and it should all work.

If you really want source is the following helpful? (NB I haven't downloaded to check) http://sourceforge.net/projects/potassco/files/aspcud/

philtomson commented 10 years ago

I'm on Fedora. Just trying to find the source as there is no aspcud package on Fedora so I want to build from source.

avsm commented 10 years ago

@philtomson -- easiest way is probably to follow the MacOS X Homebrew port and dependencies:

https://github.com/Homebrew/homebrew/blob/master/Library/Formula/aspcud.rb

This has aspcud (and source and patches), and you'll need the build dependencies too (clasp and gringo). If you're feeling brave, a few spec files for Fedora would be gratefully received :-)

rdicosmo commented 10 years ago

Dear Phil, we were just looking for somebody to lend a hand on Fedora and RedHat, see my call for help here:

https://sympa.inria.fr/sympa/arc/caml-list/2014-01/msg00047.html

The source code for aspcud is availabe on sourceforge, the released version 1.8 everybody is using is here:

http://sourceforge.net/projects/potassco/files/aspcud/1.8.0/

Instructions on how to build is here:

http://sourceforge.net/p/potassco/code/HEAD/tree/tags/aspcud-1.8.0/INSTALL

Notice that there is a new version in the works, to be released soon, that will make porting easier, but this is deadline period in academia, so dont hold your breath :-)

Thanks a lot for volunteering, and if you need help from upstream, just let me know and I'll put you in touch.

Roberto

On Thu, Feb 06, 2014 at 10:30:17AM -0800, Phil Tomson wrote:

I'm on Fedora. Just trying to find the source as there is no aspcud package on Fedora so I want to build from source.

— Reply to this email directly or view it on GitHub.*

Roberto Di Cosmo


Professeur En delegation a l'INRIA PPS E-mail: roberto@dicosmo.org Universite Paris Diderot WWW : http://www.dicosmo.org Case 7014 Tel : ++33-(0)1-57 27 92 20 5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo

FRANCE. Twitter: http://twitter.com/rdicosmo

Attachments: MIME accepted, Word deprecated

http://www.gnu.org/philosophy/no-word-attachments.html

Office location:

Bureau 3020 (3rd floor) Batiment Sophie Germain Avenue de France

Metro Bibliotheque Francois Mitterrand, ligne 14/RER C

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

AltGr commented 10 years ago

Superseded by #1267