Skip to content

Update elfutils version and use ubuntu apt packages in dockerfile#315

Merged
godlygeek merged 2 commits into
bloomberg:mainfrom
mbmtbtbc:update-elfutils-and-dockerfile
Jul 9, 2026
Merged

Update elfutils version and use ubuntu apt packages in dockerfile#315
godlygeek merged 2 commits into
bloomberg:mainfrom
mbmtbtbc:update-elfutils-and-dockerfile

Conversation

@mbmtbtbc

@mbmtbtbc mbmtbtbc commented May 29, 2026

Copy link
Copy Markdown
Contributor

Issue number of the reported bug or feature request: fixes #314

Describe your changes
Replace the custom elfutils build stage in the Dockerfile with Ubuntu's packaged libdw-dev and libelf-dev dependencies.

Removed the elfutils_builder stage from the Dockerfile
Removed the download and compilation of elfutils 0.193
Added libdw-dev and libelf-dev to the Ubuntu package list
Removed the copy step that imported the custom-built libraries
Updated documentation referencing the source build of elfutils

Testing performed
Successfully built the Docker image
Verified pkg-config detects both libdw and libelf
Successfully built and installed pystack inside the container using the distro-provided libraries

Additional context
Ubuntu 26.04 currently provides elfutils/libdw version 0.194 rather than 0.195

@mbmtbtbc

Copy link
Copy Markdown
Contributor Author

I worked on the Dockerfile changes and replaced the custom elfutils build with Ubuntu's libdw-dev and libelf-dev packages.

One thing I noticed while validating the change is that Ubuntu 26.04 currently provides elfutils/libdw version 0.194 rather than 0.195:

pkg-config --modversion libdw
0.194

pkg-config --modversion libelf
0.194

The Docker image builds successfully and pystack also builds and installs successfully against the distro-provided libraries.

Is 0.194 acceptable for the Docker image, or would you prefer a different approach to obtain 0.195?

@mbmtbtbc mbmtbtbc changed the title Update elfutils version and use ubuntu apt packages in dockerfile Update elfutils version and use ubuntu apt packages in dockerfile (closes #314) May 29, 2026
@mbmtbtbc mbmtbtbc changed the title Update elfutils version and use ubuntu apt packages in dockerfile (closes #314) Update elfutils version and use ubuntu apt packages in dockerfile May 29, 2026
@codecov-commenter

codecov-commenter commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.93%. Comparing base (0a772ec) to head (9520db0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #315   +/-   ##
=======================================
  Coverage   77.93%   77.93%           
=======================================
  Files          56       56           
  Lines        5988     5988           
  Branches      631      631           
=======================================
  Hits         4667     4667           
  Misses       1321     1321           
Flag Coverage Δ
cpp 77.93% <ø> (ø)
python 77.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@godlygeek

Copy link
Copy Markdown
Contributor

Is 0.194 acceptable for the Docker image, or would you prefer a different approach to obtain 0.195?

It's fine for us to use 0.194 in the Docker image. Since the Docker image is used only for testing, the only reason we'd need to use a newer version there is if we want to use a feature that's only available in a later version, or if we're affected by a bug in 0.194 that's fixed in a later version. If either of those ever happens, we can reintroduce the build from source at that point.

This PR will need to be rebased, though - there's a minor merge conflict between it and #313. Also, it's missing the Signed-off-by line in the commit message body - see CONTRIBUTING.md

More worryingly, it looks like the build of elfutils 0.195 is failing in the manylinux container that cibuildwheel is using...

@mbmtbtbc

Copy link
Copy Markdown
Contributor Author

Understood! Here's what I'll do:

  1. Rebase onto main to resolve the Dockerfile conflict
  2. Amend the commit to add the Signed-off-by line
  3. Dig into the manylinux build log to figure out why 0.195 is failing there

Will push an update once I've sorted it out.

@mbmtbtbc mbmtbtbc closed this Jun 29, 2026
@godlygeek godlygeek reopened this Jul 9, 2026
@godlygeek godlygeek force-pushed the update-elfutils-and-dockerfile branch 2 times, most recently from c831449 to 83ef4b0 Compare July 9, 2026 19:09
Ubuntu currently ships 0.194, which is slightly older than the 0.195
that we vendor with cibuildwheel, but the Docker image is used only for
testing, and so the only reason we'd need to use a newer version there
is if we want to use a feature that's only available in a later version,
or if we're affected by a bug in 0.194 that's fixed in a later version.
If either of those ever happens, we can reintroduce the build from
source at that point.
@godlygeek godlygeek force-pushed the update-elfutils-and-dockerfile branch from 83ef4b0 to 9520db0 Compare July 9, 2026 19:22
@godlygeek

Copy link
Copy Markdown
Contributor

Sorry for taking so long to get around to investigating this.

3. Dig into the manylinux build log to figure out why 0.195 is failing there

The issue turned out to be that the manylinux2014 container has a version of make that isn't new enough (make 3.x instead of 4.x). Installing a newer make fixes the issue.

Other than that, your changes all look good to me. I've rebased this, split it into two commits, and updated the commit messages.

Thanks for the contribution, @mbmtbtbc!

@godlygeek godlygeek merged commit 1edfe2b into bloomberg:main Jul 9, 2026
37 of 38 checks passed
@mbmtbtbc

mbmtbtbc commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

That's awesome, thanks! It was a meaningful learning experience!

@mbmtbtbc mbmtbtbc deleted the update-elfutils-and-dockerfile branch July 9, 2026 19:40
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.

Update to the latest elfutils

3 participants