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

Error while building tls #385

Closed
abhi18av opened this issue Oct 7, 2018 · 5 comments
Closed

Error while building tls #385

abhi18av opened this issue Oct 7, 2018 · 5 comments

Comments

@abhi18av
Copy link

abhi18av commented Oct 7, 2018

Hi mirleft

I was trying to install tls via opam but I keep running into the following 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

Please let me know how may I resolve this one :)

@Leonidas-from-XIV
Copy link

# [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

You should probably address the errors and warnings it prints out, then I am reasonably certain it will build.

@abhi18av
Copy link
Author

abhi18av commented Oct 7, 2018

Mmm, actually I am trying out a server ( for the first time ! ) and I the only way I have access to it is ssh root@xyz and this is the reason I installed everything as root.

I don't quite know how to create user and run ocaml as a user, could you please point me in the right direction ?

@cfcs
Copy link
Contributor

cfcs commented Oct 13, 2018

In the issue thread here Leonidas-from-XIV/slacko#34 there's a report by @abhi18av that cpuid fails to build or report something correctly on a ARMv7 board.
Should probably be filed with the cpuid upstream.

@hannesm
Copy link
Member

hannesm commented Nov 1, 2018

thanks for the report, sorry for the delayed response. FWIW, opam2 and ocb-stubblr were not good friends, but since ocaml/opam-repository#12791 (ocb-stubblr.0.1.1-1) is in opam-repository, this should work smoothly. please run opam update and opam install ocb-stubblr (ensuring its version is 0.1.1-1), and reopen if you still encounter this issue. sorry for the trouble.

@hannesm hannesm closed this as completed Nov 1, 2018
@abhi18av
Copy link
Author

abhi18av commented Nov 3, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants