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

Build script throwing subprocess "Exec format error" #86

Open
ghost opened this issue Nov 14, 2022 · 5 comments
Open

Build script throwing subprocess "Exec format error" #86

ghost opened this issue Nov 14, 2022 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 14, 2022

Hello! There's a bit of an issue with the build process, and the way the bundled cargo is called from aero.py seems to disagree with subprocess on my system for some reason.

Results of ./aero.py --test:

Traceback (most recent call last):
  File "/Users/<name>/Documents/Programming/aero/./aero.py", line 665, in <module>
    main()
  File "/Users/<name>/Documents/Programming/aero/./aero.py", line 644, in main
    user_bins = build_userland(args)
  File "/Users/<name>/Documents/Programming/aero/./aero.py", line 371, in build_userland
    return build_cargo_workspace('userland', 'build', ['--package', 'utest', *cmd_args], get_cargo())
  File "/Users/<name>/Documents/Programming/aero/./aero.py", line 261, in build_cargo_workspace
    code, _, _ = run_command([cargo, command, *args], cwd=cwd)
  File "/Users/cat/Documents/Programming/aero/./aero.py", line 223, in run_command
    output = subprocess.run(args, **kwargs)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '../bundled/host-rust-prebuilt/aero/host-cargo/bin/cargo'
  • python3 --version: Python 3.9.6
  • Host Operating System: macOS Ventura 13.0
  • Host Architecture: aarch64-darwin

note: I'm well aware aarch64-darwin isn't officially supported, but it's one of the few (if not the only) mainstream consumer platform using the aarch64 architecture, and at least the only aarch64-based device I have access to for testing.

@ghost
Copy link
Author

ghost commented Nov 14, 2022

update: aero.py build system is not functional on aarch64 - PR #81 will likely fix architecture support, upon which this issue can be closed.

@48cf
Copy link
Collaborator

48cf commented Nov 14, 2022

the issue here is that the prebuilt rust/cargo is compiled for x86_64-linux, you will have to figure out a way to compile all of that yourself if you want to use it on aarch64-darwin

@jwpjrdev
Copy link
Contributor

why does aero need a seperate rust/cargo installation in place of the system default?

@48cf
Copy link
Collaborator

48cf commented Nov 15, 2022

it's for cross compiling iirc

@ghost
Copy link
Author

ghost commented Nov 17, 2022

@jwpjrdev I'm not super familiar with the architecture of this project, but I think the whole unpacking a remote version of cargo from a Google Drive archive is just a band-aid fix implemented at some point that needs to be replaced (but again take this with a grain of salt).

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