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

mirage-crypto & fiat-p256 does not work with newer eqaf (requires the .cstruct package) #26099

Merged
merged 5 commits into from
Jun 17, 2024

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Jun 17, 2024

for #26094

=== ERROR while compiling mirage-crypto.0.11.0 ===============================#
 context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.4.14.2 | file:///home/opam/opam-repository
 path                 ~/.opam/4.14/.opam-switch/build/mirage-crypto.0.11.0
 command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p mirage-crypto -j 255
 exit-code            1
 env-file             ~/.opam/log/mirage-crypto-7-db30d0.env
 output-file          ~/.opam/log/mirage-crypto-7-db30d0.out
 ## output ###
 File "src/dune", line 4, characters 20-32:
 4 |  (libraries cstruct eqaf.cstruct)
                         ^^^^^^^^^^^^
 Error: Library "eqaf.cstruct" not found.
 -> required by library "mirage-crypto" in _build/default/src
 -> required by _build/default/META.mirage-crypto
 -> required by _build/install/default/lib/mirage-crypto/META
 -> required by _build/default/mirage-crypto.install
 -> required by alias install

…ckage):

```
=== ERROR while compiling mirage-crypto.0.11.0 ===============================#
 context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.4.14.2 | file:///home/opam/opam-repository
 path                 ~/.opam/4.14/.opam-switch/build/mirage-crypto.0.11.0
 command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p mirage-crypto -j 255
 exit-code            1
 env-file             ~/.opam/log/mirage-crypto-7-db30d0.env
 output-file          ~/.opam/log/mirage-crypto-7-db30d0.out
 ## output ###
 File "src/dune", line 4, characters 20-32:
 4 |  (libraries cstruct eqaf.cstruct)
                         ^^^^^^^^^^^^
 Error: Library "eqaf.cstruct" not found.
 -> required by library "mirage-crypto" in _build/default/src
 -> required by _build/default/META.mirage-crypto
 -> required by _build/install/default/lib/mirage-crypto/META
 -> required by _build/default/mirage-crypto.install
 -> required by alias install
```
```
=== ERROR while compiling fiat-p256.0.2.1 ====================================#
 context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.4.14.2 | file:///home/opam/opam-repository
 path                 ~/.opam/4.14/.opam-switch/build/fiat-p256.0.2.1
 command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p fiat-p256 -j 255
 exit-code            1
 env-file             ~/.opam/log/fiat-p256-7-227f51.env
 output-file          ~/.opam/log/fiat-p256-7-227f51.out
 ## output ###
 File "p256/dune", line 4, characters 36-48:
 4 |  (libraries bigarray-compat cstruct eqaf.cstruct hex)
                                         ^^^^^^^^^^^^
 Error: Library "eqaf.cstruct" not found.
 -> required by library "fiat-p256" in _build/default/p256
 -> required by _build/default/META.fiat-p256
 -> required by _build/install/default/lib/fiat-p256/META
 -> required by _build/default/fiat-p256.install
 -> required by alias install
```
@hannesm hannesm changed the title mirage-crypto does not work with newer eqaf (requires the .cstruct package) mirage-crypto & fiat-p256 does not work with newer eqaf (requires the .cstruct package) Jun 17, 2024
@raphael-proust
Copy link
Collaborator

Causes build failures on windows but seems to be that -pedantic causes C compiler incompatibilities to become fatal:

 #=== ERROR while compiling mirage-crypto.0.9.2 ================================#
# context              2.2.0~beta3 | win32/x86_64 | ocaml.5.2.0 | file://D:/a/opam-repository/opam-repository
# path                 D:\opamroot\default\.opam-switch\build\mirage-crypto.0.9.2
# command              D:\opamroot\default\bin\dune.exe build -p mirage-crypto -j 3
# exit-code            1
# env-file             D:\opamroot\log\mirage-crypto-8120-f95a93.env
# output-file          D:\opamroot\log\mirage-crypto-8120-f95a93.out
### output ###
# [...]
# D:/opamroot/default/lib/ocaml/caml/misc.h:207:8: warning: ISO C99 does not support the '_Atomic' qualifier [-Wpedantic]
#   207 | extern _Atomic caml_timing_hook caml_finalise_begin_hook;
#       |        ^~~~~~~
# D:/opamroot/default/lib/ocaml/caml/misc.h:208:8: warning: ISO C99 does not support the '_Atomic' qualifier [-Wpedantic]
#   208 | extern _Atomic caml_timing_hook caml_finalise_end_hook;
#       |        ^~~~~~~
# D:/opamroot/default/lib/ocaml/caml/misc.h:209:8: warning: ISO C99 does not support the '_Atomic' qualifier [-Wpedantic]
#   209 | extern _Atomic caml_timing_hook caml_domain_terminated_hook;
#       |        ^~~~~~~
# D:/opamroot/default/lib/ocaml/caml/misc.h:301:8: warning: ISO C99 does not support the '_Atomic' qualifier [-Wpedantic]
#   301 | extern _Atomic fatal_error_hook caml_fatal_error_hook;
#       |        ^~~~~~~

It's not blocking for this PR but it's possibly something to look at later.

@raphael-proust
Copy link
Collaborator

The CI has some issue with alcotest dependency. Probably missing a version constraint:

