Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opam upgrade wants to downgrade lots of packages #985

Closed
amirmc opened this issue Nov 10, 2013 · 23 comments
Closed

opam upgrade wants to downgrade lots of packages #985

amirmc opened this issue Nov 10, 2013 · 23 comments

Comments

@amirmc
Copy link
Member

amirmc commented Nov 10, 2013

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
Copy link
Member

samoht commented Nov 12, 2013

$ 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:

  • opam upgrade --cudf=foo this generates foo-XXX.cudf files which are the files used by the solver. Useful for the mancoosi team to get examples of real-life hard problems
  • opam switch export -f foo.txt creates a file with the list of your installed packages. That's useful for the OPAM team to try to reproduce your issue locally.

@amirmc
Copy link
Member Author

amirmc commented Nov 13, 2013

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

@amirmc
Copy link
Member Author

amirmc commented Nov 16, 2013

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
Copy link
Member

AltGr commented Nov 18, 2013

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

@samoht
Copy link
Member

samoht commented Nov 18, 2013

@AltGr this not available under OSX unfortunately

@rdicosmo
Copy link
Contributor

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
Copy link
Member

AltGr commented Nov 18, 2013

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

@amirmc
Copy link
Member Author

amirmc commented Nov 22, 2013

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
Copy link
Member

I just got the same bug :(

@avsm
Copy link
Member

avsm commented Dec 1, 2013

Which solver are you using @jpdeplaix ?

@kit-ty-kate
Copy link
Member

The default one.

@avsm
Copy link
Member

avsm commented Dec 1, 2013

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
Copy link
Member

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

@hhugo
Copy link
Contributor

hhugo commented Dec 13, 2013

just got the same issue (with osx)

@hhugo
Copy link
Contributor

hhugo commented Dec 13, 2013

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
Copy link
Contributor

hhugo commented Jan 9, 2014

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 added a commit to ocaml-opam/opam-rt that referenced this issue Jan 10, 2014
This adds the following data:
* the export of an install of the packages as reported by Amir on ocaml/opam#985 (github omd mpp core lwt ctypes utop cow mirari tuntap async yojson core_extended core_bench cohttp async_graphics cryptokit menhir), with the repo as of 2013-12-01
* a current tar-gz of the packages/ dir of the repo

Using those it will be easy to replay the upgrade scenario. Currently, it's instant with aspcud, and I could'nt have it succeed with the internal heuristic.

Remains to add an automatic test of this in the tests.
@AltGr
Copy link
Member

AltGr commented Jan 14, 2014

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

samoht added a commit to samoht/opam that referenced this issue Jan 19, 2014
@philtomson
Copy link

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

@amirmc
Copy link
Member Author

amirmc commented Feb 6, 2014

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
Copy link

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
Copy link
Member

avsm commented Feb 6, 2014

@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
Copy link
Contributor

rdicosmo commented Feb 6, 2014

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
Copy link
Member

AltGr commented Mar 24, 2014

Superseded by #1267

@AltGr AltGr closed this as completed Mar 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants