aantron / namespaces

Sane file naming for OCaml projects.
71 stars 3 forks source link

Builds fail on some machines with 0.5.1 #8

Open talex5 opened 8 years ago

talex5 commented 8 years ago

With 0.5.1, my project sometimes fails to compile. It seems to depend on the order of directory entries returned by readdir.

bisecting, it appears this was fixed in d1d90dda649f412ae6af3d0e2dae040cafae065b - would be nice to have a new release.

My test-case is:

docker run --rm -it ocaml/opam:debian-stable_ocaml-4.03.0
git clone https://github.com/talex5/test-namespaces
opam install -y ocamlfind namespaces
cd test-namespaces 
make

This fails on some machines and works on others, even with the exact same Docker image (just a different Linux kernel).

The output on failure is:

opam@59d85fb885a7:~/test-namespaces$ make
ocamlbuild -use-ocamlfind -plugin-tag "package(namespaces)" main.native
+ ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package namespaces myocamlbuild.ml /home/opam/.opam/4.03.0/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
File "_none_", line 1:
Warning 58: no cmx file was found in path for module Namespaces, and its interface was not compiled with -opaque
Finished, 1 target (0 cached) in 00:00:00.
+ ocamlfind ocamlopt -linkpkg _namespaces.cmxa main.cmx -o main.native
File "_none_", line 1:
Error: No implementations provided for the following modules:
         A__foo referenced from _namespaces.cmxa(B__bar)
Command exited with code 2.
Compilation unsuccessful after building 28 targets (0 cached) in 00:00:00.
Makefile:4: recipe for target 'binary' failed
make: *** [binary] Error 10
talex5 commented 8 years ago

However, even with the dev version it still seems to fail on more complex examples.

bluddy commented 8 years ago

I'm also getting a build fail.

aantron commented 8 years ago

Thanks for the report. I will likely rewrite Namespaces soon due to other issues; the rewrite should take care of this problem as well.