[libcxx-commits] [PATCH] D107799: [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux

Fangrui Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 28 15:50:32 PDT 2021


MaskRay added a comment.

In D107799#3028818 <https://reviews.llvm.org/D107799#3028818>, @lebedev.ri wrote:

> TLDR: it reproduces if there is some runtime library installed (e.g. `libc++-14-dev`),
> then there is `/usr/lib/llvm-14/lib/x86_64-pc-linux-gnu/`,
> which is i guess picked by cmake as the triple to use.
>
> `mv /usr/lib/llvm-14/lib/x86_64-pc-linux-gnu /usr/lib/llvm-14/lib/x86_64-linux-gnu` hides the issue,
> which highlights that the fix is as simple as understanding why clang is using `x86_64-pc-linux-gnu` triple on debian.
> Please do not reland, the bug is real.
>
> Thanks.

I am 95% confident that the bug lies on Debian side: it configures something special so that the triple shifts from the normal `x86_64-linux-gnu` (Debian multiarch, `gcc -dumpmachine` output) or `x86_64-unknown-linux-gnu` (many other Linux distros; vanilla gcc built on Debian/Ubuntu) to `x86_64-pc-linux-gnu`.

I may have a hard time making debootstrap work to reproduce your environment:

  % sudo debootstrap --arch amd64 unstable . http://deb.debian.org/debian
  ...
  I: Unpacking the base system...
  W: Failure trying to run: chroot "/tmp/chroot/." dpkg --force-overwrite --force-confold --skip-same-version --install /var/cache/apt/archives/libapparmor1_3.0.3-2_amd64.deb /var/cache/apt/archives/libargon2-1_0~20171227-0.2_amd64.deb /var/cache/apt/archives/libcryptsetup12_2%3a2.4.0-1_amd64.deb /var/cache/apt/archives/libip4tc2_1.8.7-1_amd64.deb /var/cache/apt/archives/libjson-c5_0.15-2_amd64.deb /var/cache/apt/archives/libkmod2_29-1_amd64.deb /var/cache/apt/archives/dmsetup_2%3a1.02.175-2.1_amd64.deb /var/cache/apt/archives/libdevmapper1.02.1_2%3a1.02.175-2.1_amd64.deb /var/cache/apt/archives/systemd_247.9-3_amd64.deb
  W: See /tmp/chroot/./debootstrap/debootstrap.log for details (possibly the package systemd is at fault)

Advice to the next version of Debian, consider `-DLLVM_HOST_TRIPLE=x86_64-linux-gnu` instead of `pc` if D110663 <https://reviews.llvm.org/D110663> is accepted.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107799/new/

https://reviews.llvm.org/D107799



More information about the libcxx-commits mailing list