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

Arm build for Linux #489

Merged
merged 7 commits into from
Jul 6, 2024
Merged

Arm build for Linux #489

merged 7 commits into from
Jul 6, 2024

Conversation

jacksongoode
Copy link
Collaborator

No description provided.

@Insprill
Copy link
Collaborator

Insprill commented Jul 3, 2024

I'd suggest we use cross to build for multiple architectures.

@jacksongoode
Copy link
Collaborator Author

I'd suggest we use cross to build for multiple architectures.

Thanks, I'll give it a go, this initial PR was just a stab in the dark.

@jacksongoode
Copy link
Collaborator Author

@Insprill If you have any experience with cross, I'd be happy for your help. It seems there are some issues with packages needed to be installed for each architecture.

Comment on lines 44 to 47
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libssl-dev libasound2-dev

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is because cross uses the native action runner to do the amd compilation but not arm? I thought I could install these in the root Cargo.toml with:

[workspace.metadata.cross.target.aarch64-unknown-linux-gnu]
pre-build = [
    "dpkg --add-architecture $CROSS_DEB_ARCH",
    "apt-get update && apt-get --assume-yes install libgtk-3-dev:$CROSS_DEB_ARCH libssl-dev..."
]

But I get this error on the arm Ubuntu indicating they might not be installed...

cflags" "glib-2.0" "glib-2.0 >= 2.56"` did not exit successfully: exit status: 1
  error: could not find system library 'glib-2.0' required by the 'glib-sys' crate

  --- stderr
  Package glib-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `glib-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'glib-2.0' found
  Package glib-2.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `glib-2.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'glib-2.0' found

@jacksongoode jacksongoode force-pushed the jackson/arm-linux-build branch from 41276a2 to 82f9f74 Compare July 6, 2024 08:00
@jacksongoode jacksongoode requested a review from Insprill July 6, 2024 08:01
@jacksongoode
Copy link
Collaborator Author

jacksongoode commented Jul 6, 2024

@Insprill Took long enough... anyways let me know if you have any suggestions with the current implementation. One thing I removed was the cargo test. We could add that back as an independent job if you think its useful but because the Linux builds are happening in Docker images (for now until arm runners are public), we would have to install the dependencies twice.

@jacksongoode jacksongoode force-pushed the jackson/arm-linux-build branch from 0fcd44a to 91055d2 Compare July 6, 2024 21:05
@jacksongoode jacksongoode force-pushed the jackson/arm-linux-build branch from 4881699 to 47bf5f8 Compare July 6, 2024 21:46
@jacksongoode
Copy link
Collaborator Author

@Insprill I'm going to go ahead since I can't see any major consequence. We can add back the test if we'd like in a later PR.

@jacksongoode jacksongoode merged commit ea04b68 into master Jul 6, 2024
1 of 5 checks passed
@jacksongoode jacksongoode deleted the jackson/arm-linux-build branch July 6, 2024 21:48
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

Successfully merging this pull request may close these issues.

2 participants