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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
03-15-2004, 10:17 PM
|
#1
|
LQ Newbie
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18
Rep:
|
"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
|
|
|
03-15-2004, 11:02 PM
|
#2
|
Member
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398
Rep:
|
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
|
|
|
03-16-2004, 01:18 AM
|
#3
|
LQ Newbie
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18
Original Poster
Rep:
|
[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.
|
|
|
03-16-2004, 08:14 AM
|
#4
|
Member
Registered: Jun 2002
Location: Australia
Distribution: Slack 9.1
Posts: 232
Rep:
|
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.
|
|
|
03-16-2004, 02:02 PM
|
#5
|
LQ Newbie
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18
Original Poster
Rep:
|
ok
does anyone know?
|
|
|
03-16-2004, 02:07 PM
|
#6
|
Member
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398
Rep:
|
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
|
|
|
03-16-2004, 02:17 PM
|
#7
|
LQ Newbie
Registered: Sep 2003
Location: ChCh, New Zeleand
Distribution: RH9
Posts: 18
Original Poster
Rep:
|
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
|
|
|
03-16-2004, 02:17 PM
|
#8
|
Member
Registered: Mar 2004
Location: Jeffersonville, IN
Distribution: Fedora 8 x86_64
Posts: 30
Rep:
|
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.
|
|
|
03-16-2004, 03:11 PM
|
#9
|
Member
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 398
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 02:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|