Canonical Experimented With Rebuilding Its Ubuntu 25.04 Packages Under LLVM/Clang

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • phoronix
    Administrator
    • Jan 2007
    • 67335

    Canonical Experimented With Rebuilding Its Ubuntu 25.04 Packages Under LLVM/Clang

    Phoronix: Canonical Experimented With Rebuilding Its Ubuntu 25.04 Packages Under LLVM/Clang

    This morning the first test rebuild results of the "Plucky Puffin" for Ubuntu 25.04 were shared on the mailing list... While typically not interesting to outsiders, one interesting bit is that as a "bonus" they rebuilt the main components of Ubuntu 25.04 packages with the LLVM Clang compiler compared to the usual GCC compiler...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite
  • KernelCrasher
    Junior Member
    • Feb 2024
    • 24

    #2
    It would be interesting to know the performance difference (if any).

    Comment

    • StarterX4
      Senior Member
      • Aug 2015
      • 308

      #3
      Would be interesting to see an x86_64-v3 rebuild.

      Comment

      • Steffo
        Senior Member
        • Jan 2013
        • 604

        #4
        Originally posted by KernelCrasher View Post
        It would be interesting to know the performance difference (if any).
        Strange you ask this question. There are many performance benchmarks at Phoronix.

        Comment

        • Artim
          Senior Member
          • Dec 2020
          • 1259

          #5
          Originally posted by Steffo View Post

          Strange you ask this question. There are many performance benchmarks at Phoronix.
          And is there one testing a whole Linux distro (or at least the main parts, as not all packages compile properly for all architectures yet) compiled with gcc vs. LLVM?

          Comment

          • Artim
            Senior Member
            • Dec 2020
            • 1259

            #6
            Originally posted by StarterX4 View Post
            Would be interesting to see an x86_64-v3 rebuild.
            There have been tests for a while. Difference is probably not worth wasting additional space on their repo servers and confusing users. At least there hasn't been any indication that there's more than single digit percentage differences, and it's questionable if overall the difference will even be that big.

            Comment

            • skeevy420
              Senior Member
              • May 2017
              • 8644

              #7
              Originally posted by Steffo View Post

              Strange you ask this question. There are many performance benchmarks at Phoronix.
              A lot of those benchmarks use precompiled binaries. The PTS downloads some benchmark from some site and runs it on different userspaces, file systems, etc. Not every test uses the system package. It's why Arch and CachyOS had damn near identical results last month even though CachyOS uses v4 and Arch v1.

              I'm just pointing it out. I'm not complaining because that situation is indicative of how most people run most all software. It's not like we can recompile our proprietary software or easily recompile most binary distributions . . . it's not like we can simply "apt rebuild *".

              Comment

              • xpris
                Senior Member
                • Aug 2012
                • 308

                #8
                Originally posted by Artim View Post

                And is there one testing a whole Linux distro (or at least the main parts, as not all packages compile properly for all architectures yet) compiled with gcc vs. LLVM?
                OpenMandriva is a distro compiled with LLVM. They compile all packages with it, with minor exceptions like glibc. Also kernel is available in both version, by default kernel (clang) is installed but in repo is also for testing gcc version.
                They use LLVM/Clang + LTO + PGO for years without any problems.

                Comment

                • sophisticles
                  Senior Member
                  • Dec 2015
                  • 2591

                  #9
                  That Ubuntu 25.04 test rebuild using the LLVM/Clang compiler did turn up many package build failures: for the main archive, 176 packages failed to build on x86_64, 205 packages failed building on armhf, and 131 packages failed building on ARM64, among the other architectures
                  I don't understand why a package that builds properly with GCC would fail when trying to build it with Clang.

                  Comment

                  • fintux
                    Phoronix Member
                    • Nov 2019
                    • 52

                    #10
                    Originally posted by sophisticles View Post

                    I don't understand why a package that builds properly with GCC would fail when trying to build it with Clang.
                    Sometimes there are bugs in compilers so they either fail to compile valid code or they compile ill-formed code. Clang can usually spot some problems in the code that GCC doesn't notice. There are also some things that are implementation-defined, which can for example trigger some static assertions. I did not check the specific issues in this case, but those are some of the most typical reasons why code compiles on one compiler, but fails on another. Yet a bigger topic are how the compiled code behaves. Especially in C++, there are lots of things that lead to undefined behavior, which can mean anything. On one compiler, the code might do what the developer intended, on another, it can lead to segfault, but it can lead to any behavior an executable can do

                    Comment

                    Working...
                    X