[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

What to do about llvm-*-dev in cross Build-Depends?



Hello,

I looked into cross building mesa and before too long encountered its
build dependency on llvm-19-dev. Depending on a development package
sounds fair, no?

llvm is split in to a number of smaller packages. In particular, tools
have been separated to llvm-19-tools and llvm-19-dev depends on them.
This approach also is common practice. Now llvm-19-tools containing
executables and not being marked M-A:foreign starts to raise eyebrows.
As a consequence, we'll end up installing the host version of it. Now
some of the tools are implemented in Python and llvm-19-tools thus
depends on python3. This becomes the host architecture Python
interpreter which is not installable, because its postinst fails byte
compilation. Therefore, llvm-19-dev cannot presently be installed for
the host architecture at all.

I can see a number of fiddles we could tweak here, but I am unsure which
make sense.
 * mesa might be happy with a build architecture llvm-19-dev, but
   mesa-libgallium links libllvm, so that seems extremely unlikely.
 * llvm-19-dev might not actually require llvm-19-tools.
 * llvm-19-dev might be happy with a llvm-19-tools from a different
   architecture.
 * llvm-19-tools might be happy with a Python interpreter from a
   different architecture.

Would someone happen to have some context for figuring out which part we
can sensibly change here?

I note that https://bugs.debian.org/1111182 ("llvm-toolchain-19: please
move /usr/lib/llvm* to a multi-arch co-installable location") and
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/merge_requests/183
look related, but it's not exactly the same even though coinstalling
libllvm-19-dev would also require figuring out what to do about the
transitive Python dependency.

Helmut


Reply to: