Bug#1129048: /usr/lib/x86_64-linux-gnu/libc++.modules.json contains incorrect paths
Boris Kolpackov
boris at codesynthesis.com
Thu Feb 26 11:32:43 GMT 2026
Package: libc++-21-dev
Version: 1:21.1.8-3
Package libc++-21-dev contains two libc++.modules.json files:
$ dpkg -S libc++.modules.json
libc++-21-dev: /usr/lib/llvm-21/lib/libc++.modules.json
libc++-21-dev: /usr/lib/x86_64-linux-gnu/libc++.modules.json
While the first one looks good, the second contains incorrect paths:
$ cat /usr/lib/x86_64-linux-gnu/libc++.modules.json
[...]
"source-path": "../share/libc++/v1/std.cppm",
[...]
$ ls /usr/lib/x86_64-linux-gnu/../share/libc++/v1/std.cppm
ls: cannot access '/usr/lib/x86_64-linux-gnu/../share/libc++/v1/std.cppm': No such file or directory
Naturally, Clang chooses to print the path to the broken file:
$ clang++-21 -print-file-name=libc++.modules.json
/lib/x86_64-linux-gnu/libc++.modules.json
Feels like either Clang needs to be fixed to report the other file
(and the broken file probably removed) or the broken file needs to
be fixed.
BTW, this bug can be worked around with the following symlink:
# mkdir /usr/lib/share
# ln -s /usr/lib/llvm-21/share/libc++ /usr/lib/share/
More information about the Pkg-llvm-team
mailing list