LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices



Reply
 
Search this Thread
Old 06-14-2011, 11:36 AM   #1
MarcusWebb1966
Member
 
Registered: Mar 2011
Posts: 58

Rep: Reputation: 0
Post emerge anything results in error in compiler


Ok it all started when I found out that the server was 186 days since its last emerge --sync. So I did this.

Then I was told to emerge portage. This failed because it said there was a dependency on python. 'No problem' I thought, I'll just emerge python. But that wouldn't emerge without portage being updated.

I then went to emerge --nodep python and that blew up telling me I had incorrect version of the compiler selected (64-bit edition, when the system's 32 bit). Changed the CHOST, CFLAGS, CBUILD, and CTARGET to be i686-pc-linux-gnu as opposed to x86_64-amd-linux-gnu and went to recompile.

At this point it decided to complain about the version of libtool. libtool led me to recompile the gcc/glibc (again using nodep to get the thing not to complain about circular dependencies). Now I tried an emerge --nodep gcc (which I was planning on following with an emerge --nodep glibc then emerge gcc and glibc again without the --nodep flag)

this is where my error comes in:

Code:
>>> Unpacking source...
>>> Unpacking gcc-4.4.5.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.5-patches-1.2.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.5-uclibc-patches-1.0.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.5-piepatches-v0.4.5.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Unpacking gcc-4.4.3-specs-0.2.0.tar.bz2 to /var/tmp/portage/sys-devel/gcc-4.4.5/work
* Applying Gentoo patches ...
*   00_all_gcc-4.1-alpha-mieee-default.patch ...
     [ok]
*   00_all_gcc-trampolinewarn.patch ...
     [ok]
*   01_all_gcc-4.1-alpha-asm-mcpu.patch ...
     [ok]
*   02_all_gcc-4.4-libgcj-as-needed-PR38298.patch ...
     [ok]
*   03_all_gcc43-java-nomulti.patch ...
     [ok]
*   05_all_gcc44-pr46173-all-tree.patch ...
     [ok]
*   08_all_gcc-4.1-cross-compile.patch ...
     [ok]
*   10_all_gcc-default-format-security.patch ...
     [ok]
*   10_all_gcc-default-fortify-source.patch ...
     [ok]
*   11_all_gcc-netbsd-symbolic.patch ...
     [ok]
*   14_all_gcc-sparc64-bsd.patch ...
     [ok]
*   15_all_gcc-libgomp-no-werror.patch ...
     [ok]
*   16_all_gcc-sparc-fbsd-c++-exceptions.patch ...
     [ok]
*   18_all_904-flatten-switch-stmt-00.patch ...
     [ok]
*   20_all_mudflap-setuid-env.patch ...
     [ok]
*   40_all_gcc-4.4-libiberty.h-asprintf.patch ...
     [ok]
*   47_all_arm-unbreak-armv4t.patch ...
     [ok]
*   51_all_gcc-3.4-libiberty-pic.patch ...
     [ok]
*   53_all_gcc4-superh-default-multilib.patch ...
     [ok]
*   60_all_4.4.5_hppa-wrong-code.patch ...
     [ok]
*   61_all_gcc4-ia64-noteGNUstack.patch ...
     [ok]
*   73_all_sh-libgcc-stacks.patch ...
     [ok]
*   74_all_sh-pr24836.patch ...
     [ok]
*   90_all_gcc-freebsd.patch ...
     [ok]
*   91_all_gcc-freebsd.patch ...
     [ok]
*   93_all_gcc-4.4-cloog-dl.patch ...
     [ok]
*   96_all_arm-pr43440.patch ...
     [ok]
* Done with patching
* Applying uClibc patches ...
*   90_all_100-uclibc-conf.patch ...
     [ok]
*   90_all_301-missing-execinfo_h.patch ...
     [ok]
*   90_all_302-c99-snprintf.patch ...
     [ok]
*   90_all_305-libmudflap-susv3-legacy.patch ...
     [ok]
* Done with patching
* Applying pie patches ...
*   10_all_gcc444_configure.patch ...
     [ok]
*   11_all_gcc44_config.in.patch ...
     [ok]
*   12_all_gcc44_Makefile.in.patch ...
     [ok]
*   20_all_gcc44_gcc.c.patch ...
     [ok]
*   21_all_gcc44_decl-tls-model.patch ...
     [ok]
*   30_all_gcc44_esp.h.patch ...
     [ok]
*   33_all_gcc44_config_rs6000_linux64.h.patch ...
     [ok]
*   35_all_gcc44_config_crtbegints.patch ...
     [ok]
*   40_all_gcc44_cp_lang-specs.h.patch ...
     [ok]
*   41_all_gcc44_objc_lang-specs.h.patch ...
     [ok]
*   42_all_gcc44_objcp_lang-specs.h.patch ...
     [ok]
*   60_all_gcc44_invoke.texi.patch ...
     [ok]
* Done with patching
* Running elibtoolize in: gcc-4.4.5/
*   Applying install-sh-1.5.4.patch ...
*   Applying portage-2.2.patch ...
*   Applying sed-1.5.6.patch ...
*   Applying as-needed-2.2.6.patch ...
* Using GNU config files from /usr/share/libtool
*   Updating config.sub
     [ok]
*   Updating libjava/classpath/config.sub
     [ok]
*   Updating libjava/libltdl/config.sub
     [ok]
*   Updating config.guess
     [ok]
*   Updating libjava/classpath/config.guess
     [ok]
*   Updating libjava/libltdl/config.guess
     [ok]
* Fixing misc issues in configure files
* Applying gcc-configure-texinfo.patch ...
     [ok]
* Touching generated files
*   Touching gcc/cstamp-h.in
*   Touching gcc/config.in
*   Touching libjava/aclocal.m4
*   Touching libjava/Makefile.in
*   Touching libjava/configure
* Applying gcc-spec-env.patch ...
     [ok]
>>> Source unpacked in /var/tmp/portage/sys-devel/gcc-4.4.5/work
>>> Compiling source in /var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5 ...
* CFLAGS="-O2 -pipe"
* CXXFLAGS="-O2 -pipe"
* Configuring gcc ...
* running gcc-compiler-configure
* configuring for GCC_LANG: c,c++,fortran

* PREFIX:			/usr
* BINPATH:			/usr/i686-pc-linux-gnu/gcc-bin/4.4.5
* LIBPATH:			/usr/lib/gcc/i686-pc-linux-gnu/4.4.5
* DATAPATH:		/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5
* STDCXX_INCDIR:	/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4

* Configuring GCC with: 
* 	--prefix=/usr 
* 	--bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.4.5 
* 	--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include 
* 	--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5 
* 	--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/man 
* 	--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/info 
* 	--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4 
* 	--host=i686-pc-linux-gnu 
* 	--build=i686-pc-linux-gnu 
* 	--disable-altivec 
* 	--disable-fixed-point 
* 	--without-ppl 
* 	--without-cloog 
* 	--enable-nls 
* 	--without-included-gettext 
* 	--with-system-zlib 
* 	--disable-werror 
* 	--enable-secureplt 
* 	--disable-multilib 
* 	--enable-libmudflap 
* 	--disable-libssp 
* 	--enable-libgomp 
* 	--with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.4.5/python 
* 	--enable-checking=release 
* 	--disable-libgcj 
* 	--with-arch=i686 
* 	--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.2, pie-0.4.5

/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.4.5 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.4.5/python --enable-checking=release --disable-libgcj --with-arch=i686 --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.2, pie-0.4.5
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-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 i686-pc-linux-gnu-gcc... gcc
checking for C compiler default output file name... configure: error: in `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
* 
* ERROR: sys-devel/gcc-4.4.5 failed.
* Call stack:
*               ebuild.sh, line   49:  Called src_compile
*             environment, line 4719:  Called toolchain_src_compile
*             environment, line 5314:  Called gcc_src_compile
*             environment, line 2930:  Called gcc_do_configure
*             environment, line 2643:  Called die
* The specific snippet of code:
*       "${S}"/configure "$@" || die "failed to run configure";
*  The die message:
*   failed to run configure
* 
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.4.5/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.4.5/temp/environment'.
*
...and I get confused because I can't see what the hell's gone wrong - any assistance gratefully accepted!

I know it's failing at this point:
Code:
checking for C compiler default output file name... configure: error: in `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build':
configure: error: C compiler cannot create executables
but what's made it happen that way?
 
Old 06-14-2011, 12:14 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
This is an old thread, but it has new posts at the end.


"C compiler cannot create executables" !??!

http://forums.gentoo.org/viewtopic-t...xecutable.html
 
1 members found this post helpful.
Old 06-15-2011, 02:22 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,049

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Quote:
Originally Posted by MarcusWebb1966 View Post
Ok it all started when I found out that the server was 186 days since its last emerge --sync. So I did this.

Then I was told to emerge portage. This failed because it said there was a dependency on python. 'No problem' I thought, I'll just emerge python. But that wouldn't emerge without portage being updated.
This can happen in outdated systems. When this happens you have to emerge a middle version of portage or python, to solve the conflict, then try again to update the other package.

In portage, you can do

Code:
emerge =<package_name>-<version>
to get a concrete version of a given package.

[quote]

Quote:
I then went to emerge --nodep python and that blew up telling me I had incorrect version of the compiler selected (64-bit edition, when the system's 32 bit). Changed the CHOST, CFLAGS, CBUILD, and CTARGET to be i686-pc-linux-gnu as opposed to x86_64-amd-linux-gnu and went to recompile.
When you change CFLAGS and start getting errors like this:

Code:
configure: error: C compiler cannot create executables
Then it's time to double look at them. The error is probably in your CFLAGS.
 
1 members found this post helpful.
Old 06-15-2011, 05:25 AM   #4
MarcusWebb1966
Member
 
Registered: Mar 2011
Posts: 58

Original Poster
Rep: Reputation: 0
thanks i92guboj and andrewthomas for prompt and useful responses. I'm plowing through the marathon that is andrewthomas' link (I'd already been there and tried some of that, but a more thorough and methodical approach is clearly called for!)

i92guboj - the reason for changes to CFLAGS and related environment variables is due to this link posted by andrewthomas. Most of our servers are normally 64-bit but this one was 32-bit. God knows why, but there we go. Those variables were clearly wrong so I amended CFLAGS and they all followed suit. I've tried "O2 -march=native -pipe" and "" for CFLAGS with no particular joy.

Also to update you:
  1. fix_libtool_files.sh made no difference even trying the --oldarch flag to get that cleared
  2. binutils-config seems to be missing any profile at all (so that's the next one for me to check out)
  3. binutils-config -l returns [1] x86_64-pc-linux-gnu *
  4. binutils-config -c returns "* binutils-config: No binutils profile is active! is invalid (no $TARGET defined) : ("

My make.conf
Code:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-O2 -pipe -march=i686"
#CFLAGS=""
CXXFLAGS="${CFLAGS}"
# This should not be changed unless you know exactly what you are doing.  You
# should probably be using a different stage, instead.
CHOST="i686-pc-linux-gnu"
MAKEOPTS="-j1"
PORTAGE_NICENESS=5
USE="-mysql -postgres -perl ssl -apache2 -curl -gd -gdbm jpeg -pdflib -png -tiff -freetds -X -gnome -gtk -gtk2 -kde -oss -
alsa -qt -truetype -ipv6 -cups -sdl urandom"
#PORTDIR_OVERLAY="/usr/local/overlay"
APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file
authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock dbd
 deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_
cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling stat
us unique_id userdir usertrack vhost_alias"
# This will select the correct version of PECL modules etc
PHP_TARGETS="php5-2"

If anyone has any blinding inspirational flashes to add to this thread I will of course be grateful. In the meantime if you're looking for me I'm mid-way through page 4 of andrewthomas' link... and then I'm diving headfirst into understanding binutils!

Last edited by MarcusWebb1966; 06-15-2011 at 05:59 AM. Reason: completeness
 
Old 06-15-2011, 01:01 PM   #5
MarcusWebb1966
Member
 
Registered: Mar 2011
Posts: 58

Original Poster
Rep: Reputation: 0
seriously this has gone way beyond being a joke now - I'll fill you in.

I got a little sidetracked off the thread by page 6 and searched another response, to find that someone suggested putting the stage 3 tarball back in place and then doing an
Code:
emerge --sync
followed by
Code:
FEATURES="-sandbox" emerge --nodep gcc
Well, I did that, which was to be followed by a
Code:
FEATURES="-sandbox" emerge --nodep glibc
but when I tried that - AAARGGH!! - even worse:
Code:
/usr/bin/emerge: python not found
So, I tried env-update
(not found)
source /etc/profile
(not found)
env-update
(not found)
ls
(not found)
su
(not found)

... in other words a truly b0rked looking system!

So I thought I'd log off and log on again

Now I get
Code:
Disconnected: No supported authentication methods available
no matter where I try to log on from. Before I bite the bullet and reboot, then probably totally rebuild the system from scratch (which is looking more and more likely every passing minute), can anyone think of anything to try to get me back in to this box?

Last edited by MarcusWebb1966; 06-15-2011 at 01:02 PM. Reason: for completeness again
 
Old 06-15-2011, 01:09 PM   #6
MarcusWebb1966
Member
 
Registered: Mar 2011
Posts: 58

Original Poster
Rep: Reputation: 0
UPDATE:

We also remotely monitor this box from another one and this had SSL authentication as opposed to password authentication for an extremely underprivileged account - I just tried getting access via that one oand I get [CODE]Permission denied (publickey,keyboard-interactive) which only adds to my woes I guess.

Feel free to sympathise at any point!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cant emerge samba : Failed to emerge sys-libs/tdb-1.2.1 Adol Gentoo 2 03-09-2011 12:51 PM
checking for C compiler default output... configure: error: C compiler cannot create clubbing80s Linux - Software 3 07-05-2010 09:17 PM
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 01:35 PM
Gentoo: emerge libgksu failed - error: C compiler cannot create executables Thaidog Gentoo 1 06-03-2009 12:27 PM
emerge error ? shanenin Linux - Software 0 01-06-2004 01:56 PM


All times are GMT -5. The time now is 05:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration