Skip to content

Explicitly install libclang-rt-dev - #889

Merged
christophebedard merged 3 commits into
ros-tooling:mainfrom
mxgrey:explicit_libclang-rt-dev
Jun 2, 2026
Merged

christophebedard merged 3 commits into
ros-tooling:mainfrom
mxgrey:explicit_libclang-rt-dev

Conversation

@mxgrey

@mxgrey mxgrey commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Related to #685, clang does not work properly without libclang-rt-dev being installed. This affects resolute in the same way that it affected noble.

This PR carries the installation of libclang-rt-dev along from noble to resolute.

@mxgrey
mxgrey requested a review from a team as a code owner June 1, 2026 07:21
@mxgrey
mxgrey requested review from MichaelOrlov and emersonknapp and removed request for a team June 1, 2026 07:21
@mxgrey mxgrey mentioned this pull request Jun 1, 2026
6 tasks done
@christophfroehlich

Copy link
Copy Markdown

fyi I also had troubles in installing/using clang on resolute setups, but in handcrafted docker images instead of setup-ros. libclang-rt-dev did not solve this for me, the final workaround was: ros-controls/ros2_control_ci#786

@christophebedard
christophebedard force-pushed the explicit_libclang-rt-dev branch from 903ad19 to 1742f42 Compare June 1, 2026 20:42
@christophebedard

christophebedard commented Jun 1, 2026 •

Copy link
Copy Markdown
Member

I admit I haven't tried clang yet on Resolute. @mxgrey did the fix in this PR actually work for you?

By the way, this PR is missing an update to the index.js file , see https://github.com/ros-tooling/setup-ros/blob/main/DEVELOPING.md

Signed-off-by: Michael X. Grey <[email protected]>
@mxgrey

mxgrey commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi @christophebedard , I've now confirmed that the CI passes when using my fork of setup-ros.

Thanks for pointing out the developing guide, I've run npm install and npm run build, although it's resulted in tens of thousands of lines of code changes, which seems... irregular. Did I do some steps incorrectly? I made sure I was using Node 20 when running those commands, but I don't use Node.js tools very often, so maybe there's a nuance I'm not familiar with.

@christophebedard christophebedard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since this apparently works and was a solution in the past, I'll merge this.

Thanks for pointing out the developing guide, I've run npm install and npm run build, although it's resulted in tens of thousands of lines of code changes, which seems... irregular. Did I do some steps incorrectly? I made sure I was using Node 20 when running those commands, but I don't use Node.js tools very often, so maybe there's a nuance I'm not familiar with.

Yeah, this happens sometimes. I get the same output on my end. Not 100% sure why, but I assume some dependencies aren't fully constrained, so running a fresh npm install installs new (patch, maybe) versions of some dependencies, resulting in a (sometimes) vastly different index.js output.

@christophebedard

Copy link
Copy Markdown
Member

The RHEL/almalinux failures are known.

@christophebedard
christophebedard merged commit a45da15 into ros-tooling:main Jun 2, 2026
28 of 30 checks passed
@mxgrey

mxgrey commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Something I've noticed that may be related to @christophfroehlich 's reported issue, linking problems come back if I use the required-ros-distributions: setting in the repos that I'm testing. If I leave out that setting, then installing libclang-rt-dev, as done with this PR, is sufficient for everything to work.

I haven't spent time investigating it, but my best guess is that when required-ros-distributions: is used, perhaps multiple versions of libstdc++ end up getting installed, so the symbolic links are broken and the linker doesn't know which library version to use.

If anyone comes across this thread and still has linking problems after libclang-rt-dev is installed, maybe check if you can stop using required-ros-distributions:.

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