LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-15-2004, 10:17 PM   #1
smirnoff
LQ Newbie
 
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18

Rep: Reputation: 0
"Can't run C compiled programs" on clean RH9 install


Hi

I'm trying to install a package called libmad-0.15.0b from source
the installation instructions after extracting it from ...tar.gz are:

1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.

Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.

2. Type `make' to compile the package.

3. Optionally, type `make check' to run any self-tests that come with
the package.

4. Type `make install' to install the programs and any data files and
documentation.

I'm currently running a completely clean RH9 install on an athlon 2.4.20-8 kernel with all development packages installed (afaik). I have no problems compiling simple C code (such as #include <stdio.h> .... main() { printf("etc etc"); } ) with my gcc, so im assuming theres no problem with it.

However when i try running

$ sh ./configure

in the libmad dir, i get the following text:

[root@localhost libmad-0.15.0b]# sh ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... 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.


The coconfigure:2251: $? = 0
configure:2253: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
configure:2256: $? = 0
configure:2258: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:2261: $? = 1
configure:2285: checking for C compiler default output
configure:2288: gcc conftest.c >&5
configure:2291: $? = 0
configure:2337: result: a.out
configure:2342: checking whether the C compiler works
configure:2348: ./a.out
./configure: line 1: ./a.out: Permission denied
configure:2351: $? = 126
configure:2360: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.nfig.log file generated reads:


Help?

the same happens for the package id3lib-3.8.3 (these are both dependencies i need to install k3b burner), which has identical format as far as source install goes
 
Old 03-15-2004, 11:02 PM   #2
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
Probably haven't installed gcc or haven't got it on your path.

Enter
gcc --version

To check if I'm right.

Enter
echo $PATH

to see path
 
Old 03-16-2004, 01:18 AM   #3
smirnoff
LQ Newbie
 
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18

Original Poster
Rep: Reputation: 0
[rob@localhost rob]$ gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 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.

[rob@localhost rob]$ echo $PATH
/usr/local/j2sdk1.4.0_01/bin:/usr/local/j2sdk1.4.0_01/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/rob/bin

Looks like its installed. what is $PATH telling you?

I have compiled simple C programs with gcc.
 
Old 03-16-2004, 08:14 AM   #4
Pres
Member
 
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232

Rep: Reputation: 30
Quote:
configure:2285: checking for C compiler default output
configure:2288: gcc conftest.c >&5
configure:2291: $? = 0
configure:2337: result: a.out it works, it has compiled a.out
configure:2342: checking whether the C compiler works
configure:2348: ./a.out
./configure: line 1: ./a.out: Permission denied
configure:2351: $? = 126
configure:2360: error: cannot run C compiled programs.
That's a permission problem. I don't know why though.

Last edited by Pres; 03-16-2004 at 08:36 AM.
 
Old 03-16-2004, 02:02 PM   #5
smirnoff
LQ Newbie
 
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18

Original Poster
Rep: Reputation: 0
ok

does anyone know?
 
Old 03-16-2004, 02:07 PM   #6
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
Sorry, missed that permission denied bit.

Strange.

The only other odd things I can see is you running configure as root. That shouldn't be a problem, but generally the sequence is configure, make, su, make install, exit so you are root for less time. ie. Only do what you _have to_ as root, otherwise operate as a normal user.

Check that the directory it's working in is writable.

cd ..
ls -ld libmad-0.15.0b
 
Old 03-16-2004, 02:17 PM   #7
smirnoff
LQ Newbie
 
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18

Original Poster
Rep: Reputation: 0
got it working by moving the directory to $HOME. Before that it was in a fat32 drive (Could that have made the difference?)

before i moved it, ls - ld libmad-0.15.0b gave

[rob@localhost k3b_burner]$ ls -ld libmad-0.15.0b
drwxrwxr-x 3 rob rob 16384 Mar 16 17:16 libmad-0.15.0b
 
Old 03-16-2004, 02:17 PM   #8
ciaran_skye
Member
 
Registered: Mar 2004
Location: Jeffersonville, IN
Distribution: Fedora 8 x86_64
Posts: 30

Rep: Reputation: 15
Redhat puts three versions of automake (1.4, 1.5, and 1.6) in RH9. Delete all of them but 1.6 and it'll work perfect.
 
Old 03-16-2004, 03:11 PM   #9
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398

Rep: Reputation: 87
Ah! Fat32, it was the mounted drive. There is a mount option (exec) that says allow binaries to execute on this machine or not. (If you mount a windows box on a Linux machine, you don't want to try execute any .exe's.) If that fat32 partition had been mounted with exec instead of noexec option, it would have worked. (Well, at least you may have had a different problem)

Say "man mount' for more detail. Cat /etc/mtab to see what options are currently used.
 
  


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
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
what is difference between "reset" and "clean " commands? zameer_india Linux - Newbie 2 01-10-2005 06:23 AM
When "make install clean" ports fails everytime! Devboy *BSD 9 08-11-2004 07:46 PM
I've compiled and "make install" now what? jrembold Linux - Software 13 07-19-2004 11:13 PM
Help,I can't find my USB mouse when I run "kudzu" command in RH9. aeolus Red Hat 0 03-27-2004 09:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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