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

Sandmark runs fail due to Lwt 5.7.0 compilation error #149

Closed
punchagan opened this issue Jul 24, 2024 · 6 comments
Closed

Sandmark runs fail due to Lwt 5.7.0 compilation error #149

punchagan opened this issue Jul 24, 2024 · 6 comments

Comments

@punchagan
Copy link
Contributor

The nightly benchmark runs seem to have failed for a couple of days with this error.

@punchagan
Copy link
Contributor Author

It looks like this change triggers a failure with building Lwt 5.7.0.

#=== ERROR while compiling lwt.5.7.0 ==========================================#
# context              2.0.7 | linux/x86_64 | ocaml-base-compiler.5.3.0+trunk | git+https://github.com/ocaml/opam-repository.git
# path                 /tmp/sandmark/_opam/5.3.0+trunk/.opam-switch/build/lwt.5.7.0
# command              /tmp/sandmark/_opam/5.3.0+trunk/bin/dune build -p lwt -j 127
# exit-code            1
# env-file             /tmp/sandmark/_opam/log/lwt-2313823-bf2656.env
# output-file          /tmp/sandmark/_opam/log/lwt-2313823-bf2656.out
### output ###
# unix_writev_job.c:36:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
# [...]
# unix_writev_job.c:42:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
#    42 | {
#       | ^
# unix_writev_job.c:59:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
#    59 | {
#       | ^
# In file included from unix_writev_job.c:15:
# lwt_unix.h:46:6: error: old-style parameter declarations in prototyped function definition
#    46 | void lwt_unix_not_available(char const *feature) Noreturn;
#       |      ^~~~~~~~~~~~~~~~~~~~~~
# unix_writev_job.c:83: error: expected ‘{’ at end of input

I'm not sure what the right way to fix this would be. Before I try and dig into fixing this, @MisterDA would you have insights on what might be happening here and how to fix this?

@MisterDA
Copy link

MisterDA commented Jul 25, 2024

The problem is probably the Noreturn at the end of the prototype.
The particular change causing this in ocaml are these points:

  • CAMLnoret must come first in declarations

  • Simplify CAMLnoret definition

I've proposed a fix to Lwt: ocsigen/lwt@0d9db31. In the meantime, you could either apply this patch, or pin-depend on my branch at ocsigen/lwt#1022.

@MisterDA
Copy link

No, it's clear that I've introduced a regression in the definition of Noreturn. I'll submit a new patch reverting to the previous definition of this macro.

@punchagan
Copy link
Contributor Author

Thanks for looking into this @MisterDA. One of the things that was confusing for me was not being able to reproduce the failure with the following steps.

opam compiler create ocaml:36b7209723eb2cf35ba3b87fc37732f04c110464
eval $(opam env --switch=ocaml-ocaml-36b7209723eb2cf35ba3b87fc37732f04c110464) 
opam install lwt=5.7.0

I'm not sure if there's something specifically in the sandmark setup that causes this failure to be triggered.

@MisterDA
Copy link

It's also tied to the C compiler version…

@punchagan
Copy link
Contributor Author

This should now be fixed! Thanks @MisterDA !

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