Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-10073

[llvm-kit] rust-bin needs to be installed alongside llvm-15 for lto optimizations to work in firefox/thunderbird

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium (Ebuild) Medium (Ebuild)
    • None
    • None
    • Hide
      Install sys-devel/llvm-13.0.0 on your Funtoo System
      Install the latest dev-lang/rust-bin-1.61.0
      Then emerge the latest www-client/firefox with the additional USE flags "lto pgo"
      The portage error should instantly throw as part of the ebuilds pre-flight checks
      Show
      Install sys-devel/llvm-13.0.0 on your Funtoo System Install the latest dev-lang/rust-bin-1.61.0 Then emerge the latest www-client/firefox with the additional USE flags "lto pgo" The portage error should instantly throw as part of the ebuilds pre-flight checks
    • This is impacting rust-bin and thus many things that might use rust.
    • LLVM version used by Rust (14) does not match with ld.lld version (13)

      Currently our dev-lang/rust-bin is built with a newer version of LLVM, specifically the 14 major release, which prevents using Link Time Optimizations for Rust and LLVM compiled software using Funtoo's current available version of LLVM.

      I encountered this error when tying to use LTO on the latest www-client/firefox:

       * Using LLVM slot 13 to build
       * Rust is using LLVM version 14 but ld.lld version belongs to LLVM version 13.
       * You will be unable to link www-client/firefox. To proceed you have the following options:
       *   - Manually switch rust version using 'eselect rust' to match used LLVM version
       *   - Switch to dev-lang/rust[system-llvm] which will guarantee matching version
       *   - Build www-client/firefox without USE=lto
       *   - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole
       *     llvm/clang/lld/rust chain depending on your @world updates)
       * ERROR: www-client/firefox-101.0.1::browser-kit failed (setup phase):
       *   LLVM version used by Rust (14) does not match with ld.lld version (13)!

      To mitigate this matching the compiler and linkers should fix this. This is partially compounded by the fact we autogen dev-lang/rust-bin and not LLVM, so rust-bin drifts ahead of our LLVM version as new versions of rust-bin are released.

      This is a request to track adding the latest LLVM 14 release to llvm-kit so rust-bin and LLVM are in sync and LTO compilations work for packages like firefox.

            Unassigned Unassigned
            siris siris
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: