D on the Raspberry Pi

Johannes Pfau nospam at example.com
Thu Aug 2 00:49:13 PDT 2012


Am Thu, 02 Aug 2012 00:30:35 +0200
schrieb "Stefan Frijters" <sfrijters at gmail.com>:

> On Sunday, 15 July 2012 at 15:11:03 UTC, Sönke Ludwig wrote:
> >
> >>
> >> Anyway, building a compiler on the raspberry pi worked for me, 
> >> although
> >> it took a long time to build. I created a new wiki page with 
> >> build
> >> instructions:
> >> https://bitbucket.org/goshawk/gdc/wiki/Raspberry%20Pi
> >>
> >
> > I've done some new attempts. After using a different OS image 
> > on a different SD card, everything worked much better (raspbian 
> > "Pisces"). I followed your instructions on the wiki page but 
> > had to change arm-linux-gnueabi to arm-linux-gnueabihf and 
> > later removed them altogether with the same effect.
> >
> > However, compilation got stuck at the same place as before. It 
> > couldn't find <bits/predefs.h> and other architecture specific 
> > files. Symlinking from /usr/include/arm-linux-gnueabihf/* to 
> > gcc/* helped a bit until it stopped with the same error as in 
> > the build log that I posted before.
> >
> > I will probably just try the debian image, although a system 
> > with hardfloat support would be pretty important in the long 
> > run. But the fact that it doesn't find the /sys/, /bits/ etc. 
> > headers sounds like it is just some stupid little build 
> > problem. But I'm much too unfamiliar with the GCC build process 
> > to make effective guesses for a solution.
> 
> Following the instructions at Johannes Pfau's link above I
> managed to get the compiler up and running on the squeeze image
> (not counting stupidity on my part which made the compilation
> fail more than six hours into the process...). So thanks for
> that! However, I am curious if anyone has made any progress
> getting it to work on the raspbian image. I will try some things
> tomorrow (though I'm a newbie, so I doubt I'll get very far on my
> own) but with the 8-hour compilation cycles I would like to avoid
> any stupid mistakes if possible. Any experiences or tips would be
> helpful!
> 
> Regards,
> 
> Stefan
> 

I haven't tried raspbian yet, but it's always good to make sure all
packages necessary for building gcc are installed (make sure to do
this before calling the gcc configure script!):
-----------
sudo apt-get install build-essential git
sudo apt-get build-dep gcc
-----------
also make sure to enable swap.

Usually the configure flags described on GDC's main page work fine:
-----------
../configure --enable-languages=d --disable-bootstrap \
        --disable-shared --disable-nls --prefix=/opt/gdc \
        --with-bugurl="https://bitbucket.org/goshawk/gdc/issues" \
        --enable-checking=yes \
        --disable-libgomp --disable-libmudflap
-----------

but you can also have a look at the flags the system gcc has been
compiled with:
-----------
gcc -v
-----------



More information about the D.gnu mailing list