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

OCaml 4.06.0 build failure #5270

Closed
ilovezfs opened this issue Nov 5, 2017 · 4 comments
Closed

OCaml 4.06.0 build failure #5270

ilovezfs opened this issue Nov 5, 2017 · 4 comments
Labels

Comments

@ilovezfs
Copy link

ilovezfs commented Nov 5, 2017

CC @gabelevi @mroch

Testing with flow 0.58.0 with Homebrew and OCaml 4.06.0 (See Homebrew/homebrew-core#20239)

The build fails while install gen with the following error:

# Error: This expression has type bytes but an expression was expected of type
#          string

See https://jenkins.brew.sh/job/Homebrew%20Testing/333/version=sierra/testReport/junit/brew-test-bot/sierra/install_flow/
(duplicate since that log will eventually expire https://gist.github.com/ilovezfs/dbf31ea424ed3392da3aff497aeda207)

I can workaround that by setting -unsafe-string via the `OCAMLPARAM environment variable:

export OCAMLPARAM="safe-string=0,_"

This is a typical issue with 4.06.0 since the default has switched from unsafe-string to safe-string. (See Homebrew/homebrew-core#20277)

Once that's set the OPAM dependencies all install fine. However, the build of flow itself then fails:

File "src/typing/flow_js.ml", line 10205, characters 2-334:
Error: This kind of expression is not allowed as right-hand side of `let rec'
Command exited with code 2.
make[1]: *** [build-flow] Error 10
make: *** [all-homebrew] Error 2

Full log here: https://gist.github.com/ilovezfs/05d070b5c347a585a378a20107733fc3

It would be great if we could get a patch for that build failure so that we don't have to resort to opam switch 4.05.0 via Homebrew/homebrew-core#20298.

@mroch
Copy link
Contributor

mroch commented Nov 7, 2017

I started looking into fixing the safe-string warnings, which look like they'll be pretty extensive, so those fixes will take a while, across multiple commits. the override looks like the way for homebrew to go for now.

will try to get some time to dig into the let rec thing too.

@mroch mroch added the Build label Nov 7, 2017
@ilovezfs
Copy link
Author

ilovezfs commented Nov 7, 2017

Thanks @mroch!

@mroch
Copy link
Contributor

mroch commented Nov 10, 2017

@ilovezfs ff9c103 and 12dd84a should be backportable and avoid needing to set OCAMLPARAM (or just the latter, plus OCAMLPARAM)

@ilovezfs
Copy link
Author

@mroch you're awesome. Backporting done: https://github.com/Homebrew/homebrew-core/pull/20427/files

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

No branches or pull requests

2 participants