Skip to content

Conversation

@ulrikstrid
Copy link

@ulrikstrid ulrikstrid commented May 16, 2019

Look for CFLAGS and apply them if they exist. The reason I need this is because Windows doesn't supply endian.h so I want to supply it myself.

@ulrikstrid ulrikstrid changed the title Look for CFLAGS Look for CFLAGS when building with dune May 16, 2019
@XVilka
Copy link

XVilka commented Sep 15, 2019

Fails with OCaml 4.03 and 4.04

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+ /home/travis/.opam/opam-init/hooks/sandbox.sh "build" "dune" "subst" (CWD=/home/travis/.opam/ocaml-base-compiler.4.04.2/.opam-switch/build/nocrypto.0.5.4-1)
+ /home/travis/.opam/opam-init/hooks/sandbox.sh "build" "dune" "build" "-p" "nocrypto" "-j" "1" (CWD=/home/travis/.opam/ocaml-base-compiler.4.04.2/.opam-switch/build/nocrypto.0.5.4-1)
-       ocamlc config/.cfg.eobjs/byte/cfg.{cmi,cmo,cmt} (exit 2)
- (cd _build/default && /home/travis/.opam/ocaml-base-compiler.4.04.2/bin/ocamlc.opt -w -40 -g -bin-annot -I config/.cfg.eobjs/byte -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/cpuid -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_caml -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_dune_lang -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_ocaml_config -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_result -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_stdune -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/configurator -no-alias-deps -o config/.cfg.eobjs/byte/cfg.cmo -c -impl config/cfg.ml)
- File "config/cfg.ml", line 12, characters 21-35:
- Error: Unbound value Sys.getenv_opt
[ERROR] The compilation of nocrypto failed at
        "/home/travis/.opam/opam-init/hooks/sandbox.sh build dune build -p
        nocrypto -j 1".

#=== ERROR while compiling nocrypto.0.5.4-1 ===================================#
# context     2.0.3 | linux/x86_64 | ocaml-base-compiler.4.04.2 | pinned(file:///home/travis/build/mirleft/ocaml-nocrypto)
# path        ~/.opam/ocaml-base-compiler.4.04.2/.opam-switch/build/nocrypto.0.5.4-1
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p nocrypto -j 1
# exit-code   1
# env-file    ~/.opam/log/nocrypto-26138-ffb3fd.env
# output-file ~/.opam/log/nocrypto-26138-ffb3fd.out
### output ###
#       ocamlc config/.cfg.eobjs/byte/cfg.{cmi,cmo,cmt} (exit 2)
# (cd _build/default && /home/travis/.opam/ocaml-base-compiler.4.04.2/bin/ocamlc.opt -w -40 -g -bin-annot -I config/.cfg.eobjs/byte -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/cpuid -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_caml -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_dune_lang -I /home/travis/.opam/ocaml-base-compiler.4.04.2/lib/dune/_ocaml_config -[...]
# File "config/cfg.ml", line 12, characters 21-35:
# Error: Unbound value Sys.getenv_opt

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants