Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
September 26, 2011 C compiler cannot create executables? | ||||
---|---|---|---|---|
| ||||
I keep getting the following error on two newly set up Debian testing boxes, as well as a Ubuntu Oneric box, when building GDC tip using GCC 4.6.1: checking for x86_64-unknown-linux-gnu-gcc... /var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir/./gcc/xgcc -B/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir/./gcc/ -B/gdc/x86_64-unknown-linux-gnu/bin/ -B/gdc/x86_64-unknown-linux-gnu/lib/ -isystem /gdc/x86_64-unknown-linux-gnu/include -isystem /gdc/x86_64-unknown-linux-gnu/sys-include checking for C compiler default output file name... configure: error: in `/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir/x86_64-unknown-linux-gnu/libgomp': configure: error: C compiler cannot create executables See `config.log' for more details. make[2]: *** [configure-stage1-target-libgomp] Error 77 make[2]: Leaving directory `/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir' make: *** [all] Error 2 Somehow, this error does not occur on my work box, where I run Ubuntu 10.04. I have no idea what the difference is. Below is my (very quick-and-dirty) build script, mostly cut and pasted from the GDC wiki. rm -rf /var/tmp/gdcStuff mkdir /var/tmp/gdcStuff cp -R * /var/tmp/gdcStuff # Copies the gcc bzip file cd /var/tmp/gdcStuff hg clone https://bitbucket.org/goshawk/gdc mkdir gdc/dev cd gdc/dev tar -xvf ../../gcc-4.6.1.tar.bz2 cd gcc-4.6.1 ln -s ../../../d gcc/d ./gcc/d/setup-gcc.sh -v2 mkdir objdir cd objdir ../configure --enable-languages=d,c++ --disable-shared \ --prefix=/gdc --enable-multilib \ --with-bugurl="https://bitbucket.org/goshawk/gdc/issues" \ --enable-checking=release make -j 2 2>&1 | tee build.log # insert your number of cores in the -j argument make install DESTDIR=$HOME/apps |
September 27, 2011 Re: C compiler cannot create executables? | ||||
---|---|---|---|---|
| ||||
Posted in reply to dsimcha | On Mon, Sep 26, 2011 at 6:11 PM, dsimcha <dsimcha@yahoo.com> wrote:
> I keep getting the following error on two newly set up Debian testing boxes, as well as a Ubuntu Oneric box, when building GDC tip using GCC 4.6.1:
>
> checking for x86_64-unknown-linux-gnu-gcc...
> /var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir/./gcc/xgcc
> -B/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir/./gcc/
> -B/gdc/x86_64-unknown-linux-gnu/bin/ -B/gdc/x86_64-unknown-linux-gnu/lib/
> -isystem /gdc/x86_64-unknown-linux-gnu/include -isystem
> /gdc/x86_64-unknown-linux-gnu/sys-include
> checking for C compiler default output file name...
> configure: error: in
> `/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir/x86_64-unknown-linux-gnu/libgomp':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> make[2]: *** [configure-stage1-target-libgomp] Error 77
> make[2]: Leaving directory `/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/var/tmp/gdcStuff/gdc/dev/gcc-4.6.1/objdir'
> make: *** [all] Error 2
>
>
> Somehow, this error does not occur on my work box, where I run Ubuntu 10.04. I have no idea what the difference is. Below is my (very quick-and-dirty) build script, mostly cut and pasted from the GDC wiki.
>
> rm -rf /var/tmp/gdcStuff
> mkdir /var/tmp/gdcStuff
> cp -R * /var/tmp/gdcStuff # Copies the gcc bzip file
> cd /var/tmp/gdcStuff
> hg clone https://bitbucket.org/goshawk/gdc
> mkdir gdc/dev
> cd gdc/dev
> tar -xvf ../../gcc-4.6.1.tar.bz2
> cd gcc-4.6.1
> ln -s ../../../d gcc/d
> ./gcc/d/setup-gcc.sh -v2
> mkdir objdir
> cd objdir
> ../configure --enable-languages=d,c++ --disable-shared \
> --prefix=/gdc --enable-multilib \
> --with-bugurl="https://bitbucket.org/goshawk/gdc/issues" \
> --enable-checking=release
> make -j 2 2>&1 | tee build.log # insert your
> number of cores in the -j argument
> make install DESTDIR=$HOME/apps
>
>
Have you searched for the error in config.log? That basically means that the default set of options that configure is using is causing GCC to get an error.
|
September 27, 2011 Re: C compiler cannot create executables? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Wiley Attachments:
| Andrew Wiley wrote: > On Mon, Sep 26, 2011 at 6:11 PM, dsimcha <dsimcha@yahoo.com> wrote: >> I keep getting the following error on two newly set up Debian testing boxes, as well as a Ubuntu Oneric box, when building GDC tip using GCC 4.6.1: >> ... snip ... > Have you searched for the error in config.log? That basically means that the default set of options that configure is using is causing GCC to get an error. My bet is that the error is along the lines of "Cannot find cc1". If that is the case, it means you have the current directory (".") in your path. You need to remove it. Jerome -- mailto:jeberger@free.fr http://jeberger.free.fr Jabber: jeberger@jabber.fr |
September 27, 2011 Re: C compiler cannot create executables? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jérôme M. Berger | == Quote from "Jérôme M. Berger" (jeberger@free.fr)'s article > This is an OpenPGP/MIME signed message (RFC 2440 and 3156) > --------------enigEFBBD89E592FB5B6388005AB > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > Andrew Wiley wrote: > > On Mon, Sep 26, 2011 at 6:11 PM, dsimcha <dsimcha@yahoo.com> wrote: > >> I keep getting the following error on two newly set up Debian testing = > boxes, > >> as well as a Ubuntu Oneric box, when building GDC tip using GCC 4.6.1:= > >> > =2E.. snip ... > > Have you searched for the error in config.log? That basically means that the default set of options that configure is using is causing GCC to get an error. > My bet is that the error is along the lines of "Cannot find cc1". > If that is the case, it means you have the current directory (".") > in your path. You need to remove it. > Jerome For Debian/Ubuntu, you also need to consider that they've been experimenting with multiarch system for 32 and 64bit, which requires special patches to GCC so that it can find the correct locations of headers, libraries, etc. If you are using a vanilla GCC tarball to build, it may help if you put the following in your .bashrc LIBRARY_PATH=/usr/lib/i386-linux-gnu CPATH=/usr/include/i386-linux-gnu export LIBRARY_PATH CPATH Regards Iain |
September 27, 2011 Re: C compiler cannot create executables? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On 9/27/2011 1:44 AM, Iain Buclaw wrote:
> For Debian/Ubuntu, you also need to consider that they've been experimenting with
> multiarch system for 32 and 64bit, which requires special patches to GCC so that
> it can find the correct locations of headers, libraries, etc.
>
> If you are using a vanilla GCC tarball to build, it may help if you put the
> following in your .bashrc
>
> LIBRARY_PATH=/usr/lib/i386-linux-gnu
> CPATH=/usr/include/i386-linux-gnu
> export LIBRARY_PATH CPATH
Thanks. I ended up figuring out the same thing almost simultaneously. I solved it slightly differently by adding a few symlinks for important files to my /usr/lib and /usr/include/gnu directories.
|
September 27, 2011 Re: C compiler cannot create executables? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | == Quote from Iain Buclaw (ibuclaw@ubuntu.com)'s article
> For Debian/Ubuntu, you also need to consider that they've been experimenting with
> multiarch system for 32 and 64bit, which requires special patches to GCC so that
> it can find the correct locations of headers, libraries, etc.
> If you are using a vanilla GCC tarball to build, it may help if you put the
> following in your .bashrc
> LIBRARY_PATH=/usr/lib/i386-linux-gnu
> CPATH=/usr/include/i386-linux-gnu
> export LIBRARY_PATH CPATH
> Regards
> Iain
Another way to fix this is apparently to just disable the bootstrap feature via --disable-bootstrap. It seems rather useless anyhow. Why should I care what my compiler was compiled with?
|
Copyright © 1999-2021 by the D Language Foundation