Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shouldn't Rosetta be able to run x86 ? #58

Closed
pannous opened this issue Jul 2, 2022 · 5 comments
Closed

shouldn't Rosetta be able to run x86 ? #58

pannous opened this issue Jul 2, 2022 · 5 comments

Comments

@pannous
Copy link

pannous commented Jul 2, 2022

/opt/virgil/ arch
i386
/opt/virgil/ ./bin/v3c-x86-darwin demo.v3
/opt/virgil/ ./demo             
zsh: bad CPU type in executable: ./demo
@titzer
Copy link
Owner

titzer commented Jul 2, 2022

I am not sure if Rosetta supports 32-bit x86. If you try x86-64-darwin (for this you'll need to first do a 'make' to build a version of the compiler that supports the platform), in theory, Rosetta 2 should be able to run the resulting 64-bit binaries. But there is something wrong with these binaries and Rosetta 2 refuses to run them, though they run natively, at least on Catalina x86-64.

@titzer
Copy link
Owner

titzer commented Jul 2, 2022

I could use some help trouble-shooting why Rosetta 2 cannot run the x86-64-darwin binaries generated by Virgil.

@pannous
Copy link
Author

pannous commented Jul 2, 2022

Maybe I can help if you outline a trouble-shooting procedure

@titzer
Copy link
Owner

titzer commented Jul 2, 2022

  1. clone the repo
  2. Run bin/dev/aeneas bootstrap
  3. Run bin/dev/v3c-x86-64-darwin -output=/tmp apps/HelloWorld/*.v3
  4. Run /tmp/HelloWord

The current error I get is "overlapping segments" but even rearranging the segments in the binary, I cannot get the program to start. In #60 someone pointed to Rosetta 2 not supporting statically linked exes?

@titzer
Copy link
Owner

titzer commented Jul 14, 2022

Closing in favor of #60.

@titzer titzer closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants