hallba / BioModelAnalyzer

BioModelAnalyzer is a user-friendly tool for constructing biological models and verifying them
Other
6 stars 2 forks source link

Installing on Apple Silicon #68

Open ReubenJ opened 3 months ago

ReubenJ commented 3 months ago

I'm having some issues attempting to build/run the project on a MacBook Pro with an M2 Pro chip. I'm trying on the Linux branch.

Building with the current instructions in the Linux branch emits some warnings regarding the platform as the instructions ask you to specify x64 explicitly.

What I've Tried

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Z3, Version=4.12.2.0, Culture=neutral, PublicKeyToken=9c8d792caae602a2'. The system cannot find the file specified.

File name: 'Microsoft.Z3, Version=4.12.2.0, Culture=neutral, PublicKeyToken=9c8d792caae602a2'
[1]    97180 abort      DOTNET_ROOT=/nix/store/9zqlmf2ja3rf72cmkba08x82cyf9hk9l-dotnet-sdk-8.0.201
(devbox)

The only other relevant issue I could come up with was this one from the Z3 repo leading me to think it might be a Z3 issue and not BMA.

Has anyone had any luck with this on MacOS/arm64?

hallba commented 3 months ago

I’ve not tried installing on apple silicon and unfortunately I don’t have a machine to test. However some thoughts on your issue

ReubenJ commented 2 months ago

Thank you for your tips!

How have you installed the Z3 packages, and do all of the links still work.

I was installing the Z3 package with paket, and it seemed to work without any complaints as far as I could see. You're right, there are definitely arm binaries for Z3—I've used them outside of the dotnet context without issue.

You could try run the unixprepare script and open in visual studio to see if it will compile

I'll give this a try too. I was trying with VS Code as well since VS for Mac is being discontinued, but I'll try anyways. Maybe there are some dependencies or settings that I'm missing when compiling/running directly from the terminal.

shorthouse-lab commented 2 months ago

Hi there - I am also trying to install BMA on an apple silicon Mac (M3), with difficulty. I have been able to run msbuild using the adaptations made by @ReubenJ - but generated executables are all .dll files that do not execute (they are .dll files).

I am used to compiling things for linux so have no idea really how to solve these issues.

If you manage to get it working I would very much appreciate you sharing how!

ReubenJ commented 2 months ago

Good to know that others are running into the same issues. I'll certainly update here when I have something, @shorthouse-lab.

hallba commented 1 week ago

For another project I revisited the linux compile which I've successfully completed, though the instructions on the wiki would benefit from updating. I did note though that I was able to use the -roll-forward Major option for the app to get the tool to use the version of the framework I had installed on ubuntu- @ReubenJ did you try this? I'm going to try install on apple intel soon with my updated protocol

hallba commented 1 week ago

Just adding to my comments above, I've installed the bma linux console tool successfully on apple intel, with.a different protocol from the above. I'm using an older dotnet and framework but it does appear to work; if I can find a machine I'll try the same on apple silicon.

The updated linux install protocol is (roughly)

Finally, on ubuntu because I was using a later framework, I run the tool with the roll-forward command line option i.e.

./BioCheckConsoleMulti --roll-forward Major -model some.json -engine SCM