Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471330 - sys-devel/llvm and sys-devel/clang should be SLOTted
Summary: sys-devel/llvm and sys-devel/clang should be SLOTted
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords: EBUILD, PATCH
: 545160 (view as bug list)
Depends on: 479998
Blocks:
  Show dependency tree
 
Reported: 2013-05-26 12:44 UTC by klemensbaum
Modified: 2015-04-16 14:10 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
add slots to sys-devel/llvm-2.8 (llvm-2.8-r2.ebuild.patch,4.52 KB, patch)
2013-05-26 12:45 UTC, klemensbaum
Details | Diff
add slots to sys-devel/llvm-2.9 (clang-2.9-r1.ebuild.patch,4.16 KB, patch)
2013-05-26 12:45 UTC, klemensbaum
Details | Diff
add slots to sys-devel/llvm-3.0 (llvm-3.0-r2.ebuild.patch,4.47 KB, patch)
2013-05-26 12:45 UTC, klemensbaum
Details | Diff
add slots to sys-devel/llvm-3.1 (llvm-3.1-r2.ebuild.patch,4.53 KB, patch)
2013-05-26 12:46 UTC, klemensbaum
Details | Diff
add slots to sys-devel/llvm-3.2 (llvm-3.2.ebuild.patch,4.65 KB, patch)
2013-05-26 12:46 UTC, klemensbaum
Details | Diff
add slots to sys-devel/clang-2.8 (clang-2.8-r3.ebuild.patch,4.17 KB, patch)
2013-05-26 12:47 UTC, klemensbaum
Details | Diff
add slots to sys-devel/clang-2.9 (clang-2.9-r1.ebuild.patch,4.16 KB, patch)
2013-05-26 12:47 UTC, klemensbaum
Details | Diff
add slots to sys-devel/clang-3.0 (clang-3.0-r4.ebuild.patch,4.45 KB, patch)
2013-05-26 12:47 UTC, klemensbaum
Details | Diff
add slots to sys-devel/clang-3.1 (clang-3.1-r5.ebuild.patch,4.20 KB, patch)
2013-05-26 12:47 UTC, klemensbaum
Details | Diff
add slots to sys-devel/clang-3.2 (clang-3.2.ebuild.patch,5.11 KB, patch)
2013-05-26 12:48 UTC, klemensbaum
Details | Diff
add slots to sys-devel/clang-9999 (clang-9999.ebuild.patch,5.44 KB, patch)
2013-05-26 12:48 UTC, klemensbaum
Details | Diff
add slots to sys-devel/llvm-2.9 (llvm-2.9-r2.ebuild.patch,4.47 KB, patch)
2013-05-26 12:49 UTC, klemensbaum
Details | Diff
add slots to sys-devel/llvm-9999 (llvm-9999.ebuild.patch,4.50 KB, patch)
2013-05-26 12:50 UTC, klemensbaum
Details | Diff
app-admin/eselect-llvm ebuild (eselect-llvm-0.1.ebuild,553 bytes, text/plain)
2013-05-26 12:51 UTC, klemensbaum
Details
app-admin/eselect-llvm eselect module (llvm.eselect-0.1,7.02 KB, text/plain)
2013-05-26 12:52 UTC, klemensbaum
Details
app-admin/eselect-clang ebuild (eselect-clang-0.1.ebuild,556 bytes, text/plain)
2013-05-26 12:52 UTC, klemensbaum
Details
app-admin/eselect-clang eselect module (clang.eselect-0.1,6.52 KB, text/plain)
2013-05-26 12:52 UTC, klemensbaum
Details
app-admin/eselect-llvm eselect module (llvm.eselect-0.1,7.01 KB, text/plain)
2013-05-27 13:33 UTC, klemensbaum
Details
[PATCH] sys-devel/{llvm,clang}: Add SLOT support (v2) (0001-sys-devel-llvm-clang-Add-SLOT-support.patch,125.35 KB, patch)
2013-07-15 19:43 UTC, klemensbaum
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description klemensbaum 2013-05-26 12:44:42 UTC
LLVM and Clang should be slottable because LLVM is used by Mesa and people might need specific versions of Clang for development, unrelated to the LLVM version required by Mesa.

I will attach some patches that attempt to make sys-devel/llvm and sys-devel/clang slottable.

There are also two new packages which will be used to manage the active LLVM and Clang versions:
* app-admin/eselect-llvm
* app-admin/eselect-clang

It would be nice if people could test this and see if anything breaks. Right now you will need to unmerge the packages from SLOT="0" before installing any slotted versions because the patched ebuilds hard block sys-devel/{llvm,clang}:0. I'm not sure if a revbump will help portage realize that it can solve the block by upgrading.

