Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I get rid of LLVM?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 367

PostPosted: Wed Dec 18, 2024 12:05 pm    Post subject: How do I get rid of LLVM? Reply with quote

Hi.
Finally llvm-related software became the most bloated part of the system (apart from qt). As far as I understand llvm is just a kind of frontend to compilers, so I wondering, is it possible to get rid of this bloatware?
If there is useful info about it, please share
Thanks
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22841

PostPosted: Wed Dec 18, 2024 12:13 pm    Post subject: Reply with quote

You can remove it just like anything else: emerge --ask --verbose --depclean sys-devel/llvm. If it is on your system, this will probably fail with a message about some package that needs it. Add that package to the depclean list and retry. Keep growing the list until either you find a package you're not willing to remove, or you get a successful run. In some cases, packages conditionally need it based on a USE flag. If that is your situation, disabling the USE flag (and rebuilding the affected package) may let you remove LLVM without removing the consuming package. This depends on whether the USE flag controls a feature you are not willing to remove.

My guess is that you will fail, as most modern graphical desktops want Mesa, and Mesa wants LLVM, at least in the common configurations. However, some less common configurations, and anything that can remove Mesa, may not be blocked here.
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 367

PostPosted: Wed Dec 18, 2024 1:43 pm    Post subject: Reply with quote

Thanks ofr reply!

Code:
emerge --ask --verbose --depclean llvm

Calculating dependencies... done!
  llvm-core/llvm-18.1.8-r1 pulled in by:
    dev-util/intel_clc-24.2.8 requires llvm-core/llvm:18/18.1=, llvm-core/llvm:18=
    dev-util/spirv-llvm-translator-18.1.4 requires llvm-core/llvm:18/18.1=[abi_x86_64(-)], llvm-core/llvm:18=[abi_x86_64(-)]
    llvm-core/clang-18.1.8 requires ~llvm-core/llvm-18.1.8[llvm_targets_AMDGPU], ~llvm-core/llvm-18.1.8[llvm_targets_LoongArch], ~llvm-core/llvm-18.1.8[llvm_targets_Lanai], ~llvm-core/llvm-18.1.8[llvm_targets_MSP430], ~llvm-core/llvm-18.1.8[llvm_targets_ARM], ~llvm-core/llvm-18.1.8[llvm_targets_AVR], ~llvm-core/llvm-18.1.8[llvm_targets_WebAssembly], ~llvm-core/llvm-18.1.8[llvm_targets_Sparc], ~llvm-core/llvm-18.1.8[llvm_targets_Mips], ~llvm-core/llvm-18.1.8[llvm_targets_XCore], ~llvm-core/llvm-18.1.8[llvm_targets_NVPTX], ~llvm-core/llvm-18.1.8[llvm_targets_SystemZ], ~llvm-core/llvm-18.1.8[llvm_targets_AArch64], ~llvm-core/llvm-18.1.8:18/18.1=[-debug,abi_x86_64(-)], ~llvm-core/llvm-18.1.8[llvm_targets_PowerPC], ~llvm-core/llvm-18.1.8[llvm_targets_Hexagon], ~llvm-core/llvm-18.1.8[llvm_targets_X86], ~llvm-core/llvm-18.1.8[llvm_targets_RISCV], ~llvm-core/llvm-18.1.8[llvm_targets_BPF], ~llvm-core/llvm-18.1.8[llvm_targets_VE]
    llvm-core/llvm-toolchain-symlinks-18-r1 requires llvm-core/llvm:18
    llvm-core/llvmgold-18 requires llvm-core/llvm:18[binutils-plugin]
    media-libs/mesa-24.2.8 requires llvm-core/llvm:18[llvm_targets_AMDGPU(+),abi_x86_64(-)]


Code:
emerge --ask --verbose --depclean dev-util/intel_clc

Calculating dependencies... done!
  dev-util/intel_clc-24.2.8 pulled in by:
    media-libs/mesa-24.2.8 requires ~dev-util/intel_clc-24.2.8



It seems only mesa depends on llvm . I removed mesa (built from sources) and installed it from binhost, and the same for intel_clc, but emerge --depclean still says that llvm is still required by mesa/intel_clc. Why binary packages requires compilers?
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22841

PostPosted: Wed Dec 18, 2024 2:24 pm    Post subject: Reply with quote

LLVM is not just a compiler. Look at the list of libraries it installs. Even if it were only a compiler, if your depclean has --with-bdeps=y, then Portage would retain packages that you would need if you chose to rebuild Mesa from source.
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 367

PostPosted: Wed Dec 18, 2024 4:17 pm    Post subject: Reply with quote

At least switching to binary mesa prevented two new huge packages from being pulled in: llvm-runtimes/compiler-rt and llvm-runtimes/compiler-rt-sanitizers.
Not bad.
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6173
Location: Dallas area

PostPosted: Wed Dec 18, 2024 4:22 pm    Post subject: Reply with quote

a whole 57 meg ... impressive.
_________________
UM780, 6.1 zen kernel, gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Blind_Sniper
Guru
Guru


Joined: 20 Apr 2018
Posts: 367

PostPosted: Wed Dec 18, 2024 4:58 pm    Post subject: Reply with quote

Anon-E-moose wrote:
a whole 57 meg ... impressive.


137 Mb, and a lot of time...
_________________
GNU is Not Usable
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum