July 05, 2013
On Fri, Jul 05, 2013 at 06:35:20PM +0200, Joseph Rushton Wakeling wrote: [...]
> I'll describe exactly what I do.
> 
> Let's suppose that we have a directory called $(GDCDIR) that holds
> everything.
> 
> In $(GDCDIR)/dev I have my local copy of the GDC git repo.  This is GDC master, not any of the 4.x branches.
> 
> In $(GDCDIR)/gcc-4.8.1 I have the GCC sources.  This is just the .tar.gz download from one of the GCC mirrors, unzipped.
> 
> Then:
> 
>     cd $(GDCDIR)/dev
>     ./setup-gcc.sh ../gcc-4.8.1
>     mkdir ../objdir
>     cd ../objdir
>     ../gcc-4.8.1/configure --enable-languages=d --disable-multilib
> --enable-checking=release --prefix=/opt/gdc
>     make   [ with -j for as many processors as you can spare, it helps! ]

Thanks so much for posting the exact steps! I finally got around to retrying to build GDC with GCC-4.8. Using your steps above, it worked!!!

There was no trouble at all, except for an initial hiccup of having to install libmpc-dev (but the configure script was pretty good about stating exactly what is missing). The build went smoothly. To the above steps, I'd only add 'make install' as the final step. :)


> I think this matches pretty closely the general installation instructions: http://www.gdcproject.org/wiki/Installation/General
> 
> It's no longer necessary to bother with the hassle of getting Debian/Ubuntu GCC sources, as from 4.8 on GCC supports multiarch. This also saves the hassle of having to patch the Debian sources.

I think the fact that gcc-4.8 supports multiarch without needing to setup the Debian sources (with the associated patching, etc.), made things MUCH simpler and less error-prone than before.

> With the above done, if I pull in any updates from GDC master, I can rebuild as follows:
> 
>     cd $(GDCDIR)/dev
>     ./setup-gcc.sh --update ../gcc-4.8.1
>     cd ../objdir
>     make    [ still use -j as many processors as you can :-) ]

Thanks, this will come in handy when I need to update GDC.


> I should add that I arrived at this simple process substantially thanks to a good deal of coaching and education from Iain, without whom GCC would have defeated me :-)
[...]

Well, I have to thank you for posting these steps. I have given up building GDC for a long time until I tried it again today with your instructions. And it worked!


T

-- 
Why ask rhetorical questions? -- JC
July 05, 2013
On Fri, Jul 05, 2013 at 07:59:59PM +0200, Joseph Rushton Wakeling wrote:
> On 07/05/2013 07:12 PM, Iain Buclaw wrote:
> > On the note of that, is there anyone willing to take the keys for gdmd? :-)
> 
> Honestly, I'm not sure I'd know how to handle it.  I don't know Perl and the kind of D programming that would be involved in re-implementing it in D is not what I'm used to.

I know Perl quite well, though I'm somewhat rusty from not having used it very much in the recent years. I'm willing to help if you have Perl questions. :)


> I did think of writing a configure script to allow the user to tweak a few defaults (like the install prefix) but that actually seems overkill for something so simple.
> 
> Is there anything that actually needs to be done apart from D-ifying it?

Wait, we're trying to D-ify gdmd?


T

-- 
I'm still trying to find a pun for "punishment"...
July 05, 2013
On 07/05/2013 08:03 PM, H. S. Teoh wrote:
> Wait, we're trying to D-ify gdmd?

It was a suggestion of Iain's when he forked it off into a separate repo.  Seems like a good idea -- demonstrates D's capabilities, probably makes it easier to maintain, could make it easier to place back in the main project if/when the frontend gets rewritten in D.

July 05, 2013
On 07/05/2013 08:02 PM, H. S. Teoh wrote:
> Thanks so much for posting the exact steps! I finally got around to retrying to build GDC with GCC-4.8. Using your steps above, it worked!!!

Fantastic!  So glad it finally worked for you.

> There was no trouble at all, except for an initial hiccup of having to install libmpc-dev (but the configure script was pretty good about stating exactly what is missing). The build went smoothly. To the above steps, I'd only add 'make install' as the final step. :)

Yes, I think there are one or two dependencies not mentioned on the GDC wiki which I discovered when first trying to build it.  There's certainly an unmentioned package which is needed for the test suite.

One of these days I'll have to set up a fresh system and try a build on it just to document what they are.

> I think the fact that gcc-4.8 supports multiarch without needing to setup the Debian sources (with the associated patching, etc.), made things MUCH simpler and less error-prone than before.

Yes, though once I discovered the trick of using gcc-snapshot (bad idea, but it worked:-) I never had any problems patching the sources.  It was just an annoyance to have to do it.

>> With the above done, if I pull in any updates from GDC master, I can rebuild as follows:
>>
>>     cd $(GDCDIR)/dev
>>     ./setup-gcc.sh --update ../gcc-4.8.1
>>     cd ../objdir
>>     make    [ still use -j as many processors as you can :-) ]
> 
> Thanks, this will come in handy when I need to update GDC.

Thank Iain, who told me about it :-)  Before that, I'd actually been deleting and re-unzipping the whole gcc-4.8.1 directory, meaning a complete rebuild every time.  Rebuilding GDC has recently become much quicker for me ... :-)

> Well, I have to thank you for posting these steps. I have given up building GDC for a long time until I tried it again today with your instructions. And it worked!

I know exactly the feeling, I also had a long period of thinking I'd never get it working.  I'm very happy these instructions were useful to you -- and I have to in turn thank the various people who helped me back then :-)
July 05, 2013
On Fri, Jul 05, 2013 at 08:22:54PM +0200, Joseph Rushton Wakeling wrote:
> On 07/05/2013 08:02 PM, H. S. Teoh wrote:
> > Thanks so much for posting the exact steps! I finally got around to retrying to build GDC with GCC-4.8. Using your steps above, it worked!!!
> 
> Fantastic!  So glad it finally worked for you.
> 
> > There was no trouble at all, except for an initial hiccup of having to install libmpc-dev (but the configure script was pretty good about stating exactly what is missing). The build went smoothly. To the above steps, I'd only add 'make install' as the final step. :)
> 
> Yes, I think there are one or two dependencies not mentioned on the GDC wiki which I discovered when first trying to build it.  There's certainly an unmentioned package which is needed for the test suite.

I think libmpc-dev is mentioned on the wiki as a prerequisite (well, libmpc is, but hopefully Debian users know to install the -dev packages as well).


> One of these days I'll have to set up a fresh system and try a build on it just to document what they are.

Good idea. It should be relatively easy to setup a chroot for this purpose, if you don't want to go all-out to have a brand new system. IIRC it's just a matter of installing and running debootstrap to create a bare-minimum system in a subdir, which you can then chroot into and install the necessary packages.


> > I think the fact that gcc-4.8 supports multiarch without needing to setup the Debian sources (with the associated patching, etc.), made things MUCH simpler and less error-prone than before.
> 
> Yes, though once I discovered the trick of using gcc-snapshot (bad idea, but it worked:-) I never had any problems patching the sources. It was just an annoyance to have to do it.

Well, for me it may have been the breaking factor. :-P  I suspect, anyway. I never bothered to look deeper to find out what was breaking. And now that gcc-4.8 is working, I'm not going back to figure out why it didn't work before!


> >> With the above done, if I pull in any updates from GDC master, I can rebuild as follows:
> >>
> >>     cd $(GDCDIR)/dev
> >>     ./setup-gcc.sh --update ../gcc-4.8.1
> >>     cd ../objdir
> >>     make    [ still use -j as many processors as you can :-) ]
> > 
> > Thanks, this will come in handy when I need to update GDC.
> 
> Thank Iain, who told me about it :-)  Before that, I'd actually been deleting and re-unzipping the whole gcc-4.8.1 directory, meaning a complete rebuild every time.  Rebuilding GDC has recently become much quicker for me ... :-)
> 
> > Well, I have to thank you for posting these steps. I have given up building GDC for a long time until I tried it again today with your instructions. And it worked!
> 
> I know exactly the feeling, I also had a long period of thinking I'd never get it working.  I'm very happy these instructions were useful to you -- and I have to in turn thank the various people who helped me back then :-)

Well, now that I've successfully built gdc-4.8, I'm wondering if I should work on getting it into the Debian repo? Or is somebody already working on that? Iain?

(I realize it may not be quite as smooth as building from upstream gcc-4.8, since I'll need to apply Debian-specific patches, etc., but at least I have a working baseline to compare with when something goes wrong, as opposed to completely shooting in the dark.)


T

-- 
Obviously, some things aren't very obvious.
July 05, 2013
On 5 July 2013 19:32, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
>
> Well, now that I've successfully built gdc-4.8, I'm wondering if I should work on getting it into the Debian repo? Or is somebody already working on that? Iain?
>

1. Congrats, the first time building gcc is always the hardest. :o)

2. You are at least a month behind on that.
  a. gdc has been merged in with the gcc source package in Debian.
  b. 4.8 is in unstable (based off 2.062 though).
  c. I have been receiving lots of emails from the debbuilder about
gdc building status on all of debian's arch's, and success/failures in
the testsuite / unittester.  :o)




--
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
July 05, 2013
On Fri, Jul 05, 2013 at 10:04:08PM +0100, Iain Buclaw wrote:
> On 5 July 2013 19:32, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> >
> > Well, now that I've successfully built gdc-4.8, I'm wondering if I should work on getting it into the Debian repo? Or is somebody already working on that? Iain?
> >
> 
> 1. Congrats, the first time building gcc is always the hardest. :o)

Well, it wasn't quite my first time. ;) I had managed to get GDC to build with 4.7 before, just not git HEAD.


> 2. You are at least a month behind on that.

Ahhahaha... I must be growing old. Took what felt like a few days off following GDC developments due to being busy with other things, and come back to discover things have changed so much. :-P


>   a. gdc has been merged in with the gcc source package in Debian.

