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 2.1beta: upgrade from opam 1.x fails with backtrace #4628

Closed
avsm opened this issue Apr 7, 2021 · 3 comments · Fixed by #4634
Closed

opam 2.1beta: upgrade from opam 1.x fails with backtrace #4628

avsm opened this issue Apr 7, 2021 · 3 comments · Fixed by #4634
Assignees
Projects
Milestone

Comments

@avsm
Copy link
Member

avsm commented Apr 7, 2021

While bisecting a build issue, I reverted back to an old opam repo with opam 2.1beta and got:

$ cd opam-repository && git checkout 437319f58e6ee094608d0964f5ec76819ba33d59
$ opam update
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><>  🐫 
[default] no changes from file:///Users/avsm/src/git/ocaml/opam-repository
[NOTE] Repository at file:///Users/avsm/src/git/ocaml/opam-repository doesn't define its version, assuming it's 1.2.

<><> Upgrading repositories from older opam format ><><><><><><><><><><><><>  🐫 
Upgrading repository "default"...
Fetching patches of ocaml-variants.3.07+1 to check their hashes...
Fetching patches of ocaml-variants.3.07+2 to check their hashes...
Fetching patches of ocaml-base-compiler.3.11.2 to check their hashes...
Fetching patches of ocaml-base-compiler.3.12.0 to check their hashes...
Fetching patches of ocaml-variants.4.00.0+fp to check their hashes...
Fetching patches of ocaml-base-compiler.4.00.1 to check their hashes...
Fetching patches of ocaml-variants.4.00.1+annot to check their hashes...
Fetching patches of ocaml-variants.4.00.1+debug-runtime to check their hashes...
Fetching patches of ocaml-variants.4.00.1+french to check their hashes...
Fetching patches of ocaml-variants.4.00.1+raspberrypi to check their hashes...
Fetching patches of ocaml-base-compiler.4.01.0 to check their hashes...
Fetching patches of ocaml-variants.4.01.0+32bit to check their hashes...
Fetching patches of ocaml-variants.4.01.0+BER to check their hashes...
Fetching patches of ocaml-variants.4.01.0+PIC to check their hashes...
Fetching patches of ocaml-variants.4.01.0+armv6-freebsd to check their hashes...
Fetching patches of ocaml-variants.4.01.0+fp to check their hashes...
Fetching patches of ocaml-variants.4.01.0+open-types to check their hashes...
Fetching patches of ocaml-variants.4.01.0+profile to check their hashes...
Fetching patches of ocaml-variants.4.02.0+improved-errors to check their hashes...
Fetching patches of ocaml-variants.4.02.3+termux to check their hashes...
Fetching patches of ocaml-variants.4.03.0+termux to check their hashes...
Fetching patches of ocaml-variants.4.04.0+termux to check their hashes...
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/aacplus/aacplus.0.2.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/aacplus/aacplus.0.2.2/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/conf-libsvm/conf-libsvm.3/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/conf-libsvm/conf-libsvm.3/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/conf-libuv/conf-libuv.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/conf-mecab/conf-mecab.0.996/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/conf-mecab/conf-mecab.0.996/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/conf-zmq/conf-zmq.0.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.8.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.8.2/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.8.3/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.8.4/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.9.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.9.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.9.2/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.10.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.10.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.11.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.11.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.12.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.13.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.17.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/efl/efl.1.18.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/iocaml-kernel/iocaml-kernel.0.4.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/ivy/ivy.1.2.2/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/ivy/ivy.1.3.1/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/llvm/llvm.3.4/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/llvm/llvm.3.5/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/llvm/llvm.3.6/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/llvm/llvm.3.7/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/lz4/lz4.1.0.0/opam: "source" tag
[WARNING] Ignored depext in /private/var/folders/15/h4lnc3_n4tj_2m9vzkqfx8qm0000gn/T/opam-34337-78da6c/default/packages/lz4/lz4.1.0.1/opam: "source" tag
Fatal error: hd
Backtrace:
  Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
  Called from Stdlib__list.hd in file "list.ml" (inlined), line 30, characters 10-23
  Called from OpamFile.Syntax.to_string_with_preserved_format.item_var_str in file "src/format/opamFile.ml", line 880, characters 34-68
  Called from Stdlib__list.fold_left in file "list.ml", line 121, characters 24-34
  Called from OpamFile.Syntax.to_string_with_preserved_format in file "src/format/opamFile.ml", line 901, characters 8-1023
  Called from OpamFile.OPAMSyntax.to_string_with_preserved_format in file "src/format/opamFile.ml" (inlined), line 3021, characters 4-137
  Called from OpamFile.OPAMSyntax.write_with_preserved_format in file "src/format/opamFile.ml", line 3028, characters 6-89
  Called from OpamAdminRepoUpgrade.do_upgrade.(fun) in file "src/client/opamAdminRepoUpgrade.ml", line 426, characters 11-67
  Called from Stdlib__map.Make.iter in file "map.ml", line 297, characters 20-25
  Called from Stdlib__map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from Stdlib__map.Make.iter in file "map.ml", line 297, characters 10-18
  Called from OpamAdminRepoUpgrade.do_upgrade in file "src/client/opamAdminRepoUpgrade.ml", line 414, characters 2-1023
  Called from OpamRepositoryCommand.update_with_auto_upgrade.(fun) in file "src/client/opamRepositoryCommand.ml", line 258, characters 11-52
  Called from Stdlib__list.fold_left in file "list.ml", line 121, characters 24-34
  Called from OpamRepositoryCommand.update_with_auto_upgrade in file "src/client/opamRepositoryCommand.ml", line 233, characters 4-1023
  Called from OpamFilename.with_flock_upgrade in file "src/core/opamFilename.ml", line 428, characters 14-45
  Re-raised at OpamStd.Exn.finalise in file "src/core/opamStd.ml", line 1362, characters 4-38
  Called from OpamStd.Op.(@@) in file "src/core/opamStd.ml" (inlined), line 1373, characters 17-20
  Called from OpamRepositoryState.with_write_lock in file "src/state/opamRepositoryState.ml", line 264, characters 4-148
  Called from OpamStd.Op.(@@) in file "src/core/opamStd.ml" (inlined), line 1373, characters 17-20
  Called from OpamClient.update in file "src/client/opamClient.ml", line 624, characters 6-186
  Called from OpamCommands.update.update.(fun) in file "src/client/opamCommands.ml", line 1880, characters 6-149
  Called from OpamGlobalState.with_ in file "src/state/opamGlobalState.ml", line 167, characters 14-18
  Re-raised at OpamStd.Exn.finalise in file "src/core/opamStd.ml", line 1362, characters 4-38
  Called from Cmdliner_term.app.(fun) in file "src_ext/cmdliner/src/cmdliner_term.ml", line 27, characters 19-24
  Called from Cmdliner.Term.run in file "src_ext/cmdliner/src/cmdliner.ml", line 118, characters 32-39
  Called from Cmdliner.Term.term_eval in file "src_ext/cmdliner/src/cmdliner.ml", line 148, characters 18-36
  Called from Cmdliner.Term.eval_choice in file "src_ext/cmdliner/src/cmdliner.ml", line 266, characters 22-48
  Called from OpamCliMain.run.(fun) in file "src/client/opamCliMain.ml", line 345, characters 8-60
  Called from OpamCliMain.main_catch_all in file "src/client/opamCliMain.ml", line 247, characters 6-10
@avsm
Copy link
Member Author

avsm commented Apr 7, 2021

Same thing happens with opam admin upgrade on the opam-repo, so it's easier to repro with just that.

@dra27 dra27 added this to the 2.1.0~rc milestone Apr 8, 2021
@dra27 dra27 added this to To do in Opam 2.1.x via automation Apr 8, 2021
@dra27 dra27 added the KIND: BUG label Apr 8, 2021
@dra27
Copy link
Member

dra27 commented Apr 8, 2021

It's a bug in the preserved format rewriter - just working on a fix

@dra27
Copy link
Member

dra27 commented Apr 8, 2021

Concretely, ocamlbuild contains depends: [ ]

@rjbou rjbou self-assigned this Apr 9, 2021
@dra27 dra27 moved this from To do to In Progress in Opam 2.1.x Apr 14, 2021
Opam 2.1.x automation moved this from In Progress to Done Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Opam 2.1.x
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants