LinuxQuestions.org
Help answer threads with 0 replies.
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 01-27-2004, 11:55 AM   #1
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Rep: Reputation: 30
Exclamation cannot run C compiled programs


Ok not sure about this one, and I have no clue what i did to get this...

went to compile kismet, which I had just done like 10 minutes before before my ssh connection to my laptop locked up. Now I go back in, after installing a package of expat I made and I get this when I run ./configure on kismet..

Code:
root@flux:/home/astro/kismet-3.0.1# ./configure --with-ethereal=/usr/local/ethereal-0.10.0a
checking build system type... ./config.guess: line 1164:  2622 Illegal instruction     ./$dummy "${UNAME_MACHINE}"
i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Where'd this come from?? config.log shows this...

Code:
configure:1714: $? = 1
configure:1738: checking for C compiler default output
configure:1741: gcc    conftest.c  >&5
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/bin/ld: warning: cannot find entry symbol _start; defau
configure:1744: $? = 0
configure:1790: result: a.out
configure:1795: checking whether the C compiler works
configure:1801: ./a.out
./configure: line 1:  2691 Illegal instruction     ./$ac_file
configure:1804: $? = 132
configure:1813: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
 
Old 01-27-2004, 02:17 PM   #2
quietguy47
Member
 
Registered: Mar 2003
Location: Everett
Distribution: Slackware
Posts: 805

Rep: Reputation: 35
Have you tried reinstalling gcc?
http://www.slackware.org/pb/?vers=sl...c-3.3.2-i486-1
 
Old 01-27-2004, 07:26 PM   #3
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Original Poster
Rep: Reputation: 30
Reinstalled gcc and a lot of the D directory, still have the same error... any other ideas?
 
Old 01-27-2004, 08:38 PM   #4
notAcoolNick
Member
 
Registered: Apr 2003
Location: Oxford, MA, USA
Distribution: Slackware
Posts: 89

Rep: Reputation: 16
question #1: what does config.log actually say? it should be in the same dir as configure script.

question #2: did you try to compile simple "Hello World" c-program in verbose mode (-v switch for gcc) and see what happens.

question #3: are you sure it is actually compiler problem anyway. may be it is something else (loog the log again) may be configure script is messed up. in teh log you are supposed to see actual test code that should be compiled check it out may be you'll see some oddities.

good luck,
nick
 
Old 01-27-2004, 08:49 PM   #5
notAcoolNick
Member
 
Registered: Apr 2003
Location: Oxford, MA, USA
Distribution: Slackware
Posts: 89

Rep: Reputation: 16
also, looking on the ./configure output that you've provided check in configure script what is UNAME_MACHINE and what the hell is $dummy

also, if test programm (a.out) is still there do:
file a.out
to see what type of executable.

also check any documentation that came with source if it says anything about version of autoconfigure that it was used.

my guess is that it's not compiler's fault. it's just configure script cannot recognize whot type of system you have.

cheers,
nick.
 
Old 01-27-2004, 09:23 PM   #6
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Original Poster
Rep: Reputation: 30
ok heres something interesting....
Code:
a.c:

#include <stdio.h>

main()
{
  for(;;)
      { 
          printf ("Hello World!\n");
      }
}
then I get this
Code:
root@flux:/home/astro# gcc -o a a.c
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000080481e0
output of -v
Code:
root@flux:/home/astro# gcc -v -o a a.c
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/specs
Configured with: ../gcc-3.2.3/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.2.3
 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/cc1 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i486__ a.c -quiet -dumpbase a.c -version -o /tmp/cciJkTMo.s
GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF)
GNU C version 3.2.3 (i486-slackware-linux)
        compiled by GNU C version 3.2.3.
ignoring nonexistent directory "/usr/i486-slackware-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/bin/as -V -Qy -o /tmp/cckRY7yH.o /tmp/cciJkTMo.s
GNU assembler version 2.14.90.0.6 (i486-slackware-linux) using BFD version 2.14.90.0.6 20030820
 /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../crt1.o /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../crti.o /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/crtbegin.o -L/usr/lib/gcc-lib/i486-slackware-linux/3.2.3 -L/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/lib -L/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../.. /tmp/cckRY7yH.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/crtend.o /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../crtn.o
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000080481e0

Last edited by Astro; 01-27-2004 at 09:25 PM.
 
Old 01-27-2004, 09:53 PM   #7
notAcoolNick
Member
 
Registered: Apr 2003
Location: Oxford, MA, USA
Distribution: Slackware
Posts: 89

Rep: Reputation: 16
uh...
ok now the question is which part linker did not like (btw on my box your stuff went through with no probs).
well...
if gcc -v -o a.o -c a.c goes without problems and comand: "file a.o" says that it is "a.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV)" i'd start blaming either glibc or one of those object files in /usr/lib/gcc-lib/i486-slackware-linux/3.2.3.

i've seen this error before with some closed source library (static).
 
Old 01-27-2004, 10:32 PM   #8
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665

Original Poster
Rep: Reputation: 30
Ok Problem solved.... I orignally tried to make a package of a newer version of Expat, a C library for parsing XML... and apparently didn't do it right... thats what was causing that error.... Now what remains is to find a good how-to for making packages for slackware that actually works...cause the one I followed didn't. Thanks for the help notAcoolNick
 
  


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
C compiler cannot run C compiled programs petero Programming 8 05-27-2005 11:35 AM
How to remove compiled programs? piggysmile Linux - Software 2 03-22-2005 05:25 AM
error: cannot run C compiled programs. terry.trent Linux - Newbie 6 08-05-2004 11:07 PM
why ./ is used to run C++ compiled programs legend1079 Red Hat 4 03-23-2004 06:32 AM
"Can't run C compiled programs" on clean RH9 install smirnoff Linux - Newbie 8 03-16-2004 03:11 PM

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

All times are GMT -5. The time now is 11:10 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