LinuxQuestions.org
Visit Jeremy's Blog.
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 11-15-2004, 10:25 AM   #1
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Rep: Reputation: 31
can't configure - gcc problem?


For the past few days, I've been getting a certain error whenever I try to run the ./configure. It's happened on four different compilation attempts.

The error is:

Code:
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
In config.log, I have this on the Core tests section:

Code:
configure:2448: $? = 0
configure:2450: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4
configure:2453: $? = 0
configure:2455: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:2458: $? = 1
configure:2481: checking for C compiler default output file name
configure:2484: gcc    conftest.c  >&5
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000080481c0
configure:2487: $? = 0
configure:2533: result: a.out
configure:2538: checking whether the C compiler works
configure:2544: ./a.out
./configure: line 2545: 10561 Illegal instruction     ./$ac_file
configure:2547: $? = 132
configure:2556: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
What have I broken? Possible leads: I recently installed Dropline Gnome. Apart from that, I also am running Slackware Current.

Thanks. This has really got me stymied, and my Google searches have led nowhere (reinstall gcc, reinstall automake and autoconf, nothing seems to help).
 
Old 11-15-2004, 11:29 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Did you configure yourself your kernel ?

What is the output for : (where .config is your kernel config)

cd /kernel_tree
grep -i bin .config
 
Old 11-15-2004, 11:35 AM   #3
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
ex'cs me if i'm wrong, but didn't you recently try ou t " distcc " for compiling on a network ?

egag

Last edited by egag; 11-15-2004 at 11:44 AM.
 
Old 11-15-2004, 11:39 AM   #4
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
Yes, I did compile my own 2.6.9 kernel. I think I'll reboot into 2.2.x (the stock kernel that came with Slack 10) and see if this happens. Glad you mentioned this.

Here's what happened when I issued the grep command you suggested:

#cd /usr/src/linux (right?)
grep -i bin .config

CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_MISC=y

Does this shed any light?

Thanks a lot for your help.
 
Old 11-15-2004, 11:40 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Would also be good to know what the optimization
flags are that you chose/use... if, for example, you
compiled for a PIV while in fact you're on a PIII you
may come across op-codes that the PIII can't handle.

I've seen similar things on a SuSE install (supposedly
PIV capable, oldest release [Server 7]) falling over on
a HT PIV 2.6GHz ...


Cheers,
Tink
 
Old 11-15-2004, 11:42 AM   #6
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
You have to recompile your kernel with CONFIG_BINFMT_AOUT feature built-in, if not most C compilations won't
work.
 
Old 11-15-2004, 12:08 PM   #7
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
egag: Yes, I was asking about shared compiling, and I fetched distcc after it was recommended. I'm going to try it on my next major compile (which may be coming up sooner than I'd thought ...).

Tinkster: I believe I did choose the right CPU optimization options: PIII, in my case.

Cedrik: For real? A recompile of the kernel? I checked the stock kernel and it has the same CONFIG_BINFMT_AOUT setting. But I guess I'll try a recompile, anyway, since I wanted to experiment with distcc and (the real reason) I wanna get Tux back.

Thanks, guys (gals? don't wanna make assumptions here).
 
Old 11-15-2004, 01:31 PM   #8
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
Umm. Uncool.

I decided to go ahead and recompile my 2.6.9 kernel to include the CONFIG_BINFMT_AOUT feature, following Cedrik's suggestion. Big problem: I'm getting a possibly related error messages when I do "make xconfig" from /usr/src/linux. (Same with "make oldconfig", "make menuconfig", etc.).

The error is:

Code:
   HOSTCC scripts/basic/fixdep
/usr/lib/gcc-lib/i486-slackware-linux/3.3.4/../../../../i486-slackware-linux/bin/
/ld: warning: cannot find entry symbol _start; defaulting to 0000000000485d0
/bin/sh: line 1:  4917 Illegal instruction   scripts/basic/fixdep scripts/basic/ ./fixdep.d
scripts/basic/fixdep 'gcc -Wp,-MD,scripts/basic/.fixdep.d -Wall -Wstrict-prototypes
-02 -fomit-frame-pointer  -o scripts/basic/fixdep scripts/basic/fixdep.c' >scripts/basic/.fixdep.tmp
make[1]: *** [scripts/basic/fixdep] Error 132
make: *** [scripts_basic] Error 2
Before running "make xconfig", I did "make mrproper". I then made sure my old .config file was in place, as I'm going to use that as a starting place.

Any clues? Thanks very much for any help.
 
Old 11-15-2004, 03:27 PM   #9
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I would be suprised if the stock kernel has not the feature CONFIG_BINFMT_AOUT set... it is needed to run the a.out
style binaries.

Did you try your make xconfig from the stock kernel running ?
One curious thing remains though from your errors...

./configure: line 2545: 10561 Illegal instruction ./$ac_file
/bin/sh: line 1: 4917 Illegal instruction scripts/basic/fixdep scripts/basic/ ./fixdep.d

It seems that your system does not like to ./ executable files

Last edited by Cedrik; 11-15-2004 at 03:31 PM.
 
Old 11-15-2004, 04:41 PM   #10
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by Cedrik
I would be suprised if the stock kernel has not the feature CONFIG_BINFMT_AOUT set... it is needed to run the a.out
style binaries.

Did you try your make xconfig from the stock kernel running ?


Yes, I tried it with both my original 2.4.26 kernel and with my 2.6.9 kernel. Identical result.


Quote:
One curious thing remains though from your errors...

./configure: line 2545: 10561 Illegal instruction ./$ac_file
/bin/sh: line 1: 4917 Illegal instruction scripts/basic/fixdep scripts/basic/ ./fixdep.d

It seems that your system does not like to ./ executable files
I'm getting worried. I'm wondering if I've seriously mucked things up somehow.

Sometimes I have weird permission problems. Could this be part of it? Any suggestions would be greatly appreciated. At least I have a running system, but I don't like to think I can't compile anymore!

Thanks very much.
 
Old 11-16-2004, 07:49 AM   #11
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
I know you guys have all been on pins and needles to know whether I've gotten this fixed :-] .

In fact, I have. I can now compile programs just fine. To fix the problem, I had to reinstall my glibc* packages. I don't know exactly which was the culprit, but everything is cool (for now, anyway).

Warning: Don't be as dumb as I was and just do "removepkg glibc*", thinking that you can turn right around and "installpkg glibc*". Removing glibc crippled my system, and I had to send up a distress call to this forum to find out how to reinstall it (see http://www.linuxquestions.org/questi...hreadid=255487 to read the exciting account).

I really appreciate this forum. I wish I didn't do so many dumb things, but maybe others will learn from my mistakes (I hope so, 'cause I'm apparently not ...).
 
Old 11-16-2004, 11:24 AM   #12
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
[post deleted by author]

Last edited by dhave; 11-16-2004 at 11:27 AM.
 
  


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
Problems with ./configure and gcc tur third Linux - Software 3 08-04-2005 03:11 AM
Error ./Configure GCC 3.4.4 D1G1T477 Linux - General 1 06-21-2005 10:29 AM
Problem with gcc: configure: error: C compiler cannot create executable abefroman SUSE / openSUSE 4 05-11-2005 06:12 PM
How to configure GCC? co2 Linux - Newbie 19 06-11-2004 04:06 AM
gcc configure error rl5 Linux From Scratch 2 03-31-2004 09:18 AM

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

All times are GMT -5. The time now is 07:29 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
Open Source Consulting | Domain Registration