March 06, 2007
I'm having trouble trying to build gdc-0.23 on x86_64 (fc6).  I need to do this to get libgphobos built with -fPIC.

Here's what I tried:

1. tar xjf gcc-4.1.1.tar.bz2
2. cd gcc-4.1.1/gcc
3. tar xjf ~/gdc-0.23-src.tar.bz2
4. cd ..
5. ./gcc/d/
6. ./configure --prefix=/opt/gdc --enable-languages=c,d,c++ && make
If /home/nbecker/gcc-4.1.1/host-x86_64-unknown-linux-gnu/gcc/gdc -B/home/nbecker/gcc-4.1.1/host-x86_64-unknown-linux-gnu/gcc/ -B/opt/gdc/x86_64-unknown-linux-gnu/bin/ -B/opt/gdc/x86_64-unknown-linux-gnu/lib/ -isystem /opt/gdc/x86_64-unknown-linux-gnu/include -isystem /opt/gdc/x86_64-unknown-linux-gnu/sys-include
can compile D
sources... /home/nbecker/gcc-4.1.1/host-x86_64-unknown-linux-gnu/gcc/cc1d: /home/nbecker/gcc-4.1.1/host-x86_64-unknown-linux-gnu/gcc/
version `GCC_4.2.0' not found (required by /usr/lib64/
configure: error: can't compile D sources!
make[1]: *** [configure-target-libphobos] Error 1

That 'GCC_4.2.0' sounds suspicious.  I'm guessing it picked up the system gcc and libstdc++ instead of the one from the build tree.

What did I do wrong?