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

Build broken on OS X #29

Closed
mgree opened this issue May 1, 2019 · 8 comments
Closed

Build broken on OS X #29

mgree opened this issue May 1, 2019 · 8 comments

Comments

@mgree
Copy link

mgree commented May 1, 2019

ExtUnix doesn't build on my computer---nor in CI. I've been unsuccessful with both OPAM and manual builds. I'm running OCaml 4.0.7.

The problem seems to be one of how ocamlfind is invoked. Simply removing -syntax camlp4o doesn't seem to do anything.

+ /Users/mgree/.opam/4.07.1+flambda/bin/ocamlfind ocamldep -package bigarray -package bytes -package unix -syntax camlp4o -modules src/pa_have.ml > src/pa_have.ml.depends
ocamlfind: Using -syntax, but no package is selected specifying a preprocessor as required for -syntax
Command exited with code 2.
Compilation unsuccessful after building 79 targets (0 cached) in 00:00:03.
E: Failure("Command ''/Users/mgree/.opam/4.07.1+flambda/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 10")
make: *** [build] Error 1
@mgree
Copy link
Author

mgree commented May 1, 2019

Uninstalling and reinstalling camlp4 did the trick. I have no idea what's going on.

@mgree mgree closed this as completed May 1, 2019
@ygrek
Copy link
Owner

ygrek commented May 1, 2019

This happened before, true. I don't know the details, would be nice to investigate somehow, otherwise cannot fix

@mgree
Copy link
Author

mgree commented May 2, 2019

I'd be happy to help you investigate, but I'm mostly in the dark about OCaml build systems... and OASIS and its codegen is pretty mystifying to me. So you might need to hold my hand a little in terms of what to try.

I'm pretty surprised that uninstalling and reinstalling camlp4 solved the problem. I only tried it because camlp4 wasn't showing up in ocamlfind list. Maybe it's just an OPAM bug?

@mgree
Copy link
Author

mgree commented May 3, 2019

https://discuss.ocaml.org/t/i-cannot-install-extunix-anymore/3699/3?u=mgree seems to confirm my reading that this is an OPAM issue, where camlp4 was left in an indeterminate state.

@ygrek
Copy link
Owner

ygrek commented May 3, 2019

I see you found that it was camlp4 installed outside of opam. This explains then. I am not sure if extunix is the right place to prevent this, but then I don't know what would be a good solution. Maybe opam people come up with something..

@mgree
Copy link
Author

mgree commented May 3, 2019

I'll come back with whatever I discover, but I think you're right: it's not clear that ExtUnix can do much, though in principle you could write a script to detect the error. If I have the cycles/frustration tolerance, I'll try to see if forking the ocaml-ci-scripts can fix things.

ocaml/opam#2451 seems related, too. The core idea I'm coming to is that after bootstrapping, one wants to signal to the parent package manager that things are installed, but not let it manage anything.

@mgree
Copy link
Author

mgree commented May 3, 2019

The current thought is that this is ultimately an issue with brew: see Homebrew/homebrew-core#39468. It's not clear why you'd be failing in CI, though... is it possible that Travis is pulling an out-of-date version of brew? I doubt it, per https://github.com/ocaml/ocaml-ci-scripts/blob/4466db9737c1e615d4aab631bb32b3505ea68ce6/.travis-ocaml.sh#L32... let me push a little harder on this.

@Blaisorblade
Copy link

On CI, see my answer here: camlp4/camlp4#150 (comment)

Separately, I suspect the log in the OP can't be due to Homebrew, unlike on CI. camlp4 must be installed together with ocaml, and the .opam/4.07.1+flambda in the log:

/Users/mgree/.opam/4.07.1+flambda/bin/ocamlfind ocamldep -package bigarray -package bytes -package unix -syntax camlp4o -modules src/pa_have.ml > src/pa_have.ml.depends

suggests (weakly) you're using OCaml 4.07.1+flambda, not Homebrew's. Then I think you should use a corresponding camlp4, which Homebrew won't provide.

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

3 participants