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

Can't build dream on M1 Mac #328

Closed
maxRN opened this issue Jul 8, 2024 · 1 comment · Fixed by oemmerson/dream#1 or #334
Closed

Can't build dream on M1 Mac #328

maxRN opened this issue Jul 8, 2024 · 1 comment · Fixed by oemmerson/dream#1 or #334

Comments

@maxRN
Copy link
Contributor

maxRN commented Jul 8, 2024

I was trying to compile dream locally and while I was able to install all dependencies, running the examples isn't possible.

This is what I did, following docs/CONTRIBUTING.md:

  1. git clone https://github.com/aantron/dream.git --recursive
  2. cd dream
  3. opam switch create . 4.14.1 --no-install
  4. make deps
  5. cd examples/1-hello
  6. dune exec ./hello.exe --> This fails
Entering directory '/Users/maxrn/code/dream'
File "src/cipher/random.ml", line 25, characters 20-37:
25 |   Cstruct.to_string (random_buffer n)
                         ^^^^^^^^^^^^^^^^^
Error: This expression has type string but an expression was expected of type
         Cstruct.t

Dune version: 3.16.0
opam version: 2.1.5
ocaml version: 4.14.1

oemmerson added a commit to oemmerson/dream that referenced this issue Aug 16, 2024
Add higher bound of mirage-crypto dependancy to fix building of example 1 due to API changes.
Fixes aantron#328
oemmerson added a commit to oemmerson/dream that referenced this issue Aug 16, 2024
Add higher bound of mirage-crypto dependancy to fix building of example 1 due to API changes.
Fixes aantron#328
aantron added a commit that referenced this issue Aug 20, 2024
@aantron
Copy link
Owner

aantron commented Aug 20, 2024

Thanks for the report! @oemmerson diagnosed this as that mirage-crypto, a dependency of Dream, has been updated in a breaking fashion in its recent 1.0.0 release. The easiest immediate solution is to pin it to a lower version with opam pin mirage-crypto 0.11.3 --no-action and then try installing Dream.

@oemmerson has also proposed a fix in #331 by constraining Dream to require older versions of mirage-crypto. However, we'd actually like to upgrade to 1.0.0, including because it has some quite nice changes, so I've proposed the upgrade in #334 instead. I'd like to do some more testing before merging, but you should be able to try it now by running the dev commands from a checkout of the mirage-crypto-1 branch.

Thanks @maxRN, @oemmerson!

aantron added a commit that referenced this issue Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants