Package Details: clang15 15.0.7-3

Git Clone URL: https://aur.archlinux.org/clang15.git (read-only, click to copy)
Package Base: clang15
Description: C language family frontend for LLVM 15
Upstream URL: https://clang.llvm.org/
Licenses: custom:Apache 2.0 with LLVM Exception
Conflicts: python-clang15
Submitter: foutrelis
Maintainer: greyltc
Last Packager: greyltc
Votes: 7
Popularity: 0.30
First Submitted: 2024-03-09 10:51 (UTC)
Last Updated: 2024-12-25 18:10 (UTC)

Latest Comments

MichelOS commented on 2025-01-26 09:48 (UTC)

Hi, the build errors out due to distutils issue as described here: https://aur.archlinux.org/packages/clang15#comment-1004790

Any plan to upstream the fix?

Auerhuhn commented on 2025-01-01 21:18 (UTC)

Hi @greyltc,

Due to the removal of distutils in Python 3.13, the clang15 build now errors out. I have identified the relevant upstream patches that fix the issue for me.

Please consider adding them to this PKGBUILD. Thanks in advance!

diff --git a/PKGBUILD b/PKGBUILD
index f3bb6b6..b35a1df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,6 +18,8 @@ source=($_source_base/clang-$pkgver.src.tar.xz{,.sig}
         $_source_base/cmake-$pkgver.src.tar.xz{,.sig}
         $pkgname-linker-wrapper-tool-r1.patch
         lit16.patch
+        replace-distutils-in-creduce.patch::https://github.com/llvm/llvm-project/commit/ee341373625163846f4ebc68e46aec6fb46c2c09.patch
+        replace-distutils-in-update_cc_test_checks.patch::https://github.com/llvm/llvm-project/commit/01fdc2a3c9e0df4e54bb9b88f385f68e7b0d808c.patch
         enable-fstack-protector-strong-by-default.patch)
 sha256sums=('a6b673ef15377fb46062d164e8ddc4d05c348ff8968f015f7f4af03f51000067'
             'SKIP'
@@ -27,6 +29,8 @@ sha256sums=('a6b673ef15377fb46062d164e8ddc4d05c348ff8968f015f7f4af03f51000067'
             'SKIP'
             'f82449f41c8258f9ae13bd0c311e940711430d2c979eeb8255b36e0e63cda18c'
             '8c8e1a01d3a46b20a78eccec29904edca46caa2c15fb4e8998423098b482e1a2'
+            'SKIP'
+            'SKIP'
             '7a9ce949579a3b02d4b91b6835c4fb45adc5f743007572fb0e28e6433e48f3a5')
 validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>

@@ -65,6 +69,9 @@ prepare() {
   # Fix testing with lit from LLVM 16
   patch -Np2 -i ../lit16.patch

+  patch -Np2 -i ../replace-distutils-in-creduce.patch
+  patch -Np2 -d ../llvm-$pkgver.src -i ../replace-distutils-in-update_cc_test_checks.patch
+
   # Remove a couple of failing tests
   rm test/Driver/XRay/xray-instrument-{cpu,os}.c
 }

Regards
Claudia

steamer25 commented on 2024-12-27 17:03 (UTC)

Was able to get the key via HTTP from https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x474e22316abf4785a88c6e8ea2c794a986419d8a

...then ran gpg --import /path/to/474e22316abf4785a88c6e8ea2c794a986419d8a.asc .

Not sure why the keyservers weren't responding correctly to hkps requests.

steamer25 commented on 2024-12-27 01:48 (UTC)

I tried these commands. The output from the second one seemed promising but the package install still had the same problem as my previous comment.

$ gpg --keyserver hkps://keyserver.ubuntu.com --recv-key 474E22316ABF4785A88C6E8EA2C794A986419D8A
gpg: keyserver receive failed: Server indicated a failure

$ gpg --keyserver hkps://keys.openpgp.org:443 --recv-key 474E22316ABF4785A88C6E8EA2C794A986419D8A
gpg: key A2C794A986419D8A: no user ID
gpg: Total number processed: 1

steamer25 commented on 2024-12-27 01:28 (UTC)

Getting blocked by the following problem that seems to be related to this package:

:: (1/1) Parsing SRCINFO: clang15
gpg: error reading key: No public key

 :: PGP keys need importing:
 -> 474E22316ABF4785A88C6E8EA2C794A986419D8A, required by: clang15
:: Import? [Y/n] 
:: Importing keys with gpg...
gpg: keyserver receive failed: Server indicated a failure
 -> problem importing keys

Auerhuhn commented on 2024-09-24 23:46 (UTC)

How is it possible for this commit patch to change checksum?

@taba GitHub generates patch files on the fly, possibly using something like git format-patch. The exact configuration of command-line switches that GitHub uses can vary across releases of their web app, and so can the behavior of git format-patch across Git versions (e.g. its diff algorithm).

I recommend to always vendor patch files alongside the PKGBUILD to make sure they’re immutable.

arch-chicken commented on 2024-09-16 10:41 (UTC) (edited on 2024-09-16 10:41 (UTC) by arch-chicken)

For all who have the same problem with the patch not being validated, here is the correct checksum (7th line in the sha256sums array):

f82449f41c8258f9ae13bd0c311e940711430d2c979eeb8255b36e0e63cda18c

You can also use the following patch if you want:

--- a/PKGBUILD    2024-09-16 12:37:13.276651911 +0200
+++ b/PKGBUILD    2024-09-16 12:38:42.567281270 +0200
@@ -26,7 +26,7 @@
             'SKIP'
             '8986f29b634fdaa9862eedda78513969fe9788301c9f2d938f4c10a3e7a3e7ea'
             'SKIP'
-            '75f220b68622a57b49a9480fe2ee321c7ff9b5ce643091b6cb510b9e38400e92'
+            'f82449f41c8258f9ae13bd0c311e940711430d2c979eeb8255b36e0e63cda18c'
             '8c8e1a01d3a46b20a78eccec29904edca46caa2c15fb4e8998423098b482e1a2'
             '7a9ce949579a3b02d4b91b6835c4fb45adc5f743007572fb0e28e6433e48f3a5')
 validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>

taba commented on 2024-06-14 15:49 (UTC)

How is it possible for this commit patch to change checksum?

taba commented on 2024-06-14 15:24 (UTC)

==> Validating source files with sha256sums...
    clang-15.0.7.src.tar.xz ... Passed
    clang-15.0.7.src.tar.xz.sig ... Skipped
    llvm-15.0.7.src.tar.xz ... Passed
    llvm-15.0.7.src.tar.xz.sig ... Skipped
    cmake-15.0.7.src.tar.xz ... Passed
    cmake-15.0.7.src.tar.xz.sig ... Skipped
    clang15-linker-wrapper-tool-r1.patch ... FAILED
    lit16.patch ... Passed
    enable-fstack-protector-strong-by-default.patch ... Passed