Oooh nice!! Heh, now I know I'm getting old. I haven't even noticed gdc-4.8 being listed among the unstable packages now!


>   b. 4.8 is in unstable (based off 2.062 though).

Well, 2.062 is still better than whatever gdc-4.6 was based on, which IIRC was really old.


>   c. I have been receiving lots of emails from the debbuilder about
> gdc building status on all of debian's arch's, and success/failures in
> the testsuite / unittester.  :o)
[...]

Very nice. :)


T

-- 
I am a consultant. My job is to make your job redundant. -- Mr Tom
July 08, 2013
On Friday, 5 July 2013 at 16:35:26 UTC, Joseph Rushton Wakeling wrote:
> On 07/05/2013 04:40 PM, eles wrote:
>> On Friday, 5 July 2013 at 13:45:30 UTC, Joseph Rushton Wakeling wrote:
>>> On 07/05/2013 03:34 PM, eles wrote:
>>> Ubuntu 13.04.  I have also compiled GDC successfully using 4.8.1 on a cluster in
>>> my office which runs Ubuntu 12.04.
>> 
>> Ubuntu 13.10-x86_64 here (alpha). Do you use these instructions?
>
> I'll describe exactly what I do.
>
> Let's suppose that we have a directory called $(GDCDIR) that holds everything.
>
> In $(GDCDIR)/dev I have my local copy of the GDC git repo.  This is GDC master,
> not any of the 4.x branches.
>
> In $(GDCDIR)/gcc-4.8.1 I have the GCC sources.  This is just the .tar.gz
> download from one of the GCC mirrors, unzipped.
>
> Then:
>
>     cd $(GDCDIR)/dev
>     ./setup-gcc.sh ../gcc-4.8.1
>     mkdir ../objdir
>     cd ../objdir
>     ../gcc-4.8.1/configure --enable-languages=d --disable-multilib
> --enable-checking=release --prefix=/opt/gdc
>     make   [ with -j for as many processors as you can spare, it helps! ]

Well, it worked! Thanks a lot!

> It's no longer necessary to bother with the hassle of getting Debian/Ubuntu GCC
> sources, as from 4.8 on GCC supports multiarch.  This also saves the hassle of
> having to patch the Debian sources.

I never properly succeed into accomplishing all these steps. It patched, but it never compiled to the end. Thank you for the new method.


> With the above done, if I pull in any updates from GDC master, I can rebuild as
> follows:
>
>     cd $(GDCDIR)/dev
>     ./setup-gcc.sh --update ../gcc-4.8.1
>     cd ../objdir
>     make    [ still use -j as many processors as you can :-) ]

I just can't wait to try this! I am looking impatiently for the next gdc commit...

> I should add that I arrived at this simple process substantially thanks to a
> good deal of coaching and education from Iain, without whom GCC would have
> defeated me :-)

Kudos, Iain!

> When I did use .deb sources, I used gcc-snapshot -- I described the process
> here: http://forum.dlang.org/thread/mailman.1605.1352199912.5162.d.gnu@puremagic.com
>
> ... although watch out, there's one important typo in that set of instructions.

If I will have the time, one day...

> Anyway, the instructions in this email are probably the best to go with now.

Completely agree.

> Let me know how it goes for you ... :-)


Kudos, kudos, kudos.

> Best wishes,

Tha same to you!

>     -- Joe

Eles

>
> P.S. You'll probably also want to install gdmd which these days has a separate
> git repo.  Very easy to install -- you just need to tweak the Makefile so that
> the install prefix goes where you want it to.

I will try that too.
July 08, 2013
On Friday, 5 July 2013 at 18:12:35 UTC, Joseph Rushton Wakeling wrote:
> On 07/05/2013 08:03 PM, H. S. Teoh wrote:
>> Wait, we're trying to D-ify gdmd?
>
> It was a suggestion of Iain's when he forked it off into a separate repo.  Seems
> like a good idea -- demonstrates D's capabilities, probably makes it easier to
> maintain, could make it easier to place back in the main project if/when the
> frontend gets rewritten in D.

Just me alone, I do not feel that I have enough time and competence to do that. But, what about to form a venture, the three of us? (JRW, HST and me, Iain already has a lot of job to do)

The goal would be to D-ify the gdmd.

I will learn some Perl in the process, but that's life...

So?
July 08, 2013
On 07/08/2013 11:45 AM, eles wrote:
> Just me alone, I do not feel that I have enough time and competence to do that. But, what about to form a venture, the three of us? (JRW, HST and me, Iain already has a lot of job to do)
> 
> The goal would be to D-ify the gdmd.
> 
> I will learn some Perl in the process, but that's life...

My main concern is about regularity of time/attention I can give.  As you can see from my contributions to Phobos, I tend to have brief periods of furious activity and then long activity deserts -- which are mostly to do with commitments elsewhere.

Anyway, I'll happily give it a go if the two of you are up for it, and understand that at certain points I may just vanish for a while, at least contribution-wise :-)

I figure it's something we can all learn something by doing and once this is started we might be able to get others in as well.

Best wishes,

    -- Joe