You are not logged in.

#1 2021-02-04 23:00:19

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Installing LLVM 11 and LLVM 12 together

Not sure if this is the right place to ask this question.
I have been using the mesa-git drivers recently since it avoids a lot of my graphics card problems.
It requires LLVM 12 which is fine for most applications i use.
I have recently started to use blender it requires the LLVM 11 libs.
This is the dilemma I can't seem to find a way to install LLVM 11 libs along with LLVM 12.
There is already a package on the aur for LLVM 11 libs but its not built in a way that allows it to work with LLVM 12 also being installed.
I have tried manually installing the LLVM 11 libs by extracting the package from the main repo and only installing the files marked as *-11.so
But this causes blender to core dump install of giving a missing lib error.

What is the best way to install LLVM 11 libs along with LLVM 12 or is there a way to compile blender to work with LLVM 12.

Offline

#2 2021-02-04 23:46:31

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: Installing LLVM 11 and LLVM 12 together

Have you tried compiling openshadinglanguage then blender with llvm 12?

Offline

#3 2021-02-05 10:47:23

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Installing LLVM 11 and LLVM 12 together

There are atleast 3 llvm trunk packages and 3 mesa trunk packages for archlinux .

One of the mesa trunk packages allows choosing between those 3 llvm trunk packages AND with repo llvm.
2 of those llvm variants can coexist with llvm-libs from repo , the 3rd one can't .
Only one of the llvm variants can coexist with repo clang .

Also blender doesn't have a direct dependency on llvm or parts, but openshadinglanguage does depend on clang.
Building openshadinglanguage against your llvm trunk , then building blender against those is one option as loqs suggests is one possible solution .

There may be other solutions, but more info is needed.
Which mesa trunk / llvm packages are you using ?


[1] aur llvm-minimal-git , aur llvm-git , llvm-git from lordheavys repo
[2] aur mesa-git , aur mesa-minimal-git , mesa-git from lordheavys repo


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2021-02-05 13:50:07

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Re: Installing LLVM 11 and LLVM 12 together

I'm using the chaotic aur. So im pretty sure im using llvm-git aur and mesa-git aur.

Seems to be there is some issue with openshadinglanguage which stops it from building on llvm 12.
../src/liboslexec/llvm_util.cpp:645:39: error: no matching function for call to ‘llvm::DebugLoc::get(unsigned int, unsigned int, llvm::DIScope*)’

Offline

#5 2021-02-05 13:52:21

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Re: Installing LLVM 11 and LLVM 12 together

local/clang-git 12.0.0_r377014.c23e34e606bf-1 (chaotic-mesa-git)
    C language family frontend for LLVM (git version)
local/lib32-llvm-git 12.0.0_r377014.c23e34e606bf-1 (chaotic-mesa-git)
    Low Level Virtual Machine (32-bit)(git version)
local/lib32-llvm-libs-git 12.0.0_r377014.c23e34e606bf-1 (chaotic-mesa-git)
    Low Level Virtual Machine library (runtime library)(32-bit)(git version)
local/lib32-mesa-git 1:21.1.0_devel.134448.470d3a3640e-1 (chaotic-mesa-git)
    an open-source implementation of the OpenGL specification (32-bit) (git version)
local/lib32-vulkan-mesa-layers-git 1:21.1.0_devel.134448.470d3a3640e-1 (chaotic-mesa-git)
    Mesa's Vulkan overlay layers (32-bit) (git version)
local/lib32-vulkan-radeon-git 1:21.1.0_devel.134448.470d3a3640e-1 (chaotic-mesa-git)
    Radeon's Vulkan mesa driver (32-bit) (git version)
local/llvm-git 12.0.0_r377014.c23e34e606bf-1 (chaotic-mesa-git)
    Collection of modular and reusable compiler and toolchain technologies (git version)
local/llvm-libs-git 12.0.0_r377014.c23e34e606bf-1 (chaotic-mesa-git)
    LLVM runtime libraries (git version)
local/mesa-git 1:21.1.0_devel.134448.470d3a3640e-1 (chaotic-mesa-git)
    an open-source implementation of the OpenGL specification (git version)
local/polly-git 12.0.0_r377014.c23e34e606bf-1 (chaotic-mesa-git)
    Polly is a high-level loop and data-locality optimizer and optimization infrastructure for LLVM
local/vulkan-mesa-layers-git 1:21.1.0_devel.134448.470d3a3640e-1 (chaotic-mesa-git)
    Mesa's Vulkan overlay layers (git version)
local/vulkan-radeon-git 1:21.1.0_devel.134448.470d3a3640e-1 (chaotic-mesa-git)
    Radeon's Vulkan mesa driver (git version)

Offline

#6 2021-02-05 17:36:44

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Installing LLVM 11 and LLVM 12 together

Neither aur llvm-git or aur llvm-minimal-git have a clang-git / clang-minimal-git subpackage,.
aur mesa-git and aur mes-a-minimal also don't have a vulkan-radeon-git subpackage.

LordHeavys mesa-git repo at https://pkgbuild.com/~lcarlier/mesa-git/x86_64/ does have clang-git , vulkan-mesa-layers-git and vulkan-radeon-git but not polly-git .

Chaotic-aur repo at https://builds.garudalinux.org/repos/ch … ur/x86_64/ does have all those packages .

I have no idea what PKGBUILDs chaotic-aur currently uses for mesa-git / llvm-git , you'll have to ask the maintainers.

Going to try to build openshadinglanguage against latest llvm 13 (upstream branched of 12 as next stable versions and development version is now 13) .

ADDED :

same build error as Duck-tective .

pacman -Qi clang-git should help to clarify what on your system needs clang-git .

Maybe it's something you can do without so you can install clang from repo .

Last edited by Lone_Wolf (2021-02-05 17:48:13)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2021-02-05 19:17:46

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Re: Installing LLVM 11 and LLVM 12 together

Name            : clang-git
Version         : 12.0.0_r377014.c23e34e606bf-1
Description     : C language family frontend for LLVM (git version)
Architecture    : x86_64
URL             : http://clang.llvm.org/
Licenses        : custom:Apache 2.0 with LLVM Exception
Groups          : chaotic-mesa-git
Provides        : clang  clang-analyzer  clang-tools-extra
Depends On      : llvm-git=12.0.0_r377014.c23e34e606bf-1  gcc  python  python2
Optional Deps   : llvm-libs: for compiling with -flto [installed]
Required By     : clazy  lldb
Optional For    : kate  proton-tkg-git  qt5-tools
Conflicts With  : clang  clang-svn  clang-analyzer  clang-tools-extra  clang-tools-extra-svn
Replaces        : clang-svn  clang-analyzer-svn  clang-tools-extra-svn  clang
Installed Size  : 659.40 MiB
Packager        : Pedro Henrique Lara Campos <root@pedrohlc.com>
Build Date      : Thu 14 Jan 2021 14:20:49 GMT
Install Date    : Fri 05 Feb 2021 19:11:58 GMT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

If i download clang from normal arch repos and try and build openshadinglanguage it fails because it doesn't have the llvm 11 libs.
Wasn't sure if that's what you were asking me to do.

Glad your getting the same error as well on build. I'm always worried I'm missing some hidden dependency.

Are you suggesting it would be better to install mesa-git from a different repo?
Honestly don't mind what i have installed as long as i have mesa-git and blender working haha.

Offline

#8 2021-02-05 19:42:56

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Re: Installing LLVM 11 and LLVM 12 together

Seems to be that function openshadinglanguage is using was deprecated and remove as of llvm12.
https://github.com/llvm/llvm-project/co … fccd0f6524

Offline

#9 2021-02-05 20:48:40

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: Installing LLVM 11 and LLVM 12 together

Duck-tective have you tried patching openshadinglanguage for the missing function?

Offline

#10 2021-02-05 21:49:10

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Re: Installing LLVM 11 and LLVM 12 together

Try that out right now. just wrote a patch there and compiled it successfully. will most likely submit it to openshadinglanguage git.
Now having troubles with compiling blender.
The joys haha.

Offline

#11 2021-02-05 22:24:31

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Re: Installing LLVM 11 and LLVM 12 together

Aright managed to get blender running.
You don't need to recompile blender just openshadinglanguage.
Will submit a patch to openshadinglanguage git. it should be backwards compatible with llvm11.
I now need to go clean up my system. the unholy things i did to pacman to try different dependency combinations.
Biggest plus of them all though is blender no longer crashes my graphics card hahaha.

Offline

#12 2021-02-06 12:46:27

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: Installing LLVM 11 and LLVM 12 together

Duck-tective wrote:

Are you suggesting it would be better to install mesa-git from a different repo?
Honestly don't mind what i have installed as long as i have mesa-git and blender working haha.

Using something from any binary repository comes down to whether you trust its maintainers.
For the official repos we all put our trust in archlinux devs, TUs , devops people etc .

If you use things from other repos you are putting trust in the people that maintain them.
Even if they publish the PKGBUILDS they use for building binaries , you have to trust them they DO use those PKGBUILDS for building.

chaotic-aur repo is huge[1] and has packages that come from other sources then AUR, they also make changes to 'broken' aur packages [2] .
Their packages clearly work for you, do you trust its maintainers ?
If yes, there's no need to switch to another repo or build things yourselves.


Back to topic of having multiple llvm/clang suites installed.

On archlinux there's no mechanism to fully support that.
The closest we have to it is runtime support through different llvm-libs versions.
Unfortunately that's very limited and it offers no support at all for multiple clang versions.


Required By     : clazy  lldb
Optional For    : kate  proton-tkg-git  qt5-tools

clazy , lldb, kate and qt5-tools are likely from offical repos and expect repo clang to be present.
They will probably fail when trying to use clang-git instead.

If you do need them to use clang (like for developing software meant to be compiled with llvm/clang) , you need to rebuilt them against clang-git .

I don't know proton-tkg-git , but it doesn't appear to come from chaotic-aur binary repo .
Did you build it yourself or does it come from another binary repo ?


[1] https://builds.garudalinux.org/repos/ch … ur/x86_64/
[2] https://github.com/chaotic-aur/interfere


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#13 2021-02-06 15:43:59

Duck-tective
Member
Registered: 2014-12-29
Posts: 14

Re: Installing LLVM 11 and LLVM 12 together

Thanks lone_wolf
Yeah wouldn't necessarily say i trust all these packages. I usually try and stick with the main repo.
I only result to git packages usually though the aur when its not available on the main repo or I encounter bugs in this case.
e.g. using mesa-git because current mesa crashes my graphics card when playing a lot of games or using blender.
I was also using the chaotic-aur because they built a patched version of the kernel i used but i custom compile that anyway now so i will probably remove it.

Hopefully can switch back to normal mesa and llvm+clang once mesa has officially released the new version.

proton-tkg-git i think i built that my self honestly can't remember.
my arch system is pretty bloated right now i have 2476 packages installed.
its become a bit unmanageable. need to find something that graphs all my packages so i can figure out what to uninstall haha.

Thanks for explaining all that to me though. going to be a little more careful in the future about swapping out core dependencies.

In case anyone is curious here is my pull request to openshaderlanguage
https://github.com/AcademySoftwareFound … /pull/1331
Hopefully it will make the package maintainer jobs easier once arch updates to llvm 12

Offline

Board footer

Powered by FluxBB