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.
Hello everybody
I've got a problem with compiling applications from sources. Whenever I try to run ./configure on diffrent sources (I tried to compile ettercap, geoIP, aMule etc.), an error message shows:
Quote:
checking for C compiler default output file name... configure: error: C compiler cannot create executables
.
Config.log says:
Quote:
(...) configure:963: checking for gcc
configure:1076: checking whether the C compiler (gcc -march=athlon-tbird -mcpu=athlon-tbird -Os -s -pipe -fomit-frame-pointer -DNDEBUG -DG_DISABLE_ASSERT /usr/local/lib) works
configure:1092: gcc -o conftest -march=athlon-tbird -mcpu=athlon-tbird -Os -s -pipe -fomit-frame-pointer -DNDEBUG -DG_DISABLE_ASSERT /usr/local/lib conftest.c 1>&5
/usr/local/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
configure: failed program was:
#line 1087 "configure"
#include "confdefs.h"
What's the problem? A few days before I was able to compile applications - everything was allright. But then I started to update my MandrakeLinux 10 (by Mandrake update program) and - as you see - gcc crashed... (But I don't remember if gcc was updated - I selected all available updates and installed them)
My gcc version is gcc (GCC) 3.3.2 (Mandrakelinux 10.0 3.3.2-7mdk).
I found your post when searching google unsuccessfully for an answer when I got the same error.
It seems likely to me that you have the same cause since I have never seen that error before.
I had the same exact problem when trying to build a program a few days ago. The source was located on an external IDE USB drive (ext3 partition) I had mounted as /dev/sda1 and then cd'd into the source directory.
The problem disappeared when I moved the source directory off the external drive and onto my main hard disk (into /usr/local). It immediately built with no problem.
Now I seem to remember somewhere about a setting (possibly a switch for the mount command?) that would not let you execute binaries on the IDE drive. Since I only use it for mass storage normally I never came upon the problem until now.
So, the problem is likely execute permissions on your media.. try to move the source folder to your internal hard disk if it is not there, and check permissions on it. Were you building on an externally mounted drive?
Another possibility I just again when looking at Google, soeone with this problem on Max OSX had to redownload and reinstall gcc. With Apple they needed the Developer Tools cd also reinstalled. For your installation it might mean you are missing developer tools rpms or have messed it up somehow. If you don't build much or messed around recently with your system badly this could be it, but first try the idea above please.
masand: Yes, I ran it and everything was ok. I don't know C language, could you write me something? I would try to compile it.
mrosin: I store my source files on main hard disk, on the partition where linux is installed (ext3)... I'm not able to move it to an another media, becouse I haven't got any
In the answer of the second part of your post - I only ran Mandrake update and I didn't make any other changes in my system... Before it everything was allright - I had been able to compile sources and I had had compiled many applications....
gcc -o conftest -march=athlon-tbird -mcpu=athlon-tbird -Os -s -pipe -fomit-frame-pointer -DNDEBUG -DG_DISABLE_ASSERT /usr/local/lib conftest.c >&5 /usr/local/lib: file not recognized: Is a directory
-the file path given to gcc is '/usr/local/lib conftest.c' - shouldn't it be 'usr/local/lib/conftest.c' (without a blank space between '/usr/local/lib' and 'conftest.c')??
edited: SORRY for the double post! read the last one
hi there
here is the C program
-------------------------------------------------------------------------------
#include<stdio.h>
void main()
{
printf("the C program is working");
}
----------------------------------------------------------------------
Originally posted by eomerek But take look at this (from config.log):
-the file path given to gcc is '/usr/local/lib conftest.c' - shouldn't it be 'usr/local/lib/conftest.c' (without a blank space between '/usr/local/lib' and 'conftest.c')??
edited: SORRY for the double post! read the last one
hi there
i thought u figured out u r problem from the above post of yours
haven't u ????
maybe since it is not able to find the source file so it is giving the message cannot create executable
Try changing the configuration file (I'm not sure what file it is, you never specified what you're trying to install / configure) to what you pointed out. The problem seems to be right here...
Quote:
/usr/local/lib conftest.c 1>&5
/usr/local/lib: file not recognized: Is a directory
Like you posted before. You just have to fix that problem by manually fixing it I'd guess.
If you don't know what file it is in (it should just be in the configuration file) do this inside of the install
directory:
Quote:
$ cat -n configure | grep "conftest.c" >> tmp.txt
Hopefully 'configure' is the file name for the configuration file. If not, just write that out with the configuration files name... you should be able find the line that it's on. (Just make sure you check tmp.txt.)
Then fire up vim and make chances accordingly.
I've looked in 'configure' file, but I haven't found anything what could help me...
Don't forget about one hing - is not important, which application you're trying to compile - in every case ./configure stops with message 'checking for C++ compiler default output... configure: error: C++ compiler cannot create executables' and config.log shows the same error with conftest.c...
When I try to reinstall gcc, during uninstallation of gcc an error message shows which says that many,many applications requires gcc (including XFree..)...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.