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

Path with dot results in confusing build error #125

Open
ygrek opened this issue Jun 11, 2018 · 2 comments
Open

Path with dot results in confusing build error #125

ygrek opened this issue Jun 11, 2018 · 2 comments

Comments

@ygrek
Copy link

ygrek commented Jun 11, 2018

StR:

  • apply the following patch to extunix :
diff --git a/_oasis b/_oasis
index 704023e..c854ef9 100644
--- a/_oasis
+++ b/_oasis
@@ -41,7 +41,7 @@ Flag strict
   Default: true
 
 Library extunix
-  Path: src/
+  Path: ./src/
   Modules: ExtUnix, ExtUnixAll, ExtUnixSpecific, ExtUnixConfig
   if flag(strict) && ccomp_type(cc)
     CCOpt: -pedantic -Wno-long-long -Wextra
  • oasis setup
  • make
  • observe build failing with :
Finished, 0 targets (0 cached) in 00:00:00.
Solver failed:
  Ocamlbuild knows of no rules that apply to a target named src/extunix.mly. This can happen if you ask Ocamlbuild to build a target with the wrong extension (e.g. .opt instead of .native) or if the source files live in directories that have not been specified as include directories.
Compilation unsuccessful after building 77 targets (77 cached) in 00:00:00.

reproduces on other projects with C stubs, without C stubs it works ok

@gildor478
Copy link
Member

Can you send me the generated setup.ml and myocamlbuild.ml and the file _build/_log?

@ygrek
Copy link
Author

ygrek commented Jun 15, 2018

strange_dot.zip

I suspect the reason is that file path normalization is not applied universally somewhere (inside ocamlbuild?), see:

$ grep libextunix_stubs _log
# Target: src/extunix_stubs, tags: { annot, bin_annot, c, debug, extension:a, file:src/libextunix_stubs.a, my_warnings, ocamlmklib, quiet, safe_string, traverse }
              - Building ./src/libextunix_stubs.a:
                      - Building ./src/libextunix_stubs.cmx:
                              - Building ./src/libextunix_stubs.ml:
                                      - Building ./src/libextunix_stubs.mly
                                      - Building ./src/libextunix_stubs.mll
                              - Building ./src/libextunix_stubs.mlpack
                      - Building ./src/libextunix_stubs.mllib
                      - Building ./src/libextunix_stubs.clib:

ftr start command of ocamlbuild is :

E: Failure("Command ''/home/ygrek/.opam/4.05.0/bin/ocamlbuild' ./src/libextunix_stubs.a ./src/dllextunix_stubs.so ./src/extunix.cma ./src/extunix.cmxa ./src/extunix.a ./src/extunix.cmxs -tag debug' terminated with error code 6")

btw dot can be just forbidden if anything

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

No branches or pull requests

2 participants