LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-16-2007, 09:32 AM   #1
Alexandra_C
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: Mandriva 2006
Posts: 14

Rep: Reputation: 0
onfigure: error: C compiler cannot create executables


Hello everybody!
I'm trying to install SDL 1.2.11 and mpeg4ip-1.5.0.1 on my Mandriva 2006. SDL is required by mpeg4ip.
When i try to ./configure SDL, i get the error:
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
I have gcc-4.1.1 on my system and when i try to compile a simple C program, i get a lot of errors:
error: stdio.h: No such file or directory
error: stdlib.h: No such file or directory
and many more.
What is the problem with the C compiler? Do i need another gcc version?

Thank you in advance!
 
Old 01-16-2007, 10:46 AM   #2
chadl
Member
 
Registered: Sep 2005
Location: US
Distribution: Gentoo AMD64 Testing
Posts: 129

Rep: Reputation: 16
It looks like you need to install one or both of the following packages:
* glibc-devel
* libstdc++-devel

These packages provide the headers for C/C++ development. Note that you also need gcc and gcc-c++, but from the looks of your error messages you already have them.
 
Old 01-17-2007, 03:06 AM   #3
Alexandra_C
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: Mandriva 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chadl
It looks like you need to install one or both of the following packages:
* glibc-devel
* libstdc++-devel

These packages provide the headers for C/C++ development. Note that you also need gcc and gcc-c++, but from the looks of your error messages you already have them.
Hello Chadl!
Thank you for your reply. I have followed your advice, but seems thet i already have these packages. Here is the output of my console:
urpmi glibc-devel
The following packages can't be installed because they depend on packages
that are older than the installed ones:
glibc-devel-2.3.5-5mdk
Continue? (Y/n) y
The package(s) are already installed
[root@alexandra alexandra]# urpmi libstdc++-devel
The package(s) are already installed
The following package names were assumed: libstdc++2.10-devel

When i try to install SDL, i get the same error:
./configure
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.


So, what can i do to fix this problem? What do i have to install?
 
Old 01-17-2007, 10:10 AM   #4
chadl
Member
 
Registered: Sep 2005
Location: US
Distribution: Gentoo AMD64 Testing
Posts: 129

Rep: Reputation: 16
If you already have the packages installed... then I am not sure why the system is claiming that it can not find stdio.h.

Try the following command to see if stdio.h exists, but the compiler is just not finding it:
Code:
find / -name stdio.h 2>/dev/null
On my system I have that file in /usr/include, among other places.
 
Old 01-18-2007, 02:59 AM   #5
Alexandra_C
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: Mandriva 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Hello Chadl!
i have done as you have said and seems like there are no such files. It didn't find anything...
That's weird... as i have said, i can't compile any C program, but if i try ti install another gcc package, i get the answer "package already installed".
Is it something wrong with the gcc version (4.1.1)?
 
Old 01-18-2007, 10:06 AM   #6
chadl
Member
 
Registered: Sep 2005
Location: US
Distribution: Gentoo AMD64 Testing
Posts: 129

Rep: Reputation: 16
I am using Gentoo with GCC 4.1.1 installed, and I have compiled more applications then I can name, without a problem.
I think that the problem must be in the fact that the C++ development libraries are not really installed, as if they were, then the header files would exist.

I can't think of too many other things to try, but you could try re-installing the C/C++ development package to see if it will copy the files.

I am sure that the header files could be found on the internet, so that they could be copied on to your system manually, but I am not sure if that would work or not.

If you run gcc -v you will get a bunch of information on gcc's version, where it is looking for assorted files, and the languages that it has enabled. This might put some light on the question of where it is looking for the header files. This would not directly fix the issue, but it would be interesting to know what other header files, if any, are in it's directory.

Last edited by chadl; 01-18-2007 at 10:11 AM.
 
Old 01-22-2007, 07:08 AM   #7
Alexandra_C
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: Mandriva 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Hello Chadl!
I have done as you said, here is the output of the command:
[root@alexandra alexandra]# gcc -v
Using built-in specs.
Target: i586-mandriva-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --host=i586-mandriva-linux-gnu --with-cpu=generic --with-system-zlib --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo --enable-ssp --disable-libssp
Thread model: posix
gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)


I took a look in the /usr/include/c++ directory and there are 2 directories here, 3.3.6 and 4.1.1. I have tried to uninstall gcc 4.1.1, but there are some dependencies that don't let me do it:
[root@alexandra alexandra]# rpm -e gcc-4.1.1
error: Failed dependencies:
devel(libgcc_s) is needed by (installed) libqt3-devel-3.3.4-23mdk.i586
devel(libgcc_s) is needed by (installed) libarts1-devel-1.4.2-2mdk.i586
devel(libgcc_s) is needed by (installed) libkdecore4-devel-3.4.2-31mdk.i586
devel(libgcc_s) is needed by (installed) libkdemultimedia1-common-devel-3.4.2-10mdk.i586
devel(libgcc_s) is needed by (installed) libpcre0-devel-6.3-1mdk.i586
devel(libgcc_s) is needed by (installed) libkdemultimedia1-noatun-devel-3.4.2-10mdk.i586
gcc = 4.1.1 is needed by (installed) libtool-1.5.20-9mdv2007.0.i586
gcc = 4.1.1-3mdk is needed by (installed) gcc-c++-4.1.1-3mdk.i586


