GDC Build Errors

Timo Sintonen t.sintonen at luukku.com
Sat Feb 1 00:01:24 PST 2014


On Saturday, 1 February 2014 at 02:30:30 UTC, Mike wrote:

> I'm trying to build a GDC cross-compiler for arm-none-eabi.  I
> get usable binaries, but my procedure always ends in the
> following:
>
> /usr/bin/install -c -m 644 unwind.h
> /home/mike/gdc-arm-none-eabi-test/lib/gcc/arm-none-eabi/4.8.2/include
> make[2]: Leaving directory
> '/home/mike/gdc/gcc-build/arm-none-eabi/libgcc'
> make[2]: Entering directory
> '/home/mike/gdc/gcc-build/arm-none-eabi/libstdc++-v3'
> make[2]: *** No rule to make target 'install'.  Stop.
> make[2]: Leaving directory
> '/home/mike/gdc/gcc-build/arm-none-eabi/libstdc++-v3'
> Makefile:9608: recipe for target 'install-target-libstdc++-v3'
> failed
> make[1]: *** [install-target-libstdc++-v3] Error 2
> make[1]: Leaving directory '/home/mike/gdc/gcc-build'
> Makefile:2180: recipe for target 'install' failed
> make: *** [install] Error 2
>
>
>
> Please let me know what I'm doing wrong.  Here's my build 
> script:
>
>
>
> export TARGET=arm-none-eabi
> export PREFIX=/home/mike/gdc-arm-none-eabi-test
> export PATH=$PATH:$PREFIX/bin
>
> # Delete existing binutils source archive and download a new one
> #-------------------------------------------------------------------
> export BINUTILS_NAME=binutils-2.24
> export BINUTILS_SOURCE_ARCHIVE=$BINUTILS_NAME.tar.bz2
> rm -f $BINUTILS_SOURCE_ARCHIVE
> rm -rf $BINUTILS_NAME
> wget http://ftpmirror.gnu.org/binutils/$BINUTILS_SOURCE_ARCHIVE
>
> # Extract binutils
> #-------------------------------------------------------------------
> tar xjfv $BINUTILS_SOURCE_ARCHIVE
>
> # Create binutils build directory
> #-------------------------------------------------------------------
> export BINUTILS_BUILD_DIR=binutils-build
> rm -rf $BINUTILS_BUILD_DIR
> mkdir $BINUTILS_BUILD_DIR
>
> # Configure and build binutils
> #-------------------------------------------------------------------
> cd $BINUTILS_BUILD_DIR
> ../$BINUTILS_NAME/configure \
>    --target=$TARGET   \
>    --prefix=$PREFIX   \
>    --disable-nls      \
>    --disable-multilib \
>    --with-gnu-as      \
>    --with-gnu-ld      \
>    --disable-libssp
> make -j4 all
> make install
> cd ..
>
>
> # Get GDC
> #-------------------------------------------------------------------
> rm -rf gdc
> mkdir gdc
> git clone https://github.com/D-Programming-GDC/GDC.git gdc
> cd gdc
> git checkout gdc-4.8
> cd ..
>
>
>
> # Delete existing GCC source archive and download a new one
> #-------------------------------------------------------------------
> export GCC_NAME=gcc-4.8.2
> export GCC_SOURCE_ARCHIVE=$GCC_NAME.tar.bz2
> rm -f $GCC_SOURCE_ARCHIVE
> rm -rf $GCC_NAME
> wget
> http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/$GCC_NAME/$GCC_SOURCE_ARCHIVE
>
> # Extract GCC
> #-------------------------------------------------------------------
> tar xjfv $GCC_SOURCE_ARCHIVE
>
>
>
> # Patch GCC
> #-------------------------------------------------------------------
> cd gdc
> ./setup-gcc.sh ../$GCC_NAME
> cd ..
>
>
>
> # Create GCC build directory
> #-------------------------------------------------------------------
> export GCC_BUILD_DIR=gcc-build
> rm -rf $GCC_BUILD_DIR
> mkdir $GCC_BUILD_DIR
>
> # Configure and build gcc
> #-------------------------------------------------------------------
> cd $GCC_BUILD_DIR
> ../$GCC_NAME/configure --target=$TARGET --prefix=$PREFIX \
>    --enable-languages=d     \
>    --disable-bootstrap      \
>    --disable-libssp         \
>    --disable-libgomp        \
>    --disable-libmudflap     \
>    --disable-multilib       \
>    --disable-libphobos      \
>    --disable-decimal-float  \
>    --disable-libffi         \
>    --disable-libmudflap     \
>    --disable-libquadmath    \
>    --disable-libssp         \
>    --disable-libstdcxx-pch  \
>    --disable-nls            \
>    --disable-shared         \
>    --disable-threads        \
>    --disable-tls            \
>    --with-gnu-as            \
>    --with-gnu-ld            \
>    --with-cpu=cortex-m4     \
>    --with-tune=cortex-m4    \
>    --with-mode=thumb
> make -j4
> make install
> cd ..
>
> Thaks,
> Mike

Just compiled with current head of gdc and gcc and had no
problems. I did not test your configuration but used my own
instructions (those in the minlibd wiki).

The problem is that libstdc++ or the rule to make it is somehow
missing. I think some gcc configuration option disables
generating it. Maybe it is --disable-shared because I can not see
any other that would affect. --enable-languages=d should
automatically enable all c++ related but you may also test with
enable-languages=c++,d. Also I recommend to configure gcc first
with smallest possible set of options. (even if it does not make
a properly working compiler it will install anyway) Then adding
more options to see which causes this.




More information about the D.gnu mailing list