Skip to content

Cannot build with opam #4

Description

@nathanfarlow

After installing obytelib with the symlink trick opam install ocamlclean fails with the following output:

The following actions will be performed:
  ∗ install ocamlclean 2.3

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved ocamlclean.2.3  (cached)
[ERROR] The compilation of ocamlclean.2.3 failed at "make".

#=== ERROR while compiling ocamlclean.2.3 =====================================#
# context     2.1.2 | linux/x86_64 | ocaml.4.13.1 | https://opam.ocaml.org#92063b79
# path        ~/.opam/default/.opam-switch/build/ocamlclean.2.3
# command     ~/.opam/opam-init/hooks/sandbox.sh build make
# exit-code   2
# env-file    ~/.opam/log/ocamlclean-45324-089783.env
# output-file ~/.opam/log/ocamlclean-45324-089783.out
### output ###
# Hint: Recursive traversal of subdirectories was not enabled for this build,
# [...]
#   you should add the option "-r" or create an empty '_tags' file.
#   
#   To enable recursive traversal for some subdirectories only, you can use the
#   following '_tags' file:
#   
#       true: -traverse
#       <dir1> or <dir2>: traverse
#       
# make[1]: *** [Makefile:24: _build/main.native] Error 10
# make[1]: Leaving directory '/home/nathan/.opam/default/.opam-switch/build/ocamlclean.2.3/src'
# make: *** [Makefile:15: all] Error 2



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocamlclean 2.3
└─ 

where ~/.opam/log/ocamlclean-45324-089783.out is

make[1]: Entering directory '/home/nathan/.opam/default/.opam-switch/build/ocamlclean.2.3/src'
cp /home/nathan/.opam/default/.opam-switch/build/ocamlclean.2.3/etc/config.ml config.ml
/usr/lib/ocaml/../../bin/ocamlbuild -cflags -w,@a-4-70,-warn-error,A,-safe-string,-strict-formats,-strict-sequence -lflags -w,@a-4-70,-warn-error,A,-safe-string,-strict-formats,-strict-sequence -no-links -classic-display -cflags -I,+../obytelib,-g -lflags -I,+../obytelib,obytelib.cmxa main.native
ocamldep.opt -modules main.ml > main.ml.depends
ocamldep.opt -modules cleanbra.ml > cleanbra.ml.depends
ocamldep.opt -modules step1.ml > step1.ml.depends
ocamlc.opt -c -w @a-4-70 -warn-error A -safe-string -strict-formats -strict-sequence -I +../obytelib -g -o step1.cmo step1.ml
+ ocamlc.opt -c -w @a-4-70 -warn-error A -safe-string -strict-formats -strict-sequence -I +../obytelib -g -o step1.cmo step1.ml
File "step1.ml", line 12, characters 5-30:
12 | open OByteLib.Normalised_instr
          ^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound module OByteLib
Command exited with code 2.
Hint: Recursive traversal of subdirectories was not enabled for this build,
  as the working directory does not look like an ocamlbuild project (no
  '_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories,
  you should add the option "-r" or create an empty '_tags' file.
  
  To enable recursive traversal for some subdirectories only, you can use the
  following '_tags' file:
  
      true: -traverse
      <dir1> or <dir2>: traverse
      
make[1]: *** [Makefile:24: _build/main.native] Error 10
make[1]: Leaving directory '/home/nathan/.opam/default/.opam-switch/build/ocamlclean.2.3/src'
make: *** [Makefile:15: all] Error 2

Note that

nathan@laptop:~$ opam install obytelib
[NOTE] Package obytelib is already installed (current version is 1.6).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions