Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Split GCC Ebuilds
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
igds
n00b
n00b


Joined: 04 Aug 2004
Posts: 39

PostPosted: Wed Jan 31, 2007 6:21 am    Post subject: Split GCC Ebuilds Reply with quote

I have just encountered a situation where I am forced to recompile GCC (with the 'gcj' flag) not only so that I can compile a program:
Code:
 * It seems that your system doesn't provides a Java compiler.
 * Re-emerge sys-devel/gcc with "gcj" enabled.

!!! ERROR: app-text/pdftk-1.12 failed.
Call stack:
  ebuild.sh, line 1562:   Called dyn_setup
  ebuild.sh, line 665:   Called pkg_setup
  pdftk-1.12.ebuild, line 23:   Called die

!!! gcj not found.
!!! If you need support, post the topmost build error, and the call stack if relevant.

but so that I can run the program even if I get a precompiled binary:
Code:
pdftk: error while loading shared libraries: libgcj.so.4: cannot open shared object file: No such file or directory


This seems to me to be a little excessive. I note that other distributions (my friend runs Slackware) supply GCC as the C compiler, only, supplemented by others, as:
Code:
/var/log/packages/gcc-3.4.6-i486-1
/var/log/packages/gcc-g++-3.4.6-i486-1
/var/log/packages/gcc-g77-3.4.6-i486-1
/var/log/packages/gcc-gnat-3.4.6-i486-1
/var/log/packages/gcc-java-3.4.6-i486-1
/var/log/packages/gcc-objc-3.4.6-i486-1

It recalls to my mind the split KDE ebuilds, where 'gcc' might be analogous to 'kdelibs' and all the other 'gcc-*' packages to the individual KDE programs.

Might I inquire as to whether there is some strong necessity to lump all these compilers into one large package rather than separate, smaller ones that depend on the base gcc compiler?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Wed Jan 31, 2007 5:54 pm    Post subject: Reply with quote

I think I saw this same topic debated somewhere before, and I also think it is a good idea. But it is not a trivial matter.

I think that the problem is at the build stage. I mean, gcc has a not so modular design. This makes almost impossible to separate parts of the source without a very hard work, work that will be also prone to inserting new bugs. Once you have the binaries built, you can pack the core on a given package like gcc-3.4.6-i486-1 , and then package the language specific binaries into a few other packages. In a binary distro that is easier, but the point it that in Gentoo it will not have any real benefit, because to get those few files that gets into each of the packages you would have to recompile the whole gcc for each of those packages.

I an no expert on the gcc sources, so maybe I am totally wrong, but I don't think that this is doable at the current stage of gcc on a distro like Gentoo.
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Wed Jan 31, 2007 6:20 pm    Post subject: Reply with quote

Interesting idea. Note that you can achieve more or less the same effect with USE flags ($ equery uses gcc).
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Wed Jan 31, 2007 6:58 pm    Post subject: Reply with quote

Yes, it is far easier with use flags, because that way you just compile it all one time, but only the relevant binaries get built and installed.
Back to top
View user's profile Send private message
igds
n00b
n00b


Joined: 04 Aug 2004
Posts: 39

PostPosted: Thu Feb 01, 2007 8:01 am    Post subject: Reply with quote

dmitchell wrote:
Note that you can achieve more or less the same effect with USE flags ($ equery uses gcc).
6thpink wrote:
Yes, it is far easier with use flags, because that way you just compile it all one time, but only the relevant binaries get built and installed.

My point was that it would be nice to be able to build the INDIVIDUAL compilers ONLY WHEN THEY BECOME NEEDED. As I alluded to before, I had to rebuild the C compiler and the C++ compiler and whatever other compilers I already had installed and working just so I could build and install the gcj Java compiler. This strikes me as a waste of time and energy.

6thpink wrote:
I think that the problem is at the build stage. I mean, gcc has a not so modular design. This makes almost impossible to separate parts of the source without a very hard work[. . . . B]ecause to get those few files that gets into each of the packages you would have to recompile the whole gcc for each of those packages.

I do not quite understand why all the compilers would have to be built at the same time together. I imagine that one would first build the C compiler, then use that to build the C++ compiler and/or the gcj compiler, or else use the C++ compiler to compile the gcj compiler, or whatever. Therefore the 'gcc' ebuild would install just the C compiler, and the 'g++' ebuild would depend on 'gcc,' and so on.

If someone could explain, in certain terms, why it does not work this way, I would be much obliged for the enlightenment.


Oh -- I tried searching for this very topic on the forums, but I came up with nothing. Does anyone have any idea where the previous discussion might be found?


P.S.

According to my Slackware friend, the issue is that GCC's build system is not designed to be told that it can trust the C compiler on the OS trying to build its other compilers, even if the user knows that said compiler has already passed the safety precautions proving that it will work (since, on Gentoo, it must have already been built successfully) and that it is suitable for compiling other compilers (since Portage will keep an eye on the versions involved, and the ebuild should include a check to see what version of GCC is being used). There are probably other reasons as well.

In any case, it looks like something that the GCC Project has control over rather than being a simple ebuilds issue on Gentoo.
Back to top
View user's profile Send private message
DOSBoy
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2005
Posts: 84

PostPosted: Tue Nov 27, 2007 5:41 pm    Post subject: Reply with quote

I hate to bump an ancient thread but this is something that I've recently become interested in while playing musical OS. Source Mage GNU/Linux has split gcc packages. I'm not sure of the details but it appears that split ebuilds are technically possible.

I'm no toolchain guru, so could someone explain what the --disable-bootstrap option for gcc's configure script does and if it's useful for this goal?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum