Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434200 - sys-devel/llvm: multilib support
Summary: sys-devel/llvm: multilib support
Status: RESOLVED FIXED
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:
Depends on: 459072 477432 478816
Blocks: gx86-multilib 468102
  Show dependency tree
 
Reported: 2012-09-07 08:28 UTC by Michał Górny
Modified: 2013-08-03 16:33 UTC (History)
8 users (show)

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


Attachments
build.log (llvm-3.3-r1:20130719-153012.log.tar.gz,182.67 KB, application/gzip)
2013-07-19 16:39 UTC, Michael Mair-Keimberger (iamnr3)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-09-07 08:28:13 UTC
Matt has asked on the IRC if we could add multilib support to the llvm ebuild; i.e. building 32-bit version as well on amd64. If we did that, mesa would do the same benefiting multilib users who currently undergo breakage due to constantly outdated emul-linux packages.

The first thing that worries me about it is the compilation time. LLVM is complex enough to take long to compile even on my distcc. If we switched to multilib, the time would practically double. Consider the fact that sometimes 40 minutes vs 80 minutes is important enough to have to abort the compilation; and that the possibilities of random failure increase geometrically (like lack of free space in build dir, ICE of overheating and so on).

Thus, not having anything like dynamic SLOTs, I would rather go with maintaining two copies of the same ebuild (it's as simple as remembering about both!), possibly in a dedicated multilib category. What do you think?
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-06-02 16:28:19 UTC
Ok, since cmake build is unlikely to be useful anytime soon, I think we should proceed with hacking the existing ebuild.

My suggestion is to rename 32-bit llvm-config to llvm-config32 (or llvm-config-${ABI}?), and just modify mesa to use that. I believe introducing the whole wrapper magic for a single executable is not really worth it.

voyageur, what do you think?
Comment 2 Bernard Cafarelli gentoo-dev 2013-06-13 21:16:49 UTC
Sounds like a good plan! 3.3 (and probably later versions) will still use autotools, so if this works fine for multilib mesa, let's go for it
Comment 3 Thomas Sachau gentoo-dev 2013-06-15 13:03:43 UTC
(In reply to Michał Górny from comment #1)
> Ok, since cmake build is unlikely to be useful anytime soon, I think we
> should proceed with hacking the existing ebuild.
> 
> My suggestion is to rename 32-bit llvm-config to llvm-config32 (or
> llvm-config-${ABI}?), and just modify mesa to use that. I believe
> introducing the whole wrapper magic for a single executable is not really
> worth it.
> 
> voyageur, what do you think?

uhm, yet again?

Please stop making random changes to ebuilds forcing other ebuilds to be adjusted downstream to work with your custom changes.

We already have a working and long-term tested wrapper solution in the multilib-portage overlay, we even have a bash and a native version in there.

So please dont start again with random hacks (remember, that it failed for your random header hacks too?) and do it properly without requesting other packages to do manual additional changes, which cannot be sent upstream.

In short: use wrapper || dont do multilib for the binaries
Comment 4 Matt Turner gentoo-dev 2013-06-15 17:10:08 UTC
Don't start this again.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-12 16:54:38 UTC
There's an initial multilib version of llvm+clang in ::mgorny. It needs a lot of testing and probably some love wrt tests. I think they fail now for x86 but I spent too much time rebuilding LLVM today to address it :).

A few notes:

1. llvm-config is renamed to llvm-config.${ABI} for non-native ABIs,

2. with USE=test, full 32-bit llvm is built (but not installed). without uSE=test, only llvm libraries are built.

3. building clang libraries separately is broken, so full clang is always built for non-native ABIs.

4. i've removed the patches moving /usr/lib/clang to /usr/lib64/clang. it's a similar case to gcc, with the directory containing arch-agnostic headers and clang_rt libraries which are reused by both variants. yet, for some reason, clang seems to still be looking for it in /usr/lib64. patch appreciated.

Feedback and improvements for build process will be appreciated.
Comment 6 Michael Mair-Keimberger (iamnr3) 2013-07-18 20:05:21 UTC
I've tested your llvm ebuild in a virtual maschine with and without clang. (package details below). It builds fine :) Anything else i could test which might help you? If it helps i could also set up an x86 environment (vm) and try to build it with "test" enabled.


emerge -pv llvm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   *] sys-devel/llvm-9999-r1::mgorny  USE="libffi static-analyzer -clang* -debug -doc -gold -multitarget -ocaml -python {-test} -udis86 -vim-syntax" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 -pypy1_9 -pypy2_0 -python2_5 -python2_6" VIDEO_CARDS="-radeon" 0 kB
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-18 20:49:02 UTC
Thanks. It might be also useful to test with USE=debug since AFAICS that changes some paths within build tree and some random stuff like PaX marking may fail.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-18 21:54:16 UTC
I've just committed llvm-3.3-r1 and clang-3.3-r100 to my overlay. I'd appreciate testing that version more thoroughly and, if voyageur agrees, I'd like to commit it p.masked along with 9999-r1. Do you feel like I should backport the changes to older versions as well?
Comment 9 Michael Mair-Keimberger (iamnr3) 2013-07-19 16:39:53 UTC
Created attachment 353666 [details]
build.log

3.3-r1 fails to build with debug (and "test" enabled). I've attached the build.log.

USE="debug" emerge -pv1 =sys-devel/llvm-3.3-r1

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD~] sys-devel/llvm-3.3-r1::mgorny [9999-r1::mgorny] USE="debug* libffi static-analyzer {test} -clang* -doc -gold -multitarget -ocaml -python -udis86 -vim-syntax" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python2_7 -pypy1_9 -pypy2_0 -python2_5 -python2_6" VIDEO_CARDS="-radeon" 0 kB
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-19 17:57:55 UTC
(In reply to Michael Mair-Keimberger (iamnr3) from comment #9)
> Created attachment 353666 [details]
> build.log

Please don't upload .tar.gz.gz. A simple gzipped log would be enough, and unpacking such a thing is near to insane handwork (including guessing what's wrong with it).

And I'm afraid I can't really think about your issue right now. The current version may be semi-broken, and I'll start testing it over again when I fix all the issues so far.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-31 22:59:08 UTC
Fixed in -3.3-r1 and -9999.
Comment 12 Mike Lothian 2013-08-03 16:33:28 UTC
I've rebased mesa-9999-r51 against these ebuilds 

In my multilib llvm I had llvm-config-amd64 and llvm-config-x86 with llvm-config being a symlink to the native one

It would be great if you could use that behaviour again (event with the . rather than the -) as it makes it simpler to select the correct one in the ebuild