Skip to content

Conversation

alexcekay
Copy link
Member

@alexcekay alexcekay commented May 19, 2025

Solved Problem

We successfully switched our CI to use the arm-none-eabi-gcc delivered with the latest Ubuntu LTS (Noble). This is GCC 13 and saves us FLASH. This will lead to users being able to add more features to PX4.

According to our docs we support Ubuntu Jammy (delivers GCC 10) and Ubuntu Noble (delivers GCC 13).
With GCC 10 the FLASH usage for a v5x is as follows:

FLASH_AXIM:     2036661 B      2016 KB     98.66%

With GCC 13 the FLASH usage for a v5x is as follows

FLASH_AXIM:     2013884 B      2016 KB     97.55%

So when we add more features there will be a point in time where:

  • Everything still works fine on the CI, as it uses GCC 13
  • Users on Jammy (that use GCC 10) will be surprised, as it does not compile on their system

Solution

  • Install GCC 13 on Jammy via ubuntu.sh

Alternatives

  • We could also not list Jammy as a supported platform anymore
  • Or document that Jammy is only supported when manually updating the compiler, but in this case it would be easier to just use this script

@mrpollo
Copy link
Contributor

mrpollo commented May 19, 2025

Yes, we will support the current and prior Ubuntu LTS, but the decision was to only use the compilers from the default apt registry. Are you running your firmware builders with Jammy, or is this for a development environment fix?

@alexcekay
Copy link
Member Author

alexcekay commented May 19, 2025

Are you running your firmware builders with Jammy, or is this for a development environment fix?

I don't run any firmware builders with Jammy, so everything related to CI should not cause any errors.

What I am thinking about is users that want to compile PX4 locally and use Jammy (so development environment). They will face some problems rather soon, as their GCC 10 will not be able to compile NuttX targets as soon as more FLASH is used.

So we should somehow help them, either via this PR, or documentation update that they will need to use GCC 13 if they want to compile main. Otherwise Jammy users will have a hard time finding out why stuff does not compile for them locally after they setup their environment with ubuntu.sh, but everything works on the CI.

The main reason for this PR is to setup a discussion about this topic, as we most likely will always have an indirect compiler dependency due to specific compiler versions generating binaries that use different amount of FLASH. Most likely the newer compiler versions will optimize better and thus cause problems for users that want to use older ones.

Also adding @dagar, @niklaut, @MaEtUgR to the discussion.

@mrpollo
Copy link
Contributor

mrpollo commented May 19, 2025

IMO, we should aim for reproducible builds.

It’s possible we were too flexible with our wording. We should consider updating the documentation to explicitly lock the development environment to the current Ubuntu LTS.

I believe the original intent behind supporting the previous LTS was to accommodate developers who haven’t yet upgraded. Let’s clarify that internally and decide how best to guide users, both in terms of build setup and expectation management.

@alexcekay alexcekay closed this May 21, 2025
@alexcekay
Copy link
Member Author

alexcekay commented May 21, 2025

@mrpollo: This was discussed in the dev call today. Will update the documentation to state that we only support Jammy.

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