SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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
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 ...
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).
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.).
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!
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 ...).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.