"Can't run C compiled programs" on clean RH9 install
Linux - NewbieThis 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.
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.
"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
[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.
configure:2285: checking for C compiler default output
configure:2288: gcc conftest.c >&5
configure:2291: $? = 0
configure:2337: result: a.outit 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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.