Skip to content

Conversation

mrpollo
Copy link
Contributor

@mrpollo mrpollo commented Nov 22, 2024

Use the px4-dev container to build and publish all targets

  • builds x86, and arm64 px4-dev images
    • conditional to changes in either ubuntu.sh or requirements.txt
  • updates ubuntu.sh for installing under both architectures
  • fixes a stringop-overflow issue with gcc > 12
  • uses the px4-dev container to build the build matrix of all boards

@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@mrpollo mrpollo force-pushed the mrpollo/build_with_dev_container branch 2 times, most recently from 24ede0c to 93b6f72 Compare November 22, 2024 02:33
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@PX4 PX4 deleted a comment from github-actions bot Nov 22, 2024
@github-actions github-actions bot added the stale label Dec 23, 2024
@dagar dagar removed the stale label Feb 18, 2025
@alexcekay
Copy link
Member

alexcekay commented Feb 18, 2025

Hi @dagar and @mrpollo,
thanks for the effort 👍

Regarding the compiler errors you guys are facing. I had the same ones when trying to use the Noble containers I created in PX4.

  • Dangling Pointers
  • Stringop Overflow

I had a look at the relevant code and they are false positives. I solved it by ignoring the specific false positives in the relevant files.

For the Dangling Pointers:

For Stringop Overflow:

Regarding the last failed run you posted: This seems like curl is not installed in the image.

@mrpollo mrpollo force-pushed the mrpollo/build_with_dev_container branch 5 times, most recently from 6a3204f to 0fe5fe9 Compare March 3, 2025 18:58
@mrpollo mrpollo marked this pull request as ready for review March 3, 2025 19:19
@mrpollo mrpollo requested a review from dagar March 3, 2025 19:20
@mrpollo
Copy link
Contributor Author

mrpollo commented Mar 3, 2025

thanks for the fix @alexcekay I pushed a commit to the libdronecan lib for the stringop-overflow error, however the remaining failures are not present anymore, hopefully it means they got fixed elsewhere!

@mrpollo mrpollo force-pushed the mrpollo/build_with_dev_container branch 4 times, most recently from 22512aa to 94a4697 Compare March 4, 2025 18:52
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-mar-05-2025/44169/5

@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-sync-q-a-mar-26-2025/44527/1

@afwilkin
Copy link
Contributor

afwilkin commented Apr 8, 2025

@mrpollo The only thing that was an issue was the ESC calibration failing: #24022 (comment)

we will need to flash stable and 1.16 beta to narrow down the issue

It appears that this issue is not a toolchain change. It is presenting itself in 1.16-beta as well as 1.15.4 as well
#24645

@alexcekay
Copy link
Member

alexcekay commented Apr 9, 2025

Thanks for the testing @afwilkin, really helpful.
@mrpollo: Is there anything left to do regarding this PR?

@mrpollo
Copy link
Contributor Author

mrpollo commented Apr 9, 2025

yes, I'm working out how to build both container images in independent native runners so its faster, it just needs an last push, I just haven't had the time, I will however get to it this week

@mrpollo mrpollo force-pushed the mrpollo/build_with_dev_container branch from ef37052 to b3ee267 Compare April 18, 2025 20:14
@mrpollo
Copy link
Contributor Author

mrpollo commented Apr 18, 2025

Finally managed to get the containers to work, here's the multi-arch builds published to both registries.

Next step is to make pushing to registry conditional to when we push a tag, this way we only have tagged containers going forward.

https://github.com/PX4/PX4-Autopilot/pkgs/container/px4-dev/398560804?tag=v1.16.0-beta1-147-g017b361eb7

https://hub.docker.com/repository/docker/px4io/px4-dev/tags/v1.16.0-beta1-147-g017b361eb7/sha256-5333885d3b5d55e821316b7e3325a5fb14b30807747aff26a5ba376470766d91

@mrpollo mrpollo force-pushed the mrpollo/build_with_dev_container branch 4 times, most recently from 3ced9bf to 271e3da Compare April 18, 2025 22:00
@mrpollo mrpollo marked this pull request as ready for review April 21, 2025 13:54
@mrpollo
Copy link
Contributor Author

mrpollo commented Apr 21, 2025

The biggest issue with the cross-compiler container for development is the image size of >5gb, which non-surprisingly comes from installing /Tools/setup/ubuntu.sh

If we dive into the image to inspect its contentsd this is what we find:

Screenshot 2025-04-21 at 10 57 12 AM

  1. the setup layer is 5gb
  2. most of it is in /usr/lib/arm-none-eabi/ (2.5gb)
  3. the other remaining fatty culprits are:
  • 597mb /usr/lib/aarch64-linux-gnu
  • 480mb /usr/lib/gcc/arm-none-eabi

Screenshot 2025-04-21 at 10 56 18 AM

Copy link
Contributor

@julianoes julianoes 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 few nitpicks.

@sfuhrer
Copy link
Contributor

sfuhrer commented May 6, 2025

@mrpollo now that release 1.16 is branched off, can we get this in? Or what's our approach to update the compiler?
Many of us are desperately waiting for the flash efficiency gains that come along with it.

@mrpollo mrpollo force-pushed the mrpollo/build_with_dev_container branch from 271e3da to 3b89952 Compare May 6, 2025 15:32
mrpollo added 2 commits May 6, 2025 08:36
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
@mrpollo
Copy link
Contributor Author

mrpollo commented May 6, 2025

Let's discuss on the Dev Call @sfuhrer

@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-team-sync-and-community-q-a-may-6-2025/45433/2

@dagar dagar merged commit 688e6aa into main May 7, 2025
70 checks passed
@dagar dagar deleted the mrpollo/build_with_dev_container branch May 7, 2025 16:12
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-dev-call-may-14-2025-team-sync-and-community-q-a/45516/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

8 participants