trouble building gdc-0.23

David Friedman dvdfrdmn at users.ess-eff.net
Tue Mar 6 18:55:02 PST 2007


Neal Becker wrote:
> 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/setup-gcc.sh 
> 6. ./configure --prefix=/opt/gdc --enable-languages=c,d,c++ && make
> [chug...]
> checking
> 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/libgcc_s.so.1:
> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6)
> no
> 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?

For whatever reason, the cc1d executable is picking up the built version 
of libgcc.so instead of the system libgcc.so.  The build scripts may be 
messing with LD_LIBRARY_PATH.

Try building GCC outside of the source directory:

cd ..
mkdir BUILD
cd BUILD
../gcc-4.1.1/configure ... && make

David


More information about the D.gnu mailing list