Building GDC

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Oct 31 04:52:56 PDT 2013


On 31/10/13 12:36, Steve Teale wrote:
> On Thursday, 31 October 2013 at 10:45:05 UTC, Joseph Rushton Wakeling wrote:
>> On 31/10/13 11:31, Steve Teale wrote:
>>> so possibly the MPFR install put it in the wrong place. I will look for it.
>>> Where is the right place?
>>
>> What OS are you running?
>
> Ubuntu 12.04

Ahh, OK.  What GCC source are you attempting to build from?  I think that 4.7 
(which lacks multiarch support) is probably not worth building against any more. 
  I did try building against 4.7 from the deb-src package, ages ago, but I don't 
think I ever got it working.  I _did_ get it working from the source of the 
gcc-snapshot package, but I'd advise against that.

I've built successfully on a 12.04 install (a university cluster) using the 
4.8.1 sources (haven't updated it recently as I've been running everything on my 
local machine), downloaded directly from gcc.gnu.org; now, of course, you'll 
want 4.8.2, which should also work fine.

Supposing that you're using $SOMEDIR/gdc to store everything, a rough 
description of the procedure would be:

     * Clone GDC master into gdc/dev

     * Unzip the GCC source into gdc, which will give you a subdirectory
       called gcc-$VERSION (currently gcc-4.8.2)

     * cd into gdc/dev and run ./setup-gcc.sh ../gcc-4.8.2

     * cd back into gdc, create gdc/objdir, cd gdc/objdir

     * Run configure and make.

Here's how I like to run configure for a release build:

../gcc-4.8.2/configure --enable-languages=d --disable-multilib 
--enable-multiarch --enable-checking=release --prefix=/opt/gdc

You can miss off the --enable-multiarch -- which will also probably speed up 
your build time.

With this you shouldn't need to custom-set CPATH or LPATH.  Does it work for you?

Best wishes,

     -- Joe


More information about the D.gnu mailing list