racket / ChezScheme

Chez Scheme
Apache License 2.0
110 stars 8 forks source link

`Killed: 9` on `tarm64osx` #43

Closed L-as closed 2 years ago

L-as commented 2 years ago

The code: https://github.com/NixOS/nixpkgs/pull/131833

The code is essentially doing

./configure --pb ZLIB=$ZLIB LZ4=$LZ4
make tarm64osx.bootquick
./configure -m=tarm64osx
make -C tarm64osx/c

This works for tarm64le, ta6le, and (supposedly) ta6osx. Do you have any idea why this happens?

mflatt commented 2 years ago

Since I work primarily on tarm64osx, I'm sure that things generally work there. The above sequence works for me in a fresh checkout after git submodule init and git submodule update --depth 1, except that I left off the ZLIB=$ZLIB LZ4=$LZ4 in the first line.

One things to beware is that macOS on AArch64 is picky about binaries and signing, and it keeps some sort of shadow filesystem state that can be difficult to understand. If there's any step after the ones you have above that touch the executable content, especially without unsigning it before and resigning it after, then the OS will not run it. In my initial development on macOS on AArch64, I spent a lot of time trying to understand why a valid executable failed on startup; often, it was because the binary I was trying to run had overwrriten a bad executable, and the OS had somehow flagged that path (inode?) as permanently bad until the file was explicitly deleted (and then a new file could use the same path). I still don't understand the rules, and this may not be the problem you're seeing – but I mention it because it has been a common problem in my experience, it's not obvious, and the symptom was the same killed-by-signal-9 failure.

L-as commented 2 years ago

Thanks! I'll try playing around with it myself too.