pqwy / cpuid

Detect CPU features
ISC License
10 stars 1 forks source link

Failure to install during system OCaml-upgrade induced upgrade #4

Closed mor1 closed 5 years ago

mor1 commented 7 years ago

I did a homebrew update on OSX, which updated the system OCaml to 4.04.1. This automatically triggered a rebuild of my OPAM universe. cpuid upgrade failed, apparently because Ocb_stubblr tried to run opam (I think). Output below. Can provide the detailed .env/out/err files if useful. (Not sure if this is Ocb_stubblr at fault or cpuid, but figured I'd start here :)

#=== ERROR while installing cpuid.0.1.1 =======================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml pkg/pkg.ml build --pinned false --tests false
# path         /Users/mort/.opam/system/build/cpuid.0.1.1
# compiler     system (4.04.1)
# exit-code    1
# env-file     /Users/mort/.opam/system/build/cpuid.0.1.1/cpuid-44032-114c41.env
# stdout-file  /Users/mort/.opam/system/build/cpuid.0.1.1/cpuid-44032-114c41.out
# stderr-file  /Users/mort/.opam/system/build/cpuid.0.1.1/cpuid-44032-114c41.err
### stdout ###
# ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package ocb-stubblr myocamlbuild.ml /Users/mort/.opam/system/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# Failure: Ocb_stubblr: error running opam.
### stderr ###
# [ERROR] Timeout trying to acquire read lock to "/Users/mort/.opam/lock", is
#         another opam process running ?
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-tag' 'debug'
#      '-build-dir' '_build' '-plugin-tag' 'package(ocb-stubblr)' 'opam'
#      'pkg/META' 'CHANGES.md' 'LICENSE.md' 'README.md' 'src/cpuid.a'
#      'src/cpuid.cmxs' 'src/cpuid.cmxa' 'src/cpuid.cma' 'src/cpuid.cmx'
#      'src/cpuid.cmi' 'src/cpuid.mli' 'src/dllcpuid_stubs.so'
#      'src/libcpuid_stubs.a']: exited with 2
mor1 commented 7 years ago

Reinstalling worked just fine FWIW.

abate commented 6 years ago

Same problem here. opam is not a build dependencies. I'm not convinced that during the build phase is a good idea to call the package manager (that might or not be installed). Can't this be done via ocamlfind ?

hannesm commented 5 years ago

this should be fixed by https://github.com/ocaml/opam-repository/pull/12791 - could you install ocb-stubblr.0.1.1-1 (only available on opam2, opam1 is deprecated now) and reinstall cpuid - if this works, please close this issue!?

abate commented 5 years ago

it works for me ! thanks :)

pqwy commented 5 years ago

See #5.