Some packages that depend on LLVM or Clang will probably also need their dependencies updated to specify a slot.
Comment 1 klemensbaum 2013-05-26 12:45:23 UTC
Created attachment 349238 [details, diff]
add slots to sys-devel/llvm-2.8
Comment 2 klemensbaum 2013-05-26 12:45:38 UTC
Created attachment 349240 [details, diff]
add slots to sys-devel/llvm-2.9
Comment 3 klemensbaum 2013-05-26 12:45:55 UTC
Created attachment 349242 [details, diff]
add slots to sys-devel/llvm-3.0
Comment 4 klemensbaum 2013-05-26 12:46:32 UTC
Created attachment 349244 [details, diff]
add slots to sys-devel/llvm-3.1
Comment 5 klemensbaum 2013-05-26 12:46:48 UTC
Created attachment 349246 [details, diff]
add slots to sys-devel/llvm-3.2
Comment 6 klemensbaum 2013-05-26 12:47:04 UTC
Created attachment 349248 [details, diff]
add slots to sys-devel/clang-2.8
Comment 7 klemensbaum 2013-05-26 12:47:17 UTC
Created attachment 349250 [details, diff]
add slots to sys-devel/clang-2.9
Comment 8 klemensbaum 2013-05-26 12:47:32 UTC
Created attachment 349252 [details, diff]
add slots to sys-devel/clang-3.0
Comment 9 klemensbaum 2013-05-26 12:47:47 UTC
Created attachment 349254 [details, diff]
add slots to sys-devel/clang-3.1
Comment 10 klemensbaum 2013-05-26 12:48:05 UTC
Created attachment 349256 [details, diff]
add slots to sys-devel/clang-3.2
Comment 11 klemensbaum 2013-05-26 12:48:20 UTC
Created attachment 349258 [details, diff]
add slots to sys-devel/clang-9999
Comment 12 klemensbaum 2013-05-26 12:49:45 UTC
Created attachment 349260 [details, diff]
add slots to sys-devel/llvm-2.9
Comment 13 klemensbaum 2013-05-26 12:50:08 UTC
Created attachment 349262 [details, diff]
add slots to sys-devel/llvm-9999
Comment 14 klemensbaum 2013-05-26 12:51:23 UTC
Created attachment 349264 [details]
app-admin/eselect-llvm ebuild
Comment 15 klemensbaum 2013-05-26 12:52:02 UTC
Created attachment 349266 [details]
app-admin/eselect-llvm eselect module
Comment 16 klemensbaum 2013-05-26 12:52:20 UTC
Created attachment 349268 [details]
app-admin/eselect-clang ebuild
Comment 17 klemensbaum 2013-05-26 12:52:34 UTC
Created attachment 349270 [details]
app-admin/eselect-clang eselect module
Comment 18 klemensbaum 2013-05-27 13:33:45 UTC
Created attachment 349348 [details]
app-admin/eselect-llvm eselect module
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-06-04 17:37:57 UTC
Did you test it? AFAICS mesa currently has trouble finding LLVM (it lacks -Wl,-rpath for some reason) and cmake doesn't install LLVM slotted like autotools do.

I'm not sure how useful is the slotting at all. If it works, I'm not sure for how long it will. And it's definitely not something upstream would support.
Comment 20 klemensbaum 2013-07-15 19:43:23 UTC
Created attachment 353392 [details, diff]
[PATCH] sys-devel/{llvm,clang}: Add SLOT support (v2)

Michał Górny: Would you mind taking a look at this new patch?
I'm currently using the radeon driver with live Mesa from the x11 overlay, and so far everything seems to be working fine.
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-15 21:33:22 UTC
We've talked a while on IRC and I'll now write a short summary of what I said so that it doesn't get lost in the chatter :).

First of all, thanks for your effort. I see that you are working hard to get this done nicely, and I really appreciate that.


Few notes now:

1. The most modern LLVM/clang ebuilds are in mgorny overlay right now. If we were to do this, we should start with those and see if it all fits nicely.

2. I don't think we're getting close to using CMake anytime soon but we should think about it as the future way of building LLVM & friends. Therefore, any solution that we undertake must not make switching to CMake much harder than it is without it. This especially involves the fact that CMake no longer uses 'llvm-X.Y' subdir of /usr/lib*, and that you'd need to modify the CMakefiles installed by LLVM and used by other projects.

3. I still think this is quite a custom thing, and not something that'd be supported upstream. We must be sure that maintaining it wouldn't cause a lot of unnecessary maintenance burden in the future, especially if we are to add future projects using LLVM which can require many fixes to get it all right.

4. To be honest, I hate eselect. I see a lot of added complexity here, including all the ebuild logic to get files split, eselect logic to support switching it all and ebuild/eclass logic to handle multiple LLVM slots somehow from other packages. Think of Boost and how it ended up...


I think that're all the important points. Considering them all, the added complexity, the fact that it requires diverging from upstream and I feel like it will be actually used only by a few users, my opinion is not to proceed now. But that's just my opinion, and @voyageur has the last word.

If we're to proceed, then we could sync this with the multilib ebuilds being committed to avoid requesting people to rebuild stuff twice. However, this will undoubtedly delay the multilib ebuilds a bit.

If we're not to proceed, we can always revisit this later. Either when more users request it, or upstream makes this easier on us. In any case, I'd really appreciate if you could take at least part of this upstream and see what they think. I'd really like to know what are the odds, and if they could do something to make this easier.

At the end, yet another random idea: can we use different --prefix to make this simpler? Something like installing the whole tree to /usr/lib/llvm-X.Y/{bin,lib*,share,...}, eselect just setting PATH and ld.so.conf paths, and llvm-config --prefix giving the right prefix. But that's just a random thought which needs a lot of work.
Comment 22 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-30 09:56:21 UTC
I doubt that we can actually cleanly support that. Using subdirectories for LLVM libraries has caused too much trouble so far (like broken parts of mesa).
Comment 23 Bernard Cafarelli gentoo-dev 2015-04-16 14:10:16 UTC
*** Bug 545160 has been marked as a duplicate of this bug. ***