[From nobody Fri Nov 13 20:39:06 2026
Received: (at submit) by bugs.debian.org; 26 Feb 2026 11:32:56 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-13.1 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,
 DKIM_VALID_EF,HAS_PACKAGE,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
 RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,
 SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 13; hammy, 95; neutral, 29; spammy, 0.
 spammytokens: hammytokens:0.000-+--sk:x86_64, 0.000-+--sk:x86_64-,
 0.000-+--symlink, 0.000-+--dpkg, 0.000-+--mkdir
Return-path: &lt;boris@codesynthesis.com&gt;
Received: from codesynthesis.com ([188.40.148.39]:48880)
 by buxtehude.debian.org with esmtps
 (TLS1.2:ECDHE_X25519__RSA_SHA512__AES_256_GCM:256) (Exim 4.96)
 (envelope-from &lt;boris@codesynthesis.com&gt;) id 1vvZbz-005sq0-2V
 for submit@bugs.debian.org; Thu, 26 Feb 2026 11:32:56 +0000
Received: from brak.codesynthesis.com (unknown [105.225.42.85])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by codesynthesis.com (Postfix) with ESMTPSA id CC58F5E59F;
 Thu, 26 Feb 2026 11:32:47 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codesynthesis.com;
 s=mail1; t=1772105568;
 bh=NZsM82bcr7EO98kjOYQXaelWRKA8DDed0ezbvnNTV2Y=;
 h=Date:From:To:Subject:Message-ID:MIME-Version:From;
 b=VTmjLl2OWkAsb8afzOBir83W2aEY+LpJhuAde7D8BGhaqbOs3SwZjfGJ7tDe3ZmSD
 EJrJ4AhJGsclkWSzLEoi5dyLBWKy1oI/c5gg6yw5WjIcgGogXs4jaZlupKIOQFTO2Q
 9KBgmw65vh7PhZYaQpvRxvl3OvVox0du9f+aBdUVy82zpkPDl3J4tSQyg7LAT6X6yk
 k+A53Px6qNpSxElTzGoPacyiTQQV7CEsUPDYUbaN7RaWFHcVHU3xLfH3V0c3ZM5jBg
 2shwlD2byPj/93tW/wLNxt7PwvBqbvimkQtvxFAI+OPW7PmoHdJswNjUrhseNf2buk
 ISuHcMnUV01yQ==
Received: by brak.codesynthesis.com (Postfix, from userid 1000)
 id 66D6A14037C; Thu, 26 Feb 2026 13:32:43 +0200 (SAST)
Date: Thu, 26 Feb 2026 13:32:43 +0200
From: Boris Kolpackov &lt;boris@codesynthesis.com&gt;
To: submit@bugs.debian.org
Subject: /usr/lib/x86_64-linux-gnu/libc++.modules.json contains incorrect paths
Message-ID: &lt;boris.20260226131137@codesynthesis.com&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Organization: Code Synthesis
Delivered-To: submit@bugs.debian.org

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
[...]
&quot;source-path&quot;: &quot;../share/libc++/v1/std.cppm&quot;,
[...]

$ 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/
]