Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453788 - sys-devel/llvm & sys-devel/clang: dependency trouble for build subprojects of llvm
Summary: sys-devel/llvm & sys-devel/clang: dependency trouble for build subprojects of...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
: 426808 (view as bug list)
Depends on: 477432
Blocks:
  Show dependency tree
 
Reported: 2013-01-24 10:36 UTC by Oleg Ageev
Modified: 2013-07-31 22:59 UTC (History)
4 users (show)

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


Attachments
llvm cmake ebuilds & patches (llvm.tar.xz,5.98 KB, application/x-xz)
2013-07-23 15:47 UTC, Hristo Venev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Ageev 2013-01-24 10:36:16 UTC
LLVM & Co have one trouble for source based linux distributions like gentoo
For building LLVM we just build LLVM.
But for building  Clang we must again build LLVM, and then build Clang.
This'is not such big problem, if we're talking about these two package.
But even now if we want build debug versions, these rebuilding take pretty long time
And now if we want build subproject of LLVM like LLDB we must again build LLVM, and then build Clang, and now we can build LLDB.
Size of the folder which was used to build LLVM + Compiler_RT + Clang + LLDB + Test-Suite in debug configuration equals to:
$ du -hs build
10G     build
Who want to rebuild all it every time when need change USE flags?
Except LLDB still have Clang-Tools-Extra. and other subproject like Compiler_RT and may be more in future

Now for build clang must:
1) build LLVM two time
2) build Clang

if want build LLDB: LLVM 3 time, Clang two time
if make a separate package for compiller rt:
LLVM 4 time, Compiler RT 3 time and Clang 2 time
etc.

Sorry for my English.

Reproducible: Always

Steps to Reproduce:
1. USE=debug emerge clang
2. go to drink coffee


Expected Results:  
Several possible solutions to the problem:
1) use one big ebuild "llvm-pack" and with USE flags  choose what part of LLVM project need to build. this is not solve problem of rebuild all LLVM projects, but now this process happens every time we rebuild the Clang.
2) install the source files in /usr/src/llvm configure and builds there, and if need new llvm package, install them in subfolder of LLVM build system and rerun make without reconfiguration
3) may be other solutions to the problem?
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-02 21:37:08 UTC
Don't we actually use installed llvm in clang build? I think we did but something may have changed in the meantime.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-04 08:04:24 UTC
*** Bug 426808 has been marked as a duplicate of this bug. ***
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-11 09:18:47 UTC
I have committed a testing version of joined ebuild in ::mgorny. I'd appreciate some testing of it since I'm low on time and resources, and I haven't even tried building with USE=-clang.

I'll be happy to commit it and backport the change to older version(s) as soon as I get some test confirmations and voyageur's approval.
Comment 4 Hristo Venev 2013-07-22 12:41:46 UTC
For me, builddir/tools/clang didn't have a Makefile so make failed. I fixed it by changing the line 'emake -C tools/clang' to 'emake clang-only'

I'll try to add support for lldb.
Comment 5 Hristo Venev 2013-07-23 15:47:48 UTC
Created attachment 354028 [details]
llvm cmake ebuilds & patches

Switched to cmake and added lldb and lld. NOT TESTED!
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-23 15:59:40 UTC
(In reply to Hristo Venev from comment #5)
> Created attachment 354028 [details]
> llvm cmake ebuilds & patches
> 
> Switched to cmake and added lldb and lld. NOT TESTED!

See bug 456322 and related bugs :).
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-07-31 22:59:37 UTC
Basically fixed in -3.3-r1 and -9999 but may need readdressing at a wider scope.