esy-ocaml/hello-reason

Build fails on fresh clone

Closed this issue · 2 comments

There's a few other similar issues, but this one looks different:

    gcc -c -O2 -fno-strict-aliasing -fwrapv -Wall -Wdeclaration-after-statement -fno-common -fexcess-precision=standard -fno-tree-vrp -ffunction-sections -g  -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE   -DCAMLDLLIMPORT= -DNATIVE_CODE -DTARGET_amd64 -DMODEL_default -DSYS_linux   -o misc.n.o misc.c
    signals_nat.c:184:13: error: variably modified 'sig_alt_stack' at file scope
      184 | static char sig_alt_stack[SIGSTKSZ];
          |             ^~~~~~~~~~~~~
    make[3]: *** [Makefile:367: signals_nat.n.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    make[3]: Leaving directory '/home/mihai/.esy/3/b/ocaml-4.12.0-bfdfbfff/runtime'
    make[2]: *** [Makefile:765: makeruntimeopt] Error 2
    make[2]: Leaving directory '/home/mihai/.esy/3/b/ocaml-4.12.0-bfdfbfff'
    make[1]: *** [Makefile:215: opt.opt] Error 2
    make[1]: Leaving directory '/home/mihai/.esy/3/b/ocaml-4.12.0-bfdfbfff'
    make: *** [Makefile:275: world.opt] Error 2
    error: command failed: './esy-build' (exited with 2)
    esy-build-package: exiting with errors above...
    
  building ocaml@4.12.0
esy: exiting due to errors above

Looks like it's the same issue as this one: esy/esy#1388

Just in case, i tried the work-around in esy/esy#1126 (comment) but didn't work, getting the same error.


$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ esy --version
0.6.14

OK so i cloned the main reason repo (https://github.com/reasonml/reason) and it builds fine; looks like this one fails when it tries to build ocaml, which is also built by reason but it succeeds there. Looking at versions (with esy ls-builds), looks like the reason version for ocaml was 4.12.1001, while in this one it was 4.12.0; changing the version in package.json to be 4.12.1001 fixed the issue

Also just noticed there is already a PR that would probably fix this: #88