Find the answer to your Linux question:
Results 1 to 7 of 7
I have gcc and development environment installed and working, except for the manpages for gcc -- how do I go about installing them? Thanks in advance....
  1. #1
    Linux Newbie
    Join Date
    Jul 2007
    Posts
    104

    Manpages for gcc?

    I have gcc and development environment installed and working, except for the manpages for gcc -- how do I go about installing them?

    Thanks in advance.

  2. #2
    Linux Newbie mazer's Avatar
    Join Date
    Jul 2006
    Location
    Tucson, Arizona, USA
    Posts
    109
    Quote Originally Posted by corge View Post
    I have gcc and development environment installed and working, except for the manpages for gcc -- how do I go about installing them?

    Thanks in advance.
    How did you install your gcc? Through a package of your distro or just by .tar.gz? What happens if you type
    Code:
    man gcc
    Do you get an
    Code:
    No manual entry for gcc
    If you install gcc through the package manager of you distro it should also install the manpages automatically. If you do it by hands you have to tell Linux to look into the correct path for the manpages. For example, I had ones an old intel compiler installed on my system. In order to see the manpages for the executables (compiler and so on) I had to write a manpage_map in the file /etc/man.config, which looked like
    Code:
    MANPATH_MAP    /opt/intel/compiler70/ia32/bin  /opt/intel/compiler70/man
    "/opt/intel/compiler70/ia32/bin" is the directory for the executables and "/opt/intel/compiler70/man" contains the manuals.

    Hope this helps,
    Mazer
    I was seduced by SUSE 5.1.
    Registered Linux User #451562

  3. #3
    Linux Newbie
    Join Date
    Jul 2007
    Posts
    104
    Quote Originally Posted by mazer View Post
    How did you install your gcc? Through a package of your distro or just by .tar.gz? What happens if you type
    Code:
    man gcc
    Do you get an
    Code:
    No manual entry for gcc
    If you install gcc through the package manager of you distro it should also install the manpages automatically. If you do it by hands you have to tell Linux to look into the correct path for the manpages. For example, I had ones an old intel compiler installed on my system. In order to see the manpages for the executables (compiler and so on) I had to write a manpage_map in the file /etc/man.config, which looked like
    Code:
    MANPATH_MAP    /opt/intel/compiler70/ia32/bin  /opt/intel/compiler70/man
    "/opt/intel/compiler70/ia32/bin" is the directory for the executables and "/opt/intel/compiler70/man" contains the manuals.

    Hope this helps,
    Mazer
    Hi, sorry for a very slow reply.
    I did install from packages with apt-get, however I do get the
    Code:
    No manual entry for gcc
    error when I attempt to do "man gcc".

  4. #4
    Linux Newbie mazer's Avatar
    Join Date
    Jul 2006
    Location
    Tucson, Arizona, USA
    Posts
    109
    Quote Originally Posted by corge View Post
    Hi, sorry for a very slow reply.
    I did install from packages with apt-get, however I do get the
    Code:
    No manual entry for gcc
    error when I attempt to do "man gcc".
    Can you posed your /etc/man.config file? Can you also check if you have the file "/usr/share/man/man1/gcc.1.gz"?

    Mazer
    I was seduced by SUSE 5.1.
    Registered Linux User #451562

  5. #5
    Linux Newbie
    Join Date
    Jul 2007
    Posts
    104
    I do not have "/usr/share/man/man1/gcc.1.gz".

    My manpath.config:

    Code:
    # manpath.config
    #
    # This file is used by the man-db package to configure the man and cat paths.
    # It is also used to provide a manpath for those without one by examining
    # their PATH environment variable. For details see the manpath(5) man page.
    #
    # Lines beginning with `#' are comments and are ignored. Any combination of
    # tabs or spaces may be used as `whitespace' separators.
    #
    # There are three mappings allowed in this file:
    # --------------------------------------------------------
    # MANDATORY_MANPATH			manpath_element
    # MANPATH_MAP		path_element	manpath_element
    # MANDB_MAP		global_manpath	[relative_catpath]
    #---------------------------------------------------------
    # every automatically generated MANPATH includes these fields
    #
    #MANDATORY_MANPATH 			/usr/src/pvm3/man
    #
    MANDATORY_MANPATH			/usr/man
    MANDATORY_MANPATH			/usr/share/man
    MANDATORY_MANPATH			/usr/X11R6/man
    MANDATORY_MANPATH			/usr/local/man
    #---------------------------------------------------------
    # set up PATH to MANPATH mapping
    # ie. what man tree holds man pages for what binary directory.
    #
    #		*PATH*        ->	*MANPATH*
    #
    MANPATH_MAP	/bin			/usr/share/man
    MANPATH_MAP	/usr/bin		/usr/share/man
    MANPATH_MAP	/sbin			/usr/share/man
    MANPATH_MAP	/usr/sbin		/usr/share/man
    MANPATH_MAP	/usr/local/bin		/usr/local/man
    MANPATH_MAP	/usr/local/bin		/usr/local/share/man
    MANPATH_MAP	/usr/local/sbin		/usr/local/man
    MANPATH_MAP	/usr/local/sbin		/usr/local/share/man
    MANPATH_MAP	/usr/X11R6/bin		/usr/X11R6/man
    MANPATH_MAP	/usr/bin/X11		/usr/X11R6/man
    MANPATH_MAP	/usr/games		/usr/share/man
    MANPATH_MAP	/opt/bin		/opt/man
    MANPATH_MAP	/opt/sbin		/opt/man
    #---------------------------------------------------------
    # For a manpath element to be treated as a system manpath (as most of those
    # above should normally be), it must be mentioned below. Each line may have
    # an optional extra string indicating the catpath associated with the
    # manpath. If no catpath string is used, the catpath will default to the
    # given manpath.
    #
    # You *must* provide all system manpaths, including manpaths for alternate
    # operating systems, locale specific manpaths, and combinations of both, if
    # they exist, otherwise the permissions of the user running man/mandb will
    # be used to manipulate the manual pages. Also, mandb will not initialise
    # the database cache for any manpaths not mentioned below unless explicitly
    # requested to do so.
    #
    # In a per-user configuration file, this directive only controls the
    # location of catpaths and the creation of database caches; it has no effect
    # on privileges.
    #
    # Any manpaths that are subdirectories of other manpaths must be mentioned
    # *before* the containing manpath. E.g. /usr/man/preformat must be listed
    # before /usr/man.
    #
    #		*MANPATH*     ->	*CATPATH*
    #
    MANDB_MAP	/usr/man		/var/cache/man/fsstnd
    MANDB_MAP	/usr/share/man		/var/cache/man
    MANDB_MAP	/usr/local/man		/var/cache/man/oldlocal
    MANDB_MAP	/usr/local/share/man	/var/cache/man/local
    MANDB_MAP	/usr/X11R6/man		/var/cache/man/X11R6
    MANDB_MAP	/opt/man		/var/cache/man/opt
    #
    #---------------------------------------------------------
    # Program definitions.  These are commented out by default as the value
    # of the definition is already the default.  To change: uncomment a
    # definition and modify it.
    #
    #DEFINE 	pager	/usr/bin/pager -s
    #DEFINE 	cat	/bin/cat
    #DEFINE 	tr	/usr/bin/tr '\255\267\264\327' '\055\157\047\170'
    #DEFINE		grep	/bin/grep
    #DEFINE 	troff 	/usr/bin/groff -mandoc
    #DEFINE 	nroff 	/usr/bin/nroff -mandoc
    #DEFINE 	eqn 	/usr/bin/eqn
    #DEFINE 	neqn	/usr/bin/neqn
    #DEFINE 	tbl 	/usr/bin/tbl
    #DEFINE 	col 	/usr/bin/col
    #DEFINE 	vgrind 	/usr/bin/vgrind
    #DEFINE 	refer 	/usr/bin/refer
    #DEFINE 	grap 	/usr/bin/grap
    #DEFINE 	pic 	/usr/bin/pic -S
    #
    #DEFINE		decompressor	/bin/gzip -dc
    #DEFINE		compressor	/bin/gzip -c7
    #---------------------------------------------------------
    # Misc definitions: same as program definitions above.
    #
    #DEFINE		whatis_grep_flags		-i
    #DEFINE		apropos_grep_flags		-iEw
    #DEFINE		apropos_regex_grep_flags	-iE
    #---------------------------------------------------------
    # Section names. Manual sections will be searched in the order listed here;
    # the default is 1, n, l, 8, 3, 2, 5, 4, 9, 6, 7. Multiple SECTION
    # directives may be given for clarity, and will be concatenated together in
    # the expected way.
    # If a particular extension is not in this list (say, 1mh), it will be
    # displayed with the rest of the section it belongs to. The effect of this
    # is that you only need to explicitly list extensions if you want to force a
    # particular order. Sections with extensions should usually be adjacent to
    # their main section (e.g. "1 1mh 8 ...").
    SECTION		1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7

  6. #6
    Linux Newbie mazer's Avatar
    Join Date
    Jul 2006
    Location
    Tucson, Arizona, USA
    Posts
    109
    Quote Originally Posted by corge View Post
    I do not have "/usr/share/man/man1/gcc.1.gz".

    My manpath.config:

    Code:
    # manpath.config
    #
    # This file is used by the man-db package to configure the man and cat paths.
    # It is also used to provide a manpath for those without one by examining
    # their PATH environment variable. For details see the manpath(5) man page.
    #
    # Lines beginning with `#' are comments and are ignored. Any combination of
    # tabs or spaces may be used as `whitespace' separators.
    #
    # There are three mappings allowed in this file:
    # --------------------------------------------------------
    # MANDATORY_MANPATH			manpath_element
    # MANPATH_MAP		path_element	manpath_element
    # MANDB_MAP		global_manpath	[relative_catpath]
    #---------------------------------------------------------
    # every automatically generated MANPATH includes these fields
    #
    #MANDATORY_MANPATH 			/usr/src/pvm3/man
    #
    MANDATORY_MANPATH			/usr/man
    MANDATORY_MANPATH			/usr/share/man
    MANDATORY_MANPATH			/usr/X11R6/man
    MANDATORY_MANPATH			/usr/local/man
    #---------------------------------------------------------
    # set up PATH to MANPATH mapping
    # ie. what man tree holds man pages for what binary directory.
    #
    #		*PATH*        ->	*MANPATH*
    #
    MANPATH_MAP	/bin			/usr/share/man
    MANPATH_MAP	/usr/bin		/usr/share/man
    MANPATH_MAP	/sbin			/usr/share/man
    MANPATH_MAP	/usr/sbin		/usr/share/man
    MANPATH_MAP	/usr/local/bin		/usr/local/man
    MANPATH_MAP	/usr/local/bin		/usr/local/share/man
    MANPATH_MAP	/usr/local/sbin		/usr/local/man
    MANPATH_MAP	/usr/local/sbin		/usr/local/share/man
    MANPATH_MAP	/usr/X11R6/bin		/usr/X11R6/man
    MANPATH_MAP	/usr/bin/X11		/usr/X11R6/man
    MANPATH_MAP	/usr/games		/usr/share/man
    MANPATH_MAP	/opt/bin		/opt/man
    MANPATH_MAP	/opt/sbin		/opt/man
    #---------------------------------------------------------
    # For a manpath element to be treated as a system manpath (as most of those
    # above should normally be), it must be mentioned below. Each line may have
    # an optional extra string indicating the catpath associated with the
    # manpath. If no catpath string is used, the catpath will default to the
    # given manpath.
    #
    # You *must* provide all system manpaths, including manpaths for alternate
    # operating systems, locale specific manpaths, and combinations of both, if
    # they exist, otherwise the permissions of the user running man/mandb will
    # be used to manipulate the manual pages. Also, mandb will not initialise
    # the database cache for any manpaths not mentioned below unless explicitly
    # requested to do so.
    #
    # In a per-user configuration file, this directive only controls the
    # location of catpaths and the creation of database caches; it has no effect
    # on privileges.
    #
    # Any manpaths that are subdirectories of other manpaths must be mentioned
    # *before* the containing manpath. E.g. /usr/man/preformat must be listed
    # before /usr/man.
    #
    #		*MANPATH*     ->	*CATPATH*
    #
    MANDB_MAP	/usr/man		/var/cache/man/fsstnd
    MANDB_MAP	/usr/share/man		/var/cache/man
    MANDB_MAP	/usr/local/man		/var/cache/man/oldlocal
    MANDB_MAP	/usr/local/share/man	/var/cache/man/local
    MANDB_MAP	/usr/X11R6/man		/var/cache/man/X11R6
    MANDB_MAP	/opt/man		/var/cache/man/opt
    #
    #---------------------------------------------------------
    # Program definitions.  These are commented out by default as the value
    # of the definition is already the default.  To change: uncomment a
    # definition and modify it.
    #
    #DEFINE 	pager	/usr/bin/pager -s
    #DEFINE 	cat	/bin/cat
    #DEFINE 	tr	/usr/bin/tr '\255\267\264\327' '\055\157\047\170'
    #DEFINE		grep	/bin/grep
    #DEFINE 	troff 	/usr/bin/groff -mandoc
    #DEFINE 	nroff 	/usr/bin/nroff -mandoc
    #DEFINE 	eqn 	/usr/bin/eqn
    #DEFINE 	neqn	/usr/bin/neqn
    #DEFINE 	tbl 	/usr/bin/tbl
    #DEFINE 	col 	/usr/bin/col
    #DEFINE 	vgrind 	/usr/bin/vgrind
    #DEFINE 	refer 	/usr/bin/refer
    #DEFINE 	grap 	/usr/bin/grap
    #DEFINE 	pic 	/usr/bin/pic -S
    #
    #DEFINE		decompressor	/bin/gzip -dc
    #DEFINE		compressor	/bin/gzip -c7
    #---------------------------------------------------------
    # Misc definitions: same as program definitions above.
    #
    #DEFINE		whatis_grep_flags		-i
    #DEFINE		apropos_grep_flags		-iEw
    #DEFINE		apropos_regex_grep_flags	-iE
    #---------------------------------------------------------
    # Section names. Manual sections will be searched in the order listed here;
    # the default is 1, n, l, 8, 3, 2, 5, 4, 9, 6, 7. Multiple SECTION
    # directives may be given for clarity, and will be concatenated together in
    # the expected way.
    # If a particular extension is not in this list (say, 1mh), it will be
    # displayed with the rest of the section it belongs to. The effect of this
    # is that you only need to explicitly list extensions if you want to force a
    # particular order. Sections with extensions should usually be adjacent to
    # their main section (e.g. "1 1mh 8 ...").
    SECTION		1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
    Your man.config looks perfect since you have this line
    Code:
    MANPATH_MAP	/usr/bin		/usr/share/man
    which means that your executables in /usr/bin have a manpage in /usr/share/man.
    However, what I still do not understand is that you do not have the
    "/usr/share/man/man1/gcc.1.gz" file because this is the manual for gcc and it should be
    installed with your gcc-package. I am not a debian expert. Perhaps you need to install the manual separately. Did you have these problems also with different programs?
    We can do three things. Either you try to find the gcc.1.gz anywhere in the internet and you just install it under /usr/share/man/man1 or I send it to you or SOMEBODY else knows how to install it in your debian distro.

    Cheers,
    Mazer
    I was seduced by SUSE 5.1.
    Registered Linux User #451562

  7. #7
    Just Joined!
    Join Date
    Oct 2009
    Posts
    3
    apt-get install gcc-4.3-doc
    (or whatever version you are using)

    note: i know the topic is two years old, but today i had same problem and got this thread as first google hit. so i hope i can help others with little hint.

    greets,

    taman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •