Gentoo Archives: gentoo-user

From: Jeremi Piotrowski <jeremi.piotrowski@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Is there a reason why LLVM/Clang ebuilds don't support "mutislot"?
Date: Mon, 29 Aug 2016 07:26:41
Message-Id: 20160829072625.GA31106@gentoo-tp.home
In Reply to: [gentoo-user] Is there a reason why LLVM/Clang ebuilds don't support "mutislot"? by P Levine
1 On Sun, Aug 28, 2016 at 11:58:03PM -0400, P Levine wrote:
2 > Other distros like Ubuntu support the installation of multiple versions of
3 > LLVM/Clang side by side. One of the things Clang is really good at is
4 > support for the most recently approved upcoming features of the C++17
5 > standard. The best support for testing such features is with the latest
6 > sys-devel/llvm-9999. However if I want to compile Mesa against a stable
7 > version LLVM/Clang as well, I don't get that option.
8
9 I'm not sure such a configuration is fully supported upstream, but the way
10 ubuntu (and debian) does this is (was?) painfully broken. If I recall correctly
11 they first build it in one location and then move it around and try to
12 partially solve things through symlinks.
13
14 This totally destroys llvm-config and LLVM's cmake find_package module
15 meaning those things have hard-coded paths that have nothing to do with
16 where the things are installed on the system. Simple example, the
17 following CMakeLists.txt
18
19 cmake_minimum_required(VERSION 3.4)
20 project(llvm-test)
21
22 find_package(LLVM)
23
24 errors out on ubuntu with:
25
26 CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:178 (include):
27 include could not find load file:
28
29 /usr/share/llvm/cmake/LLVMExports.cmake
30 Call Stack (most recent call first):
31 CMakeLists.txt:4 (find_package)
32
33
34 CMake Error at /usr/share/llvm-3.8/cmake/LLVMConfig.cmake:181 (include):
35 include could not find load file:
36
37 /usr/share/llvm/cmake/LLVM-Config.cmake
38 Call Stack (most recent call first):
39 CMakeLists.txt:4 (find_package)
40
41
42 -- Configuring incomplete, errors occurred!
43
44 Fixing this one path leads to more suffering further down the road.
45
46 The way gentoo maintainers package LLVM is much saner and developer friendly.