LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gcc 4:4.1.1-15 (Debian 4.0 r4a_Etch) cannot find include files. No man pages. (https://www.linuxquestions.org/questions/linux-newbie-8/gcc-4-4-1-1-15-debian-4-0-r4a_etch-cannot-find-include-files-no-man-pages-724426/)

somdeb 05-07-2009 11:00 AM

gcc 4:4.1.1-15 (Debian 4.0 r4a_Etch) cannot find include files. No man pages.
 
hi,
I have recently installed gcc on my box.

however:
1. Man pages do not seem to have been installed / set up correctly.
man gcc returns not found.

2. code cannot be compiled as header files seem to be not found.

please help.


The Code :
Code:

#include <stdio.h>
int main()
{
        printf("Hello world\n");
        return 0;
}

Compilation :
Code:

roy@somdeb:~/shacles/comp$ gcc -o hello -c hello.c
hello.c:1:19: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:4: warning: incompatible implicit declaration of built-in function ‘printf’

Installed files as listed by synaptic
Code:

/.
/usr
/usr/bin
/usr/bin/c89-gcc
/usr/bin/c99-gcc
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/c99-gcc.1.gz
/usr/share/man/man1/c89-gcc.1.gz
/usr/share/doc
/usr/share/doc/cpp
/usr/bin/gcov
/usr/bin/gccbug
/usr/bin/i486-linux-gnu-gcc
/usr/bin/gcc
/usr/share/man/man1/gccbug.1.gz
/usr/share/doc/cpp/README.Bugs
/usr/share/doc/cpp/FAQ.gz
/usr/share/doc/gcc

Thanks,
somdeb

farslayer 05-07-2009 11:27 AM

from the available options to obtain this file.. http://packages.debian.org/search?se...table&arch=any
I would recommend trying libc6-dev first

aptitude install libc6-dev


had you installed the metapackage build-essential to setup your compile environment i think you would have got libc6-dev automatically.. jsut fyi.
http://packages.debian.org/lenny/build-essential

jdkaye 05-07-2009 11:39 AM

For the documentation, install the gcc-doc and gcc-doc-base packages.
cheers,
jdk

somdeb 05-07-2009 12:23 PM

@farslayer:

just Installed libc6-dev. It compiles fine now. Thank you.



@jdkaye

Downloaded and installed

gcc-doc_2_i386
gcc-4.3-doc_4.3.2.nf1-1_all
gcc-doc-base_4.3.2.nf1-1_all

Could access the man pages now. Thank you.


1. I wonder why the above doc packages were not listed by Synaptic under
available packages -- are they not standard part of the distro?

2. How may i go about installing packages downloaded from the Internet using Synaptic. I had to install the above using "Gdebi" one by one
in order of their dependencies ?

Thanks and regards

Somdeb

farslayer 05-07-2009 01:20 PM

Synaptic probably lists them under documentation or some such,.. who knows ?
I can never find anything in the synaptic GUI that I can't locate using the command line 50 times faster..The command line is so much easier..

Code:

it-lenny:~# aptitude search gcc | grep doc

p  gcc-4.1-doc                    - documentation for the GNU compilers (gcc,
p  gcc-4.2-doc                    - documentation for the GNU compilers (gcc,
p  gcc-4.3-doc                    - documentation for the GNU compilers (gcc,
p  gcc-doc                        - documentation for the GNU compilers (gcc,
p  gcc-doc-base                    - several GNU manual pages     

it-lenny:~# aptitude install gcc-doc gcc-doc-base gcc-4.3-doc

http://algebraicthunk.net/~dburrows/.../rn01re01.html


Wierd Synaptic shows them under Documentation (Contrib) and Documentation (non-free) do you have contrib and non-free in your sources.list ?


All times are GMT -5. The time now is 04:13 PM.