You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to compile a Koka file with --optimize=2 or --optimize=3 whilst emulating x86-64 on a Mac M4, the compilation succeeds but at runtime I get [1] 11926 illegal hardware instruction.
Version numbers
Koka (x86-64)
Koka 3.1.2, 17:28:02 May 30 2024 (ghc release version)
version: 3.1.2
bin : /Users/maarten/lib/x86_64/bin
lib : /Users/maarten/lib/x86_64/lib/koka/v3.1.2
share : /Users/maarten/lib/x86_64/share/koka/v3.1.2
output : .koka/v3.1.2/clang-debug-5a10c3
cc : /usr/bin/clang
Copyright 2019-2024, Microsoft Research, Daan Leijen, and others.
This program is free software; see the source for copying conditions.
This program is distributed in the hope that it will be useful,
but without any warranty; without even the implied warranty
of merchantability or fitness for a particular purpose.
Clang
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: x86_64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Steps to reproduce
Using the following sample script
module error
fun main()
println("If you see this on Mac M4, the issue is fixed, maybe?")
Run your shell in x86-64 mode, e.g. arch -x86_64 zsh.
Install x86-64 version of Koka. For reference, this is what I did.
Create a directory to store x86-64 versions of software, e.g. /Users/you/lib/x86_64
When I try to compile a Koka file with
--optimize=2
or--optimize=3
whilst emulating x86-64 on a Mac M4, the compilation succeeds but at runtime I get[1] 11926 illegal hardware instruction
.Version numbers
Koka (x86-64)
Clang
Steps to reproduce
Using the following sample script
arch -x86_64 zsh
./Users/you/lib/x86_64
curl -o install.sh -sSL https://github.com/koka-lang/koka/releases/latest/download/install.sh
../install.sh --prefix=/Users/you/lib/x86_64 --minimal
./Users/you/lib/x86_64/koka --optimize=2 --compile --output error error.kk && chmod +x error && ./error
The text was updated successfully, but these errors were encountered: