GDC build [was: Re: Sort order of dirEntries]

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Oct 25 17:16:27 PDT 2012


On Fri, Oct 26, 2012 at 12:26:02AM +0200, Joseph Rushton Wakeling wrote:
> On 10/25/2012 11:22 PM, H. S. Teoh wrote:
[...]
> Yup.  Latest gdc-4.7 sources (which I believe include your patch),
> GCC 4.7.2 sources from the Ubuntu 12.10 repositories, tweaked the
> debian/rules.patch file as instructed, ran the debian/rules clean
> and debian/rules patch functions and update-gcc.sh.

Hmm. I don't know what to say, it worked for me. :-/  I wonder if
there's a difference between the Debian version of gcc-4.7.2 patches and
Ubuntu's version. I doubt it, but you never know. That might be
something worth looking into (you can add ftp.debian.org to
/etc/apt/sources.list if you want to experiment with fetching the gcc
sources from the Debian repository instead).

Another thing I can think of is, you may need to run 'apt-get build-dep
gcc-4.7.2' to install any -dev packages required by the build. That
could be what's wrong. Maybe.


> I don't see anything in rules.patch that would get the compiler
> looking for crtio.o in /usr/lib/x86_64-linux-gnu/ though.

The patches are in debian/patches/*. There's quite a lot of them; I
didn't even bother looking through them. I wonder, though, if the Ubuntu
sources don't have the multiarch patch? Try the upstream Debian package
and see if that helps.


> >What parameters did you pass to configure? I wonder if you can turn
> >off some stuff that you don't need, that might avoid this problem. I
> >know that for me, I have to use --disable-multilib (at least),
> >otherwise the build will fail. I also have --disable-gomp and
> >--disable-quadmath, since neither are used by GDC. I'm not sure if
> >they're related to your issue though.
> 
> Originally I tried with --enable-language=d --disable-multilib
> --enable-lto. I've since tried without the -lto option, and tried
> disabling all the parts that are not used by GDC (gomp, quadmath,
> etc.)  Same error. :-(

:-( Well, try apt-get build-dep gcc-4.7.2 and maybe fetch the source
package from ftp.debian.org, and see if that helps. Beyond that, I'm
afraid I don't know much else. GCC build scripts are black magic to me,
of the blackest kind.


> It's really very, very frustrating, especially when compared to how
> easy it is to build LDC from source.  Even more so because it gets
> in the way of being able to actually help and contribute to GDC.

Yeah no kidding.

Building GCC is one of the most frustrating experiences I've ever had
with software compilation. There are just so many dependencies and
assumptions (some unstated, or perhaps just stated in obscure places
nobody knows where to look) about the build environment, system layout,
etc., that it's a veritable fortress of cards ready to come all crashing
down on you at the slightest wind. And often the error message is far
removed from the location of the real problem, and gives you no clue at
all as to what the real problem is. (That's why I said in another thread
in the other forum that the GCC build scripts need to be revamped.
Unfortunately, I doubt that will ever happen. :-/)


T

-- 
People walk. Computers run.


More information about the Digitalmars-d-learn mailing list