LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-17-2007, 07:34 AM   #1
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Rep: Reputation: 32
can't compile; configure won't complete: "C compiler cannot create executables"


Ok I've tried to compile a couple of things (kaffeine, kipi-plugins) now after upgrading to gcc-4.1.2 and nothing gets past the configure:

Error in console:
Code:
user@hostname:/usr/local/kaffeine-0.8.3$ ./configure
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/ginstall -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for kde-config... /usr/bin/kde-config
checking where to install... /usr (as returned by kde-config)
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
Excerpt from config.log:
Code:
configure:3189: result: gcc
configure:3427: checking for C compiler version
configure:3434: gcc --version >&5
gcc (GCC) 4.1.2
Copyright (C) 2006 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:3437: $? = 0
configure:3444: gcc -v >&5
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.1.2/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.1.2/configure --prefix=/usr --enable-shared --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix
--enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.1.2
configure:3447: $? = 0
configure:3454: gcc -v >&5
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.1.2/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.1.2/configure --prefix=/usr --enable-shared --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix
--enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.1.2
configure:3457: $? = 0
configure:3480: checking for C compiler default output file name
configure:3507: gcc     conftest.c  >&5
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../../i486-slackware-linux/bin/ld:/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../libc.so: fi
le format not recognized; treating as linker script
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../../i486-slackware-linux/bin/ld:/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../libc.so:5:
parse error
collect2: ld returned 1 exit status
configure:3510: $? = 1
configure: failed program was:
| /* confdefs.h.  */
This is the "C compiler cannot create executables" error that there are a lot of threads on (eg http://www.linuxquestions.org/questi...readid=321150). Most seem to have distro specific fixes in them though.

I've tried, clearing LDFLAGS (nothing was set). Looking blankly at /etc/ld.so.conf (seemed fine to me and as you can see in the output the system is finding the 4.1.2 files). I've also tried reinstalling glibc-*.tgz packages.

Looking at the "configure" script the problem arises when the command
Code:
gcc -V </dev/null >&5
is issued.

Running gcc -V requires a number (eg 4.1.2).

I've also tried compiling a "hello world" that I found in another thread but this fails too:

Code:
gcc test.c -o test
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../../i486-slackware-linux/bin/ld:/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../libc.so: file format not recognized; treating as linker script
/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../../i486-slackware-linux/bin/ld:/usr/lib/gcc/i486-slackware-linux/4.1.2/../../../libc.so:5: parse error
collect2: ld returned 1 exit status
Code:
user@hostname:ll `locate libc.so`
lrwxrwxrwx 1 root root  11 2007-04-16 00:34 /lib/libc.so.6 -> libc-2.5.so*
lrwxrwxrwx 1 root root  13 2007-01-24 00:16 /lib/obsolete/tls/libc.so.6 -> libc-2.3.6.so*
-rw-r--r-- 1 root root 238 2006-12-21 19:51 /usr/lib/libc.so

Any thoughts on how to proceed?

Last edited by pbhj; 04-17-2007 at 07:44 AM.
 
Old 04-17-2007, 08:00 AM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Did you cherry pick gcc 4 from current? If yes, try upgrading the rest of your toolchain from current (glibc, binutils, headers) ... and probably the rest of the system too =)

If you self-compiled gcc: did you run the test suites after compilation?

- Piete.
 
Old 04-17-2007, 08:06 AM   #3
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Original Poster
Rep: Reputation: 32
I took gcc-4 and glibc-* and also upgrade binutils, and quite a lot of other stuff from current.

I didn't upgrade the headers, but then I've read elsewhere that this isn't a good idea (I'm running a self-compiled 2.6.16.13 kernel).

I've not gone the whole hog as I don't want to upgrade any Xorg stuff (which usually causes me problems).
 
Old 04-17-2007, 08:38 AM   #4
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Original Poster
Rep: Reputation: 32
I'm an idiot, I hadn't actually updated binutils ... whoops there goes a day I'll never get back again.
 
1 members found this post helpful.
Old 12-15-2010, 02:29 AM   #5
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 165
Blog Entries: 1

Rep: Reputation: 22
I was having the same problem on my Gentoo system. The box was very outdated so I had to manually update gcc from a precompiled package but even after doing that it would not "emerge gcc" to update the system using portage. I finally stumbled upon this after a couple of days that I also needed to update binutils from the latest precompiled package also.

Tips for updating old Gentoo systems.
http://blog.jolexa.net/2009/03/25/ge...-installation/
Code:
cd 

wget http://tinderbox.dev.gentoo.org/default-linux/x86/sys-devel/gcc-4.4.4-r2.tbz2
wget http://tinderbox.dev.gentoo.org/default-linux/x86/sys-devel/binutils-2.20.1-r1.tbz2

cd /

tar xfpj root/gcc-4.4.4-r2.tbz2
tar xfpj root/binutils-2.20.1-r1.tbz2
Then I was able to switch to the new binutils and finally begin updating the system with emerge.
Code:
eselect binutils list
eselect binutils set 2
env-update
source /etc/profile

Last edited by yaplej; 12-15-2010 at 02:34 AM.
 
Old 12-15-2010, 06:59 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
This is Slackware forum, we do not care about Gentoo... and please do not resurrect a thread that has been dead for three and a half year!

Eric
 
  


Reply

Tags
gcc412, slackware



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
error: "c compiler cannot create executables" when trying to run ./configure fedoraemu Linux - Software 2 04-24-2007 07:43 PM
"c compiler cannot create executables" error Peter Cooper Ubuntu 6 10-21-2006 03:20 PM
configure: error: C compiler cannot create executables redsnapperke Linux - Software 11 06-05-2006 08:10 AM
Cannot compile Seamonkey: "cannot create executables" yozhhh Linux - Software 0 12-29-2005 09:11 AM
snort compile errors "C compiler cannot create executables" RKris Linux - Software 2 11-07-2003 02:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:44 PM.

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
Open Source Consulting | Domain Registration