Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
C compiler cannot create executables
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
netengineer466
n00b
n00b


Joined: 13 Aug 2011
Posts: 32

PostPosted: Mon Oct 10, 2011 11:56 pm    Post subject: C compiler cannot create executables Reply with quote

Everything was working till this:

./configure --without-included-gettext --build=x86_64-pc-linux-gnu --enable-secureplt --prefix=/usr --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --datadir=/usr/share/binutils-data/x86_64-pc-linux-gnu/2.20.1 --infodir=/usr/share/binutils-data/x86_64-pc-linux-gnu/2.20.1/info --mandir=/usr/share/binutils-data/x86_64-pc-linux-gnu/2.20.1/man --bindir=/usr/x86_64-pc-linux-gnu/binutils-bin/2.20.1 --libdir=/usr/lib64/binutils/x86_64-pc-linux-gnu/2.20.1 --libexecdir=/usr/lib64/binutils/x86_64-pc-linux-gnu/2.20.1 --includedir=/usr/lib64/binutils/x86_64-pc-linux-gnu/2.20.1/include --enable-64-bit-bfd --enable-shared --disable-werror --disable-static
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking for C compiler default output file name...
configure: error: in `/var/tmp/portage/sys-devel/binutils-2.20.1/work/build':
configure: error: C compiler cannot create executables

See `config.log' for more details.
* ERROR: sys-devel/binutils-2.20.1 failed (compile phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 69: Called src_compile
* environment, line 3361: Called toolchain-binutils_src_compile
* environment, line 4054: Called die
* The specific snippet of code:
* "${S}"/configure "$@" || die;
*
* If you need support, post the output of 'emerge --info =sys-devel/binutils-2.20.1',
* the complete build log and the output of 'emerge -pqv =sys-devel/binutils-2.20.1'.
* The complete build log is located at '/var/tmp/portage/sys-devel/binutils-2.20.1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-2.20.1/temp/environment'.
* S: '/var/tmp/portage/sys-devel/binutils-2.20.1/work/binutils-2.20.1'

>>> Failed to emerge sys-devel/binutils-2.20.1, Log file:

>>> '/var/tmp/portage/sys-devel/binutils-2.20.1/temp/build.log'

* Messages for package sys-devel/binutils-2.20.1:

* ERROR: sys-devel/binutils-2.20.1 failed (compile phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 69: Called src_compile
* environment, line 3361: Called toolchain-binutils_src_compile
* environment, line 4054: Called die
* The specific snippet of code:
* "${S}"/configure "$@" || die;
*
* If you need support, post the output of 'emerge --info =sys-devel/binutils-2.20.1',
* the complete build log and the output of 'emerge -pqv =sys-devel/binutils-2.20.1'.
* The complete build log is located at '/var/tmp/portage/sys-devel/binutils-2.20.1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-2.20.1/temp/environment'.
* S: '/var/tmp/portage/sys-devel/binutils-2.20.1/work/binutils-2.20.1'
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1028
Location: Romania

PostPosted: Tue Oct 11, 2011 4:40 am    Post subject: Reply with quote

Try "eselect binutils list" if is not set (an asterisk) run "eselect binutils set 1". If is already set, run "binutils-config -l" and "binutils-config 1".
_________________
My Smooth Computer
MB: VIA 82C598MVP on DFI P5BV3+/Rev. B+
CPU: AMD K6-II 333 MHz | RAM: 256 MB SDRAM
Video: Asus MB19TU on nVidia GeForce MX4000 64 MB
Sound: CM8738 | Net: RTL-8139
PATA HDD WD 80 GB & DVD-RW LG 16x
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9005
Location: beyond the rim

PostPosted: Tue Oct 11, 2011 6:31 am    Post subject: Reply with quote

Quote:
configure: error: in `/var/tmp/portage/sys-devel/binutils-2.20.1/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Back to top
View user's profile Send private message
netengineer466
n00b
n00b


Joined: 13 Aug 2011
Posts: 32

PostPosted: Tue Oct 11, 2011 9:31 pm    Post subject: Reply with quote

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by equinox configure 1.50, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ././configure --prefix=/usr --libdir=/usr/lib64

## --------- ##
## Platform. ##
## --------- ##

hostname = localhost
uname -m = x86_64
uname -r = 2.6.38-sysrescue-std220TG3
uname -s = Linux
uname -v = #1 SMP Mon Oct 10 14:00:41 Local time zone must be set--see zic

/usr/bin/uname -p = Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /opt/bin
PATH: /usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1996: checking for a BSD-compatible install
configure:2052: result: /usr/bin/install -c
configure:2063: checking whether build environment is sane
configure:2106: result: yes
configure:2134: checking for a thread-safe mkdir -p
configure:2173: result: /bin/mkdir -p
configure:2186: checking for gawk
configure:2202: found /usr/bin/gawk
configure:2213: result: gawk
configure:2224: checking whether make sets $(MAKE)
configure:2245: result: yes
configure:2434: checking whether to enable maintainer-specific portions of Makefiles
configure:2443: result: no
configure:2505: checking for gcc
configure:2521: found /usr/bin/gcc
configure:2532: result: gcc
configure:2770: checking for C compiler version
configure:2777: gcc --version >&5
gcc (Gentoo 4.4.5 p1.0, pie-0.4.5) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2780: $? = 0
configure:2787: gcc -v >&5
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.5 p1.0, pie-0.4.5'
Thread model: posix
gcc version 4.4.5 (Gentoo 4.4.5 p1.0, pie-0.4.5)
configure:2790: $? = 0
configure:2797: gcc -V >&5
gcc: '-V' option must have argument
configure:2800: $? = 1
configure:2823: checking for C compiler default output file name
configure:2850: gcc conftest.c >&5
/usr/lib/../x86_64-pc-linux-gnu/bin/ld: crtbegin.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2853: $? = 1
configure:2891: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "equinox"
| #define PACKAGE_TARNAME "equinox"
| #define PACKAGE_VERSION "1.50"
| #define PACKAGE_STRING "equinox 1.50"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "equinox"
| #define VERSION "1.50"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2898: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_GTK_CFLAGS_set=
ac_cv_env_GTK_CFLAGS_value=
ac_cv_env_GTK_LIBS_set=
ac_cv_env_GTK_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/micah/Downloads/equinox-1.50/missing --run aclocal-1.10'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /home/micah/Downloads/equinox-1.50/missing --run tar'
AR=''
AS=''
AUTOCONF='${SHELL} /home/micah/Downloads/equinox-1.50/missing --run autoconf'
AUTOHEADER='${SHELL} /home/micah/Downloads/equinox-1.50/missing --run autoheader'
AUTOMAKE='${SHELL} /home/micah/Downloads/equinox-1.50/missing --run automake-1.10'
AWK='gawk'
BUILD_ENGINES=''
BUILD_THEMES=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLLTOOL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
GREP=''
GTK_CFLAGS=''
GTK_LIBS=''
GTK_VERSION=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /home/micah/Downloads/equinox-1.50/missing --run makeinfo'
OBJDUMP=''
OBJEXT=''
PACKAGE='equinox'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='equinox'
PACKAGE_STRING='equinox 1.50'
PACKAGE_TARNAME='equinox'
PACKAGE_VERSION='1.50'
PATH_SEPARATOR=':'
PKG_CONFIG=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='1.50'
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_F77=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /home/micah/Downloads/equinox-1.50/install-sh'
libdir='/usr/lib64'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME "equinox"
#define PACKAGE_TARNAME "equinox"
#define PACKAGE_VERSION "1.50"
#define PACKAGE_STRING "equinox 1.50"
#define PACKAGE_BUGREPORT ""
#define PACKAGE "equinox"
#define VERSION "1.50"

configure: exit 77
Back to top
View user's profile Send private message
netengineer466
n00b
n00b


Joined: 13 Aug 2011
Posts: 32

PostPosted: Tue Oct 11, 2011 9:57 pm    Post subject: Reply with quote

I should note that on the above I get this error with all software packages I attempt to install. Firefox no longer starts because it cannot find libstdc++.so.6.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9005
Location: beyond the rim

PostPosted: Wed Oct 12, 2011 6:21 am    Post subject: Reply with quote

Looks like your gcc install is broken. Try selecting a gcc version with gcc-config, if that doesn't help you may have to reinstall gcc from a binpkg.
Back to top
View user's profile Send private message
netengineer466
n00b
n00b


Joined: 13 Aug 2011
Posts: 32

PostPosted: Wed Oct 12, 2011 7:57 pm    Post subject: Reply with quote

gcc-config complains about /etc/env.d/gcc/x86_64-pc-linux-gnu-4.4.5

LDPATH="/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32"
MANPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/man"
INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/info"
STDCXX_INCDIR="g++-v4"
GCC_PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5"

In LDPATH those paths don't exist
Back to top
View user's profile Send private message
SlashBeast
Moderator
Moderator


Joined: 23 May 2006
Posts: 2824

PostPosted: Wed Oct 12, 2011 9:03 pm    Post subject: Reply with quote

Propably you upgraded to gcc 4.5 and after deplcean you removed enabled gcc 4.4.5, select new gcc by gcc-config and it should be fixed.

also, for the lord's sake, use [code] tags when you paste a code...
_________________
BitBucket -- better-initramfs to address many usecases and linux's limitations.
Back to top
View user's profile Send private message
netengineer466
n00b
n00b


Joined: 13 Aug 2011
Posts: 32

PostPosted: Wed Oct 12, 2011 9:54 pm    Post subject: Reply with quote

There is no other gcc available under gcc-config
Back to top
View user's profile Send private message
netengineer466
n00b
n00b


Joined: 13 Aug 2011
Posts: 32

PostPosted: Thu Oct 13, 2011 10:27 am    Post subject: Reply with quote

Is there a way to install a binary version of gcc?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2277
Location: Canada

PostPosted: Thu Oct 13, 2011 12:04 pm    Post subject: Reply with quote

Had that, in my case because of the crash during binutils update

So gcc could not get the assembler from

/usr/x86_64-pc-linux-gnu/binutils-bin/2.21.1/as


Anyway binary copies are available from

http://tinderbox.dev.gentoo.org

Now I know I just had to install binary binutils on top of the broken one,
but at the time I actually did install both binary binutils and gcc (and then had to do some cleaning after reemerging portage ones over them)
Back to top
View user's profile Send private message
netengineer466
n00b
n00b


Joined: 13 Aug 2011
Posts: 32

PostPosted: Fri Oct 14, 2011 12:06 am    Post subject: Reply with quote

Thanks Everyone, problem solved. binary gcc is located at tinderbox under sys-devel as well as binutils copy those into their appropriate locations libmpfr and libgmp are under dev-libs
http://tinderbox.x86.dev.gentoo.org/default-linux/amd64/
Back to top
View user's profile Send private message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 338
Location: Connecticut, USA

PostPosted: Mon Nov 14, 2011 9:00 pm    Post subject: Reply with quote

I've found more than one similar thread, with gcc breaking after upgrade of dev-libs/gmp from 4.3.2 to 5.0.2, and then doing "revdep-rebuild --library /usr/lib64/libgmp.so.3" and then removing that library. Not sure why gcc (/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1) links to that library, but it does. Also not sure why the revdep-rebuild didn't find that dependency.
Back to top
View user's profile Send private message
pebek
n00b
n00b


Joined: 19 Aug 2006
Posts: 4

PostPosted: Mon Dec 12, 2011 8:53 am    Post subject: Reply with quote

genterminl wrote:
I've found more than one similar thread, with gcc breaking after upgrade of dev-libs/gmp from 4.3.2 to 5.0.2, and then doing "revdep-rebuild --library /usr/lib64/libgmp.so.3" and then removing that library. Not sure why gcc (/usr/libexec/gcc/x86_64-pc-linux-gnu/4.5.3/cc1) links to that library, but it does. Also not sure why the revdep-rebuild didn't find that dependency.


Thanks. I have same problem. I fix it by:

Code:

# ln -s /usr/lib/libgmp.so.10.0.2 /usr/lib/libgmp.so.3
# emerge -v1 sys-devel/gcc
# rm /usr/lib/libgmp.so.3
Back to top
View user's profile Send private message
olivierweb
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2002
Posts: 109
Location: France

PostPosted: Fri Jan 20, 2012 9:57 am    Post subject: Reply with quote

Thanks for the tip, I've got the same problem after updating libgmp.
_________________
A decade with Gentoo...
Back to top
View user's profile Send private message
azp
Guru
Guru


Joined: 16 Nov 2003
Posts: 350
Location: Stockholm, Sweden

PostPosted: Sat Oct 20, 2012 10:30 am    Post subject: Reply with quote

I just got this issue when rebuilding my system using emerge -e. But the problem for me wasn't libgmp but libmpc.so.2 (which has been replaced by libmpc.so.3), so I'm currently trying to link to the newer one and rebuilding gcc.
_________________
Weeks of coding can save you hours of planning.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum