llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.82k stars 10.99k forks source link

llvm.sh needs to be updated after libclang-common-*-dev split #62104

Open acruise opened 1 year ago

acruise commented 1 year ago

The changelog says:

Jan 03rd 2023 - libclang-common-X.Y-dev split into: libclang-rt-X.Y-dev, libpolly-X.Y-dev, libclang-rt-X.Y-dev-wasm32 and libclang-rt-X.Y-dev-wasm64

but llvm.sh still installs libclang-common-15-dev, which is present in Ubuntu's repos, thus causing a conflict:

Unpacking libpolly-15-dev:amd64 (1:15.0.7~++20230131104537+8dfdcc7b7bf6-1~exp1~20230131104626.110) ...
dpkg: error processing archive /tmp/apt-dpkg-install-2IfczZ/31-libpolly-15-dev_1%3a15.0.7~++20230131104537+8dfdcc7b7bf6-1~exp1~20230131104626.110_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/llvm-15/include/polly/Canonicalization.h', which is also in package libclang-common-15-dev 1:15.0.7-0ubuntu0.22.04.1

This patch might help:

--- llvm.sh     2023-01-30 10:01:14.000000000 -0800
+++ llvm-new.sh 2023-04-12 12:14:08.130071599 -0700
@@ -167,7 +167,7 @@
 if [[ $ALL -eq 1 ]]; then
     # same as in test-install.sh
     # No worries if we have dups
-    PKG="$PKG clang-tidy-$LLVM_VERSION clang-format-$LLVM_VERSION clang-tools-$LLVM_VERSION llvm-$LLVM_VERSION-dev lld-$LLVM_VERSION lldb-$LLVM_VERSION llvm-$LLVM_VERSION-tools libomp-$LLVM_VERSION-dev libc++-$LLVM_VERSION-dev libc++abi-$LLVM_VERSION-dev libclang-common-$LLVM_VERSION-dev libclang-$LLVM_VERSION-dev libclang-cpp$LLVM_VERSION-dev libunwind-$LLVM_VERSION-dev"
+    PKG="$PKG clang-tidy-$LLVM_VERSION clang-format-$LLVM_VERSION clang-tools-$LLVM_VERSION llvm-$LLVM_VERSION-dev lld-$LLVM_VERSION lldb-$LLVM_VERSION llvm-$LLVM_VERSION-tools libomp-$LLVM_VERSION-dev libc++-$LLVM_VERSION-dev libc++abi-$LLVM_VERSION-dev libclang-rt-$LLVM_VERSION-dev libpolly-15-dev libclang-rt-15-dev-wasm32 libclang-rt-15-dev-wasm64 libclang-$LLVM_VERSION-dev libclang-cpp$LLVM_VERSION-dev libunwind-$LLVM_VERSION-dev"
     if test $LLVM_VERSION -gt 14; then
         PKG="$PKG libclang-rt-$LLVM_VERSION-dev libpolly-$LLVM_VERSION-dev"
     fi
acruise commented 1 year ago

I couldn't find the original source for llvm.sh anywhere, I'd be happy to submit a PR to fix this if someone could point me to it. :)

gordo1337 commented 1 year ago

Having som major issues with this error mentioned...

clang-15 : Depends: libclang-common-15-dev (= 1:15.0.7-0ubuntu0.22.04.1) but 1:15.0.7~++20230131104537+8dfdcc7b7bf6-1~exp1~20230131104626.110 is installed clangd-15 : Depends: libclang-common-15-dev (= 1:15.0.7-0ubuntu0.22.04.1) but 1:15.0.7~++20230131104537+8dfdcc7b7bf6-1~exp1~20230131104626.110 is installed libclang-15-dev : Depends: libclang-common-15-dev (= 1:15.0.7-0ubuntu0.22.04.1) but 1:15.0.7~++20230131104537+8dfdcc7b7bf6-1~exp1~20230131104626.110 is installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

futuretech6 commented 1 year ago

having the same issue

gordo1337 commented 1 year ago

What OS are you using? @futuretech6

gordo1337 commented 1 year ago

My solution was : I solved the problem this is what i wrote : sudo dpkg -i --force-overwrite /var/cache/apt/archives/libclang-common-15-dev_1%3a15.0.7-0ubuntu0.22.04.1_amd64.deb Then a sudo apt update && upgrade

futuretech6 commented 1 year ago

What OS are you using? @futuretech6

Ubuntu 22.04

My solution was : I solved the problem this is what i wrote : sudo dpkg -i --force-overwrite /var/cache/apt/archives/libclang-common-15-dev_1%3a15.0.7-0ubuntu0.22.04.1_amd64.deb Then a sudo apt update && upgrade

I will try this, thx

vringar commented 4 months ago

Just for future reference: The repo that contains llvm.sh is https://github.com/opencollab/llvm-jenkins.debian.net