This is a discussion on Cannot run C compiled programs within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> For several days, when I try to run ./configure, I get the error below. Can anybody help? Possible leads: ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| For several days, when I try to run ./configure, I get the error below. Can anybody help? Possible leads: I recently installed Dropline Gnome. Also, I'm running Slackware Current, up to date. Here's the error: "checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile,use '--host'." Config.log has this under the Core Tests section: ==== begin config.log excerpt ==== 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. ==== end config.log excerpt ==== |
| |||
| rs <rsnidjik@gmx.co.uk> writes: > For several days, when I try to run ./configure, I get the error below. Can > anybody help? Possible leads: I recently installed Dropline Gnome. Also, > I'm running Slackware Current, up to date. > > Here's the error: > > "checking whether the C compiler works... configure: error: cannot run C > compiled programs. If you meant to cross compile,use '--host'." heh, that's a cool one... the C compiler produces programs that cannot run on the host that they are compiled on? ;-) > Config.log has this under the Core Tests section: > > ==== begin config.log excerpt ==== be honest: this isn't from config.log, is it? ;-P this is from the screen output from ./configure. config.log is much more elaborate. [...] > See `config.log' for more details. see? it'd be useful if you could post relevant sections of the actual config.log, but looking through this, there is already one thing that strikes me as odd: [...] > configure:2455: gcc -V </dev/null >&5 > gcc: `-V' option must have argument this shouldn't happen. do you get the same thing with any program you try to ./configure, or just one program in particular? -- Joost Kremers Life has its moments |
| |||
| No, I promise, this is really from the "Core tests" section of my config.log. Which other sections of config.log are relevant? I excerpted this section because it contained the error message that made to to the screen. And, yes, I get this same error message when I try to compile anything -- or at least the three progs I've tried to compile today as I've tried to troubleshoot this. I'd greatly appreciate any help. Yes, I'm a nooooooob. |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 rs wrote: > For several days, when I try to run ./configure, I get the error below. Can > anybody help? Possible leads: I recently installed Dropline Gnome. Also, > I'm running Slackware Current, up to date. > > Here's the error: > > "checking whether the C compiler works... configure: error: cannot run C > compiled programs. If you meant to cross compile,use '--host'." > > Config.log has this under the Core Tests section: > > ==== begin config.log excerpt ==== > 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 The above warning might be important. > 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'. In the configure:2481-to-configure:2533 test, the gcc compiler was asked to compile a program. This compile left a binary in the a.out file (a binary that might have a problem due to an unresolved entrypoint), which the test in configure:2538-to-configure:2556 tries to run. The configure:2538-to-configure:2556 test finds that the binary from configure:2481-to-configure:2533 fails to execute because of a SIGILL signal ("Illegal Instruction"). This is a clue that the compile didn't result in a binary that can be executed on your platform, and configure /assumes/ that this is because of the compiler being configured for cross-compilation to another processor platform. I have a hunch that the SIGILL is a result of the missing entrypoint; if the linker directs the default for that entrypoint to something that is not a legal instruction, a SIGILL will result. You probably should look into the configuration options and the application's install instructions, and see if the missing _start entrypoint can be resolved. > See `config.log' for more details. > ==== end config.log excerpt ==== > > - -- Lew Pitcher, IT Consultant, Enterprise Data Systems Enterprise Technology Solutions, TD Bank Financial Group (Opinions expressed here are my own, not my employer's) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) iD8DBQFBmgFGagVFX4UWr64RApzmAKDqtMlbd5TAlGimdLYACP fm/N6TUgCgo4fT tjp45AxdOLUgfqQlVe53LbQ= =lMlC -----END PGP SIGNATURE----- |
| |||
| Lew Pitcher <Lew.Pitcher@td.com> writes: > rs wrote: > The configure:2538-to-configure:2556 test finds that the binary from > configure:2481-to-configure:2533 fails to execute because of a SIGILL > signal ("Illegal Instruction"). could this also be the result of trying to run a binary optimized for a specific processor on the wrong architecture? to the OP, since you mentioned that you have this problem with any program you try to ./configure, do you have any CFLAGS and/or CXXFLAGS set? if so, unset them, and see what you get. -- Joost Kremers Life has its moments |
| |||
| rs <rsnidjik@gmx.co.uk> wrote: > For several days, when I try to run ./configure, I get the error below. Can > anybody help? Possible leads: I recently installed Dropline Gnome. Also, > I'm running Slackware Current, up to date. > > Here's the error: > > "checking whether the C compiler works... configure: error: cannot run C > compiled programs. If you meant to cross compile,use '--host'." Have you tried the very simple test: Write a 'hello world' program, compile and run it? Yours, Laurenz Albe |
| |||
| rs wrote: > And, yes, I get this same error message when I try to compile anything -- > or at least the three progs I've tried to compile today as I've tried to > troubleshoot this. Might you be compiling on a partition that is mounted with the "noexec" option? The "mount" command will tell you. Jeffrey |
| ||||
| rs wrote: > For several days, when I try to run ./configure, I get the error below. > Can anybody help? Possible leads: I recently installed Dropline Gnome. > Also, I'm running Slackware Current, up to date. > > Here's the error: > > "checking whether the C compiler works... configure: error: cannot run C > compiled programs. If you meant to cross compile,use '--host'." > > Config.log has this under the Core Tests section: [snip] Thanks, everyone, for the instructive comments. I especially appreciated the interpretation of the error messages. I finally got things back to normal by reinstalling the glibc package. Unfortunately, I was dumb enough to first uninstall it, crippling my system. I had to boot from the Slack installation CD and use pkgtool to reinstall glibc from a set of Current files that I had on my hard disk. So all is fine now. I'm not exactly sure how glibc related to the error, except that restoring it fixed things up again. |