Closed luca-della-vedova closed 1 month ago
Thanks for reporting this!
Since I believe that building with clang should just work out of the box, I would simply go with option 3 and add libclang-rt-dev
(which depends on libclang-rt-18-dev
) to the list of packages we install on Ubuntu Noble.
I've opened #686. Can you give it a try by using ros-tooling/setup-ros@christophebedard/noble-install-libclang-rt-dev
?
Description
colcon build
fails to build any package when using clang on Noble / RollingTo Reproduce
CC=clang
andCXX=clang++
)System (please complete the following information)
Additional context
Full failed action log here (not sure if it's public but it's on this PR).
An extract from our action:
Clang can't get anything to compile because
libclang_rt.profile-x86_64.a
is missing. I did some investigation and it seems this is due to the--no-install-recommends
passed to the instruction that installs clang here. The missing file is included in thelibclang-rt-18-dev
package:However, such package is only a recommended dependency of clang:
Which is not installed because of the flag we pass. Furthermore, in our actions we actually do install clang, without the
--no-install-recommends
flag, but because it is already installed by thesetup-ros
action nothing is done and the recommended package is not installed. I don't have a lot of background on this action so I can't tell the implications of my recommendations, the main solutions I can think of are:--no-install-recommends
flag. Will install some additional cruft but should fix clang compiles.clang
, downstream users that want it will do it themselves and not encounter this silent failure.libclang-rt-18-dev
on rolling or the recommended packages altogether.I'm happy to submit a PR if there is any recommendation.