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

setup: fixes ubuntu 22.04 & 24.04 #23745

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

setup: fixes ubuntu 22.04 & 24.04 #23745

wants to merge 4 commits into from

Conversation

mrpollo
Copy link
Contributor

@mrpollo mrpollo commented Sep 30, 2024

See #23707 for context.

  1. We fix the setup install scripts. The majority of the work was done by @TannerGilbert (thank you!)
  2. Test ubuntu.sh in CI in fresh runners and build sitl

Overall the tests run in 20 minutes, they are building sitl ok!

@mrpollo
Copy link
Contributor Author

mrpollo commented Sep 30, 2024

hey @TannerGilbert thanks for the PR (#23707) I moved to this branch so I can also contribute.

The first thign I did was to add a test, we will be building the ubuntu.sh script in a fresh ubuntu image, and as you can see both ubuntu22, and ubuntu24 are failing. Are you obversing similar behaviour?

@TannerGilbert
Copy link

As mentioned in #23707 I tested Ubuntu 24.04 VM and Docker container. For the test with 24.04 cppzmq is missing. Installing it would look similar to:

git clone https://github.com/zeromq/cppzmq.git
cd cppzmq
mkdir build
cd build
cmake ..
sudo make install

Also see #23707 for sample docker setup. Maybe we should add the cppzmq installation to the ubuntu.sh but from what I could figure out when testing this is only required for Ubuntu 24.04


# - name: ownership workaround
# run: git config --system --add safe.directory '*'

Copy link

@TannerGilbert TannerGilbert Oct 1, 2024

Choose a reason for hiding this comment

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

The following step seems to fix the the failing builds.

Suggested change
- name: Install pre-requisites
run: |
# Install ZeroMQ library
sudo apt-get update -y
sudo apt-get install -y libzmq3-dev libunwind-dev
# Clone and install cppzmq
git clone https://github.com/zeromq/cppzmq.git
cd cppzmq
mkdir build
cd build
cmake ..
sudo make install
cd ../..

Installing libunwind-dev seems to be required for both Ubuntu 22.04 and Ubuntu 24.04 but the zmq and cppzmq install seems to me to be only needed for Ubuntu 24.04. Unfortunately I didn't find out where ZMQ is actually used as I didn't find it directly in the PX4 code and I'm therefore unsure whether it makes sense to also include the ZMQ install in the ubuntu.sh script of if it's better to add it to the pipeline and then for example add an additional note in the documentation.

Successful pipeline run: https://github.com/TannerGilbert/PX4-Autopilot/actions/runs/11123812177/job/30908037123

Regardless I hope this is useful in some way.

Best regards,
Gilbert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @TannerGilbert. I also couldn't track down where we use ZeroMQ; perhaps @dagar can help here.

Either way, instead of fixing it for CI, I added the dependencies to the Ubuntu.sh install script since our users will be running into these problems when they upgrade to 22.04 and 24.04

The following packages have unmet dependencies:
 libgstreamer1.0-dev : Depends: libunwind-dev
@mrpollo mrpollo changed the title setup: Ubuntu setup Python >= 3.11 and CI for ubuntu setup: fixes ubuntu 22.04 & 24.04 Oct 3, 2024
@mrpollo
Copy link
Contributor Author

mrpollo commented Oct 3, 2024

Hey @dagar is building sitl enough? Should we instead try to build a board like PX4 FMUv6X?(or similar)

libunwind-dev \
;

# Ubuntu 24.04 requires ZeroMQ
Copy link
Member

Choose a reason for hiding this comment

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

for what?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea. I couldn't trace it either. Maybe dependency inception? if you have a few minutes it would be ideal to check

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.

3 participants