LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-03-2006, 04:34 AM   #1
sharathg786
Member
 
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167

Rep: Reputation: 30
Unhappy slack 10.2 cannot compile c/c++ programs


Hi, i'm a linux newbie, plz help me with this
I hav installed all the packages that comes with the 'd' folder but still i cannot compile any of c/c++ programs, it gives the following error:

Code:
pg1.c:1:18: stdio.h: No such file or directory
i even tried compiling by this command:
Code:
gcc -I /usr/include -o outfile pg1.c
still i get the same error & due to this i'm not able to install any applications (./configure->make->make install)
whenever i try to run configure, i get this:

Code:
bash-3.00$ ./configure
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for kde-config... /opt/kde/bin/kde-config
checking where to install... /opt/kde (as returned by kde-config)
checking for style of include used by make... GNU
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.
what should i do??

 
Old 08-03-2006, 05:16 AM   #2
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
When you installed slackware, which option did you choose? Did you do a 'Full' install (install everything without prompting), or did you choose 'newbie' or 'expert'? Because I assume you have some vital packages missing. It's probably a good idea to install everything to start with, and if necessary remove packages you don't use. A full install of 10.2 is about 3gb. You could also check your install disk to make sure it's ok, by running md5sum on your iso file.
 
Old 08-03-2006, 05:22 AM   #3
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
Good luck with Slackware.

Last edited by introuble; 08-04-2006 at 12:02 AM.
 
Old 08-03-2006, 05:38 AM   #4
sharathg786
Member
 
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167

Original Poster
Rep: Reputation: 30
i did an expert install (i feared any problems with lilo that's why) but i made sure that i installed every package that was listed.
and one more thing, i just remembered when i installed slack i got this error in the 'L' package:

Unable to install glibc-2.3.5-i486-5.tgz: tar archive is corrupt (tar returned error code 2)

is it this that's causing the problem

Last edited by sharathg786; 08-03-2006 at 05:57 AM.
 
Old 08-03-2006, 06:19 AM   #5
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Quote:
Originally Posted by sharathg786

Unable to install glibc-2.3.5-i486-5.tgz: tar archive is corrupt (tar returned error code 2)

is it this that's causing the problem
Yes. If you don't have glibc you won't be able to compile anything. It contains all the c libraries. You probably have a bad install disk. I can only advise downloading or obtaining a new one. If you still have your original .iso file which you burnt the disk from, you could do a md5sum check on it, and then try burning a new disk. Make sure you choose a slow burn speed, and don't have any other programs running while it's burning. If the program is forced to pause at all it can make a bad disk.

You could alternatively just try installing glibc-2.3.5-i486-5.tgz from the slackware site. It might work.
 
Old 08-03-2006, 06:55 AM   #6
sharathg786
Member
 
Registered: Sep 2005
Location: India
Distribution: Slackware, Back|track, Fedora, ubuntu
Posts: 167

Original Poster
Rep: Reputation: 30
thanx, i downloaded the package from the slack site & it works!
 
Old 08-03-2006, 12:19 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,155
Blog Entries: 54

Rep: Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794Reputation: 2794
@Introuble:
Quote:
Originally Posted by introuble
Ok.. you're a linux newbie .. what the heck are you doing using Slackware?
As moderator I'm asking you to please contribute to maintaining a friendly and welcoming atmosphere at LQ for everyone by making constructive and helpful posts else don't reply at all and move on to another thread.
Thanks in advance.

//If you feel the need to discuss this you are invited to take it up with me by email.
 
  


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
cannot compile c programs umeshpandey007 Linux - Newbie 7 08-29-2005 09:19 PM
how to compile c++ programs in 10.1 official msalimane Mandriva 2 12-07-2004 12:30 PM
Certain programs won't compile thegeekster Linux - Software 2 01-15-2004 06:25 AM
how to compile opengl programs rsingh Linux - Newbie 2 01-02-2004 01:23 PM
slack 9 with NVidia drivers; cannot compile opengl programs gunter Slackware 5 07-12-2003 11:35 AM


All times are GMT -5. The time now is 06:26 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration