pqwy / cpuid

Detect CPU features
ISC License
10 stars 1 forks source link

Unable to build cpuid #5

Closed abhi18av closed 5 years ago

abhi18av commented 5 years ago

Hi @pqwy

I'm trying to install the tls library which relies on this package. However I keep running into this error


root@tuffy:~# opam install tls
[WARNING] Running as root is not recommended
The following actions will be performed:
  ∗ install   cpuid            0.1.1   [required by nocrypto]
  ∗ install   nocrypto         0.5.4-1 [required by tls]
  ∗ install   x509             0.6.2   [required by tls]
  ∗ install   tls              0.9.2
  ↻ recompile conduit-lwt-unix 1.2.0   [uses tls]
  ↻ recompile cohttp-lwt-unix  1.1.1   [uses conduit-lwt-unix]
  ↻ recompile slacko           0.14.1  [uses tls]
===== ∗ 4   ↻ 3 =====
Do you want to continue? [Y/n] y

<><> Gathering sources <><><><><><><><><><><><><><><><><><><><><><><>[cohttp-lwt-unix.1.1.1] found in cache

[conduit-lwt-unix.1.2.0] found in cache
[cpuid.0.1.1] found in cache
[nocrypto.0.5.4-1] found in cache
[slacko.0.14.1] found in cache
[tls.0.9.2] found in cache
[x509.0.6.2] found in cache

<><> Processing actions ><><><><><><><><><><><><><><><><><><><><><><>[ERROR] The compilation of cpuid failed at
        "/root/.opam/opam-init/hooks/sandbox.sh build ocaml
        pkg/pkg.ml build --pinned false --tests false".

#=== ERROR while compiling cpuid.0.1.1 =============================## context     2.0.0 | linux/arm32 | ocaml-base-compiler.4.07.0 | https://opam.ocaml.org#309c6ca1
# path        ~/.opam/default/.opam-switch/build/cpuid.0.1.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --pinned false --tests false
# exit-code   1
# env-file    ~/.opam/log/cpuid-19587-6aa130.env
# output-file ~/.opam/log/cpuid-19587-6aa130.out
### output ###
# ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package ocb-stubblr myocamlbuild.ml /root/.opam/default/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# [WARNING] Running as root is not recommended
# [ERROR] /root/.opam exists, but does not appear to be a valid opam
root. Please remove it and use `opam init', or specify a different `--root' argument
# Failure: Ocb_stubblr: error running opam.
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-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

<><> Error report ><><><><><><><><><><><><><><><><><><><><><><><><><>┌─ The following actions failed
│ λ build cpuid 0.1.1
└─
╶─ No changes have been performed

Could you please help me out a little bit here ?

abhi18av commented 5 years ago

Here's a more focused log

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of cpuid failed at "/root/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --pinned false
        --tests false".

#=== ERROR while compiling cpuid.0.1.1 ========================================#
# context     2.0.0 | linux/arm32 | ocaml-base-compiler.4.07.1 | https://opam.ocaml.org#d8d70fb6
# path        ~/.opam/default/.opam-switch/build/cpuid.0.1.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build ocaml pkg/pkg.ml build --pinned false --tests false
# exit-code   1
# env-file    ~/.opam/log/cpuid-6001-6aa130.env
# output-file ~/.opam/log/cpuid-6001-6aa130.out
### output ###
# ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package ocb-stubblr myocamlbuild.ml /root/.opam/default/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# [WARNING] Running as root is not recommended
# [ERROR] /root/.opam exists, but does not appear to be a valid opam root. Please remove it and use `opam init', or specify a different `--root' argument
# Failure: Ocb_stubblr: error running opam.
# pkg.ml: [ERROR] cmd ['ocamlbuild' '-use-ocamlfind' '-classic-display' '-j' '4' '-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

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build cpuid 0.1.1
└─
╶─ No changes have been performed
hannesm commented 5 years ago

looks the same as #4, with https://github.com/ocaml/opam-repository/pull/12791 this should be fixed. could you please ensure to have ocb-stubblr.0.1.1-1 (requires opam2) installed and reinstall cpuid? imho this issue can be closed then.

pqwy commented 5 years ago

ocb-stubblr is gone, should be fixed. Please reopen if it isn't.