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

iox-#73 Support cross compile for aarch64 #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cnwzhjs
Copy link

@cnwzhjs cnwzhjs commented Dec 6, 2023

Pre-Review Checklist for the PR Author

  1. Code follows the Rust coding style and is formatted with rustfmt
  2. Branch follows the naming format (iox-123-this-is-a-branch)
  3. Commits messages are according to this guideline
  4. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  5. Relevant issues are linked
  6. Add sensible notes for the reviewer
  7. All checks have passed (except task-list-completed)
  8. Assign PR to reviewer

Notes for Reviewer

Currently only toolchain file for target aarch64-unknown-linux-gnu is added. If anyone has a test platform for other targets, please add them as well.

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

  • Closes TBD

@elBoberido
Copy link
Member

@cnwzhjs it seems the new code is not formatted with rustfmt. Can you run cargo fmt and commit the changes?

Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

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

Just a a brief look at the bundled sources. I'm afraid but we cannot bundle them into this repository.

iceoryx-sys/iceoryx-cpp/acl-2.3.1.tar.gz Outdated Show resolved Hide resolved
@cnwzhjs
Copy link
Author

cnwzhjs commented Dec 6, 2023

@cnwzhjs it seems the new code is not formatted with rustfmt. Can you run cargo fmt and commit the changes?

Sure, I'll do that as soon as confirming of how we handle the acl/attr dependencies

@cnwzhjs
Copy link
Author

cnwzhjs commented Dec 19, 2023

Hi @elBoberido , I've just force updated the branch to fix the issues:

  1. Removed the libacl and libattr and their build scripts
  2. Add the chapter Cross-Compiling to the README.md

@elBoberido
Copy link
Member

@cnwzhjs I'll have a closer look to it later on but could you also add a new CI job for cross compiling? Just to ensure we don't break it in the future.

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.87%. Comparing base (fdd6495) to head (adbdc75).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
+ Coverage   49.83%   49.87%   +0.04%     
==========================================
  Files          20       20              
  Lines        1202     1207       +5     
==========================================
+ Hits          599      602       +3     
- Misses        603      605       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@elBoberido elBoberido left a comment

Choose a reason for hiding this comment

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

Looks good. Just a few nitpicks :)

Once the cross compile CI is set up this can be merged

README.md Outdated Show resolved Hide resolved
iceoryx-sys/build.rs Outdated Show resolved Hide resolved
iceoryx-sys/build.rs Outdated Show resolved Hide resolved
iceoryx-sys/build.rs Outdated Show resolved Hide resolved
@cnwzhjs
Copy link
Author

cnwzhjs commented Jan 13, 2024

Looks good. Just a few nitpicks :)

Once the cross compile CI is set up this can be merged

Hi @elBoberido , I've updated the code according to your advices, thanks a lot.

Talking about continuous integration, I need your advice as well:

As you know, cross compiling to aarch64 requires a sysroot with all header and libraries in aarch64. In my local environment, I wrote a script to download, and extract these files from deb packages from debian or ubuntu repository to prepare this sysroot.

Should we include these scripts within the repo, or do you have any other advice on this.

@elBoberido
Copy link
Member

Talking about continuous integration, I need your advice as well:

As you know, cross compiling to aarch64 requires a sysroot with all header and libraries in aarch64. In my local environment, I wrote a script to download, and extract these files from deb packages from debian or ubuntu repository to prepare this sysroot.

Should we include these scripts within the repo, or do you have any other advice on this.

Having to extract files from debian packages sounds cumbersome and might easily break. Did you check these sources?

@cnwzhjs
Copy link
Author

cnwzhjs commented Jan 17, 2024

Talking about continuous integration, I need your advice as well:
As you know, cross compiling to aarch64 requires a sysroot with all header and libraries in aarch64. In my local environment, I wrote a script to download, and extract these files from deb packages from debian or ubuntu repository to prepare this sysroot.
Should we include these scripts within the repo, or do you have any other advice on this.

Having to extract files from debian packages sounds cumbersome and might easily break. Did you check these sources?

Thank for th reply. The first link seems to be clean and work, I'll give it a try.

@elBoberido
Copy link
Member

@cnwzhjs just wanted to know if you are till working on this PR

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.

4 participants