What can i do in this situation? Uninstall gcc or upgrade?
 
Old 01-22-2007, 08:45 AM   #8
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
Upgrade to what?

The dependencies you listed are only devel packages. Nothing that should harm your system. You probably can reinstall them later (yes, it is annoying). Are you sure there is not a second compiler around? Use MCC -> uninstall and see what gcc gives as search result. Uninstall all compilers installed and reinstall them with the two packages chadl mentioned (reinstall those two too).
 
Old 01-23-2007, 09:15 AM   #9
Alexandra_C
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: Mandriva 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Hello!
I have uninstalled all the compilers and now i try to reinstall gcc 4.1.1. After untarring the bz archive, i typed "./configure" and here is the output:
./configure
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
I have configured the PATH variable in the .bashrc file like this:
export PATH=$PATH:/home/alexandra/Desktop/Programe instalate/gcc-4.1.1


Why do i get the error "no acdeptable cc found in $PATH"? I have another PATH set for netsim, a network simulator which i use for a project. Then how do i manage with these two variables?
Regards, Alexandra
 
Old 01-23-2007, 09:58 AM   #10
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
Quote:
Why do i get the error "no acdeptable cc found in $PATH"? I have another PATH set for netsim, a network simulator which i use for a project. Then how do i manage with these two variables?
Easy: You need a compiler for compiling a ... compiler ... and you have uninstalled them.

Before doing anything, uninstall the two offending packages:
* glibc-devel
* libstdc++-devel
and reinstall them (use the GUI tool). Then install gcc from GUI.

Then try to compile your programm again (not the compiler, it will only make some mess). Concerning "error: stdlib.h: No such file or directory": did you notice that nice option in the GUI where you can search for files in the software packages?

Last edited by hansalfredche; 01-23-2007 at 10:10 AM.
 
Old 01-24-2007, 06:12 AM   #11
Alexandra_C
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: Mandriva 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I have uninstalled the libstdc++-devel package you told me about and i have installed libstdc++2.10-devel. About glibc-devel-2.3.5-5mdk, it was already installed. I have downloaded the gcc-4.1.1 package from the gnu page, but what do you mean by "install gcc from GUI"? Is the console not a good choice?

I have set the PATH in the .bashrc file, like this:
export PATH=$PATH:/home/alexandra/gcc-4.1.1
This is the folder obtained after untarring the gcc archive.
I tried then to configure gcc, but i get the same error:
[alexandra@alexandra gcc-4.1.1]$ ./configure
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

Seems like the problem is the PATH variable...
I'm sorry for bugging you with this, but i don't know what is wrong and what i should do.... My UNIX knowledge is not very good
 
Old 01-24-2007, 08:26 AM   #12
hansalfredche
Member
 
Registered: Jun 2005
Posts: 445

Rep: Reputation: 31
Please read my previous mail, there is no problem with the Path (at least its not what causes the error):

Quote:
You need a compiler for compiling a ... compiler ... and you have uninstalled them.
Let's put it in some other way: you just downloaded the source code for your compiler. WHAT do you need to make binary code from THAT source? Getting it? No? Well, you need a compiler. WHERE is it now, that compiler you need? Well, it's not there, you uninstalled it. So, you have to get back a compiler in binary form and the easiest way of doing it is using some rpm tool.

Quote:
but what do you mean by "install gcc from GUI? Is the console not a good choice? "
I meant use the graphical package manager ("install software"). You can of course use urpmi if you want (does the same), but I don't use it. Just reinstall gcc and dependencies as well all packages you have uninstalled with urpmi/GUI.
 
Old 01-25-2007, 08:28 AM   #13
Alexandra_C
LQ Newbie
 
Registered: Oct 2006
Location: Romania
Distribution: Mandriva 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I have finally solved the problem.... thank you for your advice. I have cleaned up all the rpm media and then i have installed glibc-devel and gcc.
Thank God, that was it.
Sorry for all the trouble.
 
  


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 create executables ERROR jaisol Linux - General 1 08-02-2006 02:05 PM
error: C compiler cannot create executables lopette Linux - Software 4 09-10-2004 04:06 PM
Need help! error: C compiler cannot create executables Aioria Linux - Newbie 4 07-05-2004 01:15 AM
error: C compiler cannot create executables bublebboy Linux - Newbie 8 06-14-2004 10:38 PM
error: C compiler cannot create executables bublebboy Linux - Newbie 3 12-31-2003 11:31 AM

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

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