Closed natebragg closed 2 years ago
Did you build Z3 yourself? As far as I know, Z3 only distributes aarch64 binaries for macOS. Can you make sure that you can execute the Z3 binary you installed?
Our default Z3 installer isn't architecture-aware right now and will blindly try to install an x86 version of Z3, which will actually work on ARM Macs via Rosetta, but obviously won't work on Linux. That's something we need to fix up, but since it sounds like you're using your own build of Z3, that won't help here.
z3 is also distributed for Arch (and Manjaro, which I'm using), and is available from their community repository (although this appears to be incorrectly listed in their packages list, it's definitely available through the package manager).
The z3 binary executes just fine:
nate@hassipura-plyn-frie:~$ z3
Error: input file was not specified.
For usage information: z3 -h
nate@hassipura-plyn-frie:~$ which z3
/usr/bin/z3
nate@hassipura-plyn-frie:~$ pacman -Qo /bin/z3
/usr/bin/z3 is owned by z3 4.9.0-1
I see this also (the path is because I had to build racket myself):
nate@hassipura-plyn-frie:~$ .local/share/racket/8.6/pkgs/rosette/bin/z3
-bash: .local/share/racket/8.6/pkgs/rosette/bin/z3: cannot execute binary file: Exec format error
Presumably this is the file you're talking about. If I rename it then suddenly rosette works. Is there a way to check to see if a system install of z3 is available before trying to install one that comes with rosette?
Rosette won’t look for existing installations of Z3. But you can ask it to use a specific installation by providing a path to that installation when you create the solver. Here is the documentation.
Edited to add: you may also want to change the current-solver parameter to use your custom solver instance.
Well, for now I'm happy to just delete rosette's copy of z3. I hope at some point you decide to officially support arm.
I'm running into this issue on v4.1, racket v8.6 (also tested on v8.1), z3 v4.9.0 on aarch64:
This seems to work fine with rosette v4.1, racket v8.5, z3 v4.9.0 on x64:
Since I doubt it's the version of racket, presumably something is going awry between rosette and z3 that's aarch64 specific.