#=== ERROR while compiling fiat-p256.0.2.1 ====================================#
# context              2.2.0~beta3~dev | linux/x86_64 | ocaml-base-compiler.4.04.2 | pinned(https://github.com/mirage/fiat/releases/download/v0.2.1/fiat-p256-v0.2.1.tbz)
# path                 ~/.opam/4.04/.opam-switch/build/fiat-p256.0.2.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune runtest -p fiat-p256 -j 255
# exit-code            1
# env-file             ~/.opam/log/fiat-p256-7-6ee0be.env
# output-file          ~/.opam/log/fiat-p256-7-6ee0be.out
### output ###
# (cd _build/default && /home/opam/.opam/4.04/bin/ocamlopt.opt -w -40 -g -I test/unit/.test_p256.eobjs/byte -I test/unit/.test_p256.eobjs/native -I /home/opam/.opam/4.04/lib/alcotest -I /home/opam/.opam/4.04/lib/bigarray-compat -I /home/opam/.opam/4.04/lib/bytes -I /home/opam/.opam/4.04/lib/cmdliner -I /home/opam/.opam/4.04/lib/cstruct -I /home/opam/.opam/4.04/lib/eqaf -I /home/opam/.opam/4.04/lib/eqaf/bigstring -I /home/opam/.opam/4.04/lib/eqaf/cstruct -I /home/opam/.opam/4.04/lib/hex -I /home/opam/.opam/4.04/lib/stringext -I p256/.fiat_p256.objs/byte -I p256/.fiat_p256.objs/native -intf-suffix .ml -no-alias-deps -o test/unit/.test_p256.eobjs/native/test_p256.cmx -c -impl test/unit/test_p256.ml)
# File "test/unit/test_p256.ml", line 2, characters 19-36:
# Error: Unbound value Alcotest.testable
# (cd _build/default && /home/opam/.opam/4.04/bin/ocamlopt.opt -w -40 -g -I test/functional/.test_fiat_p256.eobjs/byte -I test/functional/.test_fiat_p256.eobjs/native -I /home/opam/.opam/4.04/lib/alcotest -I /home/opam/.opam/4.04/lib/bigarray-compat -I /home/opam/.opam/4.04/lib/bytes -I /home/opam/.opam/4.04/lib/cmdliner -I /home/opam/.opam/4.04/lib/cstruct -I /home/opam/.opam/4.04/lib/eqaf -I /home/opam/.opam/4.04/lib/eqaf/bigstring -I /home/opam/.opam/4.04/lib/eqaf/cstruct -I /home/opam/.opam/4.04/lib/hex -I /home/opam/.opam/4.04/lib/result -I /home/opam/.opam/4.04/lib/rresult -I /home/opam/.opam/4.04/lib/stringext -I p256/.fiat_p256.objs/byte -I p256/.fiat_p256.objs/native -intf-suffix .ml -no-alias-deps -o test/functional/.test_fiat_p256.eobjs/native/test_fiat_p256.cmx -c -impl test/functional/test_fiat_p256.ml)
# File "test/functional/test_fiat_p256.ml", line 4, characters 4-21:
# Error: Unbound value Alcotest.testable
# (cd _build/default && /home/opam/.opam/4.04/bin/ocamlopt.opt -w -40 -g -I test/wycheproof/.test.eobjs/byte -I test/wycheproof/.test.eobjs/native -I /home/opam/.opam/4.04/lib/alcotest -I /home/opam/.opam/4.04/lib/asn1-combinators -I /home/opam/.opam/4.04/lib/bigarray-compat -I /home/opam/.opam/4.04/lib/bytes -I /home/opam/.opam/4.04/lib/cmdliner -I /home/opam/.opam/4.04/lib/cstruct -I /home/opam/.opam/4.04/lib/eqaf -I /home/opam/.opam/4.04/lib/eqaf/bigstring -I /home/opam/.opam/4.04/lib/eqaf/cstruct -I /home/opam/.opam/4.04/lib/hex -I /home/opam/.opam/4.04/lib/ppx_deriving/runtime -I /home/opam/.opam/4.04/lib/ppx_deriving_yojson/runtime -I /home/opam/.opam/4.04/lib/result -I /home/opam/.opam/4.04/lib/seq -I /home/opam/.opam/4.04/lib/stringext -I /home/opam/.opam/4.04/lib/yojson -I /home/opam/.opam/4.04/lib/zarith -I p256/.fiat_p256.objs/byte -I p256/.fiat_p256.objs/native -I test/helpers/wycheproof/.wycheproof.objs/byte -I test/helpers/wycheproof/.wycheproof.objs/native -intf-suffix .ml -no-alias-deps -o test/wycheproof/.test.eobjs/native/test.cmx -c -impl test/wycheproof/test.ml)
# File "test/wycheproof/test.ml", line 3, characters 10-27:
# Error: Unbound value Alcotest.testable

Not blocking this PR because it's unrelated maintenance. But still maybe something to fix later. (Or something to base archiving decisions on.)

@hannesm
Copy link
Member Author

hannesm commented Jun 17, 2024

Thanks for your review, @raphael-proust. There's no plan to fix all the issues the CI encountered for this PR. We can have separate issues open for the problems you encountered. But it is likely only interesting for historical reasons, since soon we'll get another release of mirage-crypto to continue the work on.

TL;DR: this PR is fine to merge. It only adjusts some bounds.

@dinosaure
Copy link
Contributor

For me, it's also ok to merge 👍.

@raphael-proust
Copy link
Collaborator

Thanks for the contribution! This is a strict improvement so all the remaining problems are left as is for now…

@raphael-proust raphael-proust merged commit 2f8c856 into ocaml:master Jun 17, 2024
1 of 3 checks passed
@hannesm hannesm deleted the eqaf-bounds branch June 17, 2024 15:01
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

Successfully merging this pull request may close these issues.

3 participants