Hello David,
With this fix, the bootstrap now completes on arm64 and I get a compiler executable. I was able to build the previously failing example (poly-mlyacc.ML from HOL4). However: the bootstrap no longer works under Rosetta:
Making all in . ./polyimport ./bootstrap/bootstrap64.txt -I . < ./bootstrap/Stage1.sml Use: basis/build.sml Use: basis/InitialBasis.ML /bin/sh: line 1: 2010 Bus error: 10 ./polyimport ./bootstrap/bootstrap64.txt -I . < ./bootstrap/Stage1.sml
I?m also experiencing a new failure when building the HOL4 base theories, where HOL4 (or rather, its own variant of make called ?Holmake?) fails with a SIGSEGV. I don?t know what Holmake is doing when this failure occurs; I can?t get the --debug flags show anything. Given that it?s a segfault it seems possible that this error is related, even if this is the first time I have managed to run the arm64 compiler on this code.
? Oskar
On 1 Nov 2021, at 17:07, David Matthews <David.Matthews at prolingua.co.uk> wrote:
Hello Oskar, I've had another look and it seems that sometimes mprotect fails on previously unused areas leaving the memory unwritable. There doesn't seem to be any logic to it so instead the whole of the code region is allocated at the start. That could result in the poly process requiring a large swap space at the start but there doesn't seem to be any alternative. This is in commit c92c335.
David
On 01/11/2021 14:22, Oskar Abrahamsson wrote:
Hello David, Unfortunately the fix has caused the arm64 bootstrap to die during its 6th stage on my machine. Here is an example of this error: Making Lex Making LEX_ Making SymbolsSig Created signature SymbolsSig Created functor LEX_ Making Pretty Created structure Pretty Making Symbols Created structure Symbols Making Debug /bin/sh: line 1: 47319 Bus error: 10 ./polyimport ./bootstrap/bootstrap64.txt -I . < ./bootstrap/Stage1.sml make[2]: *** [polyexport.o] Error 138 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 This happens after running ./configure and then make in a freshly checked out repository. It also seems to fail at different places in the 6th bootstrap stage (but always during that stage) if I run make again. I also attempted building the compiler with arch -x86_64, and that works fine. ? Oskar