feat: add Ubuntu 24.04 support alongside 22.04#9596
Open
youtalk wants to merge 4 commits intocarla-simulator:ue5-devfrom
Open
feat: add Ubuntu 24.04 support alongside 22.04#9596youtalk wants to merge 4 commits intocarla-simulator:ue5-devfrom
youtalk wants to merge 4 commits intocarla-simulator:ue5-devfrom
Conversation
youtalk
commented
Mar 20, 2026
youtalk
commented
Mar 20, 2026
UE5's clang with -std=gnu++20 implicitly defines _GNU_SOURCE, which causes glibc 2.38+ (Ubuntu 24.04) to redirect strtol() to __isoc23_strtol(). UE5's sysroot (Rocky Linux 8, glibc 2.17) lacks this symbol, causing an undefined symbol error at link time. Add GlibcCompat.c compiled as C11 (no _GNU_SOURCE, no redirect) that provides __isoc23_strtol/strtoll/strtoul/strtoull as wrappers to the standard glibc functions.
- Detect Ubuntu version in InstallPrerequisites.sh and use libtiff-dev (replacing libtiff5-dev) on 24.04+ - Add --break-system-packages to pip commands on 24.04+ (PEP 668) - Update documentation to list 24.04 as supported - Add CHANGELOG entry Closes #1
b84c72f to
09e8ca8
Compare
4 tasks
There was a problem hiding this comment.
Pull request overview
Adds Ubuntu 24.04 support while keeping Ubuntu 22.04 behavior intact, primarily by updating prerequisite installation logic and adding a glibc compatibility shim to allow linking against UE5’s older sysroot on newer hosts.
Changes:
- Detect Ubuntu version in
InstallPrerequisites.sh, switchlibtiffpackage name for 24.04+, and add pip--break-system-packagesfor 24.04+. - Add a glibc 2.38+ compatibility shim (
__isoc23_strtol/friends) and include it in the LibCarla server build. - Update top-level docs and changelog to list Ubuntu 24.04 as supported.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Util/SetupUtils/InstallPrerequisites.sh | Adds Ubuntu version detection to select appropriate apt/pip behavior for 24.04+. |
| README.md | Updates supported OS text to include Ubuntu 24.04. |
| LibCarla/source/carla/GlibcCompat.c | Introduces shim symbols to avoid link failures with UE5’s older glibc sysroot. |
| LibCarla/CMakeLists.txt | Ensures the shim C file is compiled/linked into the carla-server target. |
| CHANGELOG.md | Notes Ubuntu 24.04 support in latest changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This was referenced Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add Ubuntu 24.04 support while keeping 22.04 fully working.
Changes:
GlibcCompat.c): Wraps__isoc23_strtoland friends so the UE5 sysroot (glibc 2.17) links correctly on 24.04. Cherry-picked from046993b50.InstallPrerequisites.sh: Detects Ubuntu version; useslibtiff-devinstead oflibtiff5-devon 24.04+; adds--break-system-packagesto pip commands on 24.04+ (PEP 668).Not included (future work):
carlasim/carla-builder:ue5-24.04Docker image)Related #9597
Where has this been tested?
Possible Drawbacks
None expected. All changes are conditional on Ubuntu version detection, so 22.04 behavior is unchanged.
This change is