protostar icon indicating copy to clipboard operation
protostar copied to clipboard

Support different CPU architectures (ARM most importantly)

Open Arcticae opened this issue 2 years ago • 7 comments

We need to support running this took natively on apple silicon which is becoming more common, so supporting other archs should not be that difficult

Arcticae avatar Mar 22 '22 10:03 Arcticae

QEMU on GH can be used to accomplish it, there's an action which does exactly that:

https://github.com/uraimo/run-on-arch-action

Arcticae avatar Mar 22 '22 10:03 Arcticae

It seems like users with ARMs are able to use protostar with rosetta. Leaving this open for now though

Arcticae avatar Mar 23 '22 17:03 Arcticae

this would be great to support for running protostar in arm64 dockers

tarrencev avatar May 23 '22 19:05 tarrencev

Just a quick update that I tried to run Protostar natively on my M1 MacBook Pro 14".

I built it from source following the steps outlined here and get the following error when I run protostar test:

philipp@Philipps-MacBook-Pro-14> protostar test                                                                                                                                          ~/Downloads/test
12:20:51 [INFO] Collected 1 suite, and 2 test cases (0.034 s)                                                                                                                                                          
usage: protostar [-h] [--profile PROFILE] [--version] [--no-color] {init,build,install,remove,update,upgrade,test,deploy,declare} ...
usage: protostar [-h] [--profile PROFILE] [--version] [--no-color] {init,build,install,remove,update,upgrade,test,deploy,declare} ...
protostar: error: argument command: invalid choice: 'tracker_fd=9' (choose from 'init', 'build', 'install', 'remove', 'update', 'upgrade', 'test', 'deploy', 'declare')
protostar: error: argument command: invalid choice: 'from multiprocessing.resource_tracker import main;main(8)' (choose from 'init', 'build', 'install', 'remove', 'update', 'upgrade', 'test', 'deploy', 'declare')
Unexpected Protostar error. Report it here:
https://github.com/software-mansion/protostar/issues

Traceback (most recent call last):
  File "binary_entrypoint.py", line 11, in <module>
  File "protostar/start.py", line 33, in main
  File "protostar/start.py", line 28, in main
  File "asyncio/runners.py", line 44, in run
  File "asyncio/base_events.py", line 642, in run_until_complete
  File "protostar/protostar_cli.py", line 254, in run
  File "protostar/cli/cli_app.py", line 28, in run
  File "protostar/commands/test/test_command.py", line 108, in run
  File "protostar/commands/test/test_command.py", line 171, in test
  File "protostar/commands/test/test_scheduler.py", line 32, in run
  File "multiprocessing/context.py", line 57, in Manager
  File "multiprocessing/managers.py", line 557, in start
  File "multiprocessing/connection.py", line 255, in recv
  File "multiprocessing/connection.py", line 419, in _recv_bytes
  File "multiprocessing/connection.py", line 388, in _recv
EOFError
[14313] Failed to execute script 'binary_entrypoint' due to unhandled exception!

pmuens avatar Jul 25 '22 10:07 pmuens

Just a quick update that I tried to run Protostar natively on my M1 MacBook Pro 14".

I built it from source following the steps outlined here and get the following error when I run protostar test:

philipp@Philipps-MacBook-Pro-14> protostar test                                                                                                                                          ~/Downloads/test
12:20:51 [INFO] Collected 1 suite, and 2 test cases (0.034 s)                                                                                                                                                          
usage: protostar [-h] [--profile PROFILE] [--version] [--no-color] {init,build,install,remove,update,upgrade,test,deploy,declare} ...
usage: protostar [-h] [--profile PROFILE] [--version] [--no-color] {init,build,install,remove,update,upgrade,test,deploy,declare} ...
protostar: error: argument command: invalid choice: 'tracker_fd=9' (choose from 'init', 'build', 'install', 'remove', 'update', 'upgrade', 'test', 'deploy', 'declare')
protostar: error: argument command: invalid choice: 'from multiprocessing.resource_tracker import main;main(8)' (choose from 'init', 'build', 'install', 'remove', 'update', 'upgrade', 'test', 'deploy', 'declare')
Unexpected Protostar error. Report it here:
https://github.com/software-mansion/protostar/issues

Traceback (most recent call last):
  File "binary_entrypoint.py", line 11, in <module>
  File "protostar/start.py", line 33, in main
  File "protostar/start.py", line 28, in main
  File "asyncio/runners.py", line 44, in run
  File "asyncio/base_events.py", line 642, in run_until_complete
  File "protostar/protostar_cli.py", line 254, in run
  File "protostar/cli/cli_app.py", line 28, in run
  File "protostar/commands/test/test_command.py", line 108, in run
  File "protostar/commands/test/test_command.py", line 171, in test
  File "protostar/commands/test/test_scheduler.py", line 32, in run
  File "multiprocessing/context.py", line 57, in Manager
  File "multiprocessing/managers.py", line 557, in start
  File "multiprocessing/connection.py", line 255, in recv
  File "multiprocessing/connection.py", line 419, in _recv_bytes
  File "multiprocessing/connection.py", line 388, in _recv
EOFError
[14313] Failed to execute script 'binary_entrypoint' due to unhandled exception!

If you're on mac - you can use rosetta, so following instructions for installation will work for you (that's the way we use protostar over at SWM)

Arcticae avatar Jul 25 '22 10:07 Arcticae

@Arcticae thanks for the follow-up. I just tried it on my Intel Mac and ran into the exact same error (ailed to execute script 'binary_entrypoint' due to unhandled exception!).

What I did is:

  1. Clone the repository
  2. Build Protostar from source according to the docs
  3. Move the protostar directory to ~/Desktop
  4. Run ./protostar/protostar init to create a new project
  5. cd into the project
  6. Run ../protostar/protostar test

Python 3.9.6 Poetry version 1.1.10

pmuens avatar Jul 25 '22 10:07 pmuens

@Arcticae thanks for the follow-up. I just tried it on my Intel Mac and ran into the exact same error (ailed to execute script 'binary_entrypoint' due to unhandled exception!).

What I did is:

  1. Clone the repository
  2. Build Protostar from source according to the docs
  3. Move the protostar directory to ~/Desktop
  4. Run ./protostar/protostar init to create a new project
  5. cd into the project
  6. Run ../protostar/protostar test

Python 3.9.6 Poetry version 1.1.10

I mean if you're only trying to use it, don't build it from source since it may be difficult. You can just do:

curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash

As listed in the instruction here

Arcticae avatar Jul 25 '22 10:07 Arcticae

@Arcticae Is this one done?

MaksymilianDemitraszek avatar Apr 19 '23 15:04 MaksymilianDemitraszek

@MaksymilianDemitraszek TBH no users reported lack of architecture support, i think we can close for now.

Arcticae avatar Apr 20 '23 09:04 Arcticae