February 21, 2009

Quest for gdc in gentoo

by orzel
Categories: Admin, Gentoo
Tags:
Comments: Leave a Comment

It took me quite some time (and some grep) to find out how to install gdc on gentoo, so here is the answer for those facing the same problem.

gdc is a gcc font-end for the D language, which has some advantages over other ones like dmd, but don’t ask which. (something like ‘support for 64-bit’).

If you google for it, you will either find an old bug (2004) with some gdc ebuilds, or some people telling you that it’s enough to emerge gcc with the ‘d’ USE flag. Fair enough : I try, and it fails.

The reason is that without telling you, this will only work with gcc-4.1.2, I don’t why. Anyway, the following did manage to install it:

USE=”d” emerge -vta =sys-devel/gcc-4.1.2

Even this way, the build fails with some error mentionning ‘D’ and some gcc 4.3.3 symbols (4.3.3 is my current gcc). The real solution was to FIRST emerge gcc-4.1.2 without D support, and then again with D support.

Update: moreover, once installed, you cannot switch back (using gcc-config) gcc4.3.3, as ‘gdc’ will not be available at the command line anymore. As a conclusion, I’m happy not to program in D seeing the very bad support from Gentoo 🙁


Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA image
*