Re: new build/install of v5.7.5 fails to create any tags for C++ source
Eric Holbrook <[email protected]> Tue, 30 Jun 2009 15:44:09 -0700
| Newsgroups | gmane.comp.gnu.global.general |
|---|---|
| Message-ID | <[email protected]> |
#uname -a Linux g11-2-app-05 2.6.16.21-0.9-smp #1 SMP Mon Jul 3 11:25:39 PDT 2006 x86_64 x86_64 x86_64 GNU/Linux /Eric Hideki IWAMOTO wrote: >> I removed the .h in the C suffixes, but i'm still not getting any tags. > > This change influences only whether to treat .h as a suffix of C++ source. > Therefore, the problem that the source file is not found at all is not solved. > >> Any suggestions as to how to proceed? > > Writing what OS you are using might become a hint. > > On Tue, 30 Jun 2009 10:58:26 -0700, Eric Holbrook wrote... >> I removed the .h in the C suffixes, but i'm still not getting any tags. >> Any suggestions as to how to proceed? >> >> /Eric >> >> >> Hideki IWAMOTO wrote: >>>> Thanks for the quick response. I'm attaching the file. >>> I cannot reproduce the problem by using attached .globalrc. >>> There is no cause of a problem in your configuration file. >>> >>> $ touch Makefile a.cc a.h >>> $ ls -al >>> total 12 >>> drwxr-xr-x 2 iwamoto iwamoto 4096 Jul 1 02:10 . >>> drwxr-xr-x 37 iwamoto iwamoto 4096 Jul 1 01:10 .. >>> -rw-r--r-- 1 iwamoto iwamoto 0 Jul 1 02:10 Makefile >>> -rw-r--r-- 1 iwamoto iwamoto 0 Jul 1 02:10 a.cc >>> -rw-r--r-- 1 iwamoto iwamoto 0 Jul 1 02:10 a.h >>> $ gtags -v --gtagsconf ~/tmp/gtags.conf >>> [Wed Jul 01 02:11:25 JST 2009] Gtags started. >>> Using config file '/tmp/gtags.conf'. >>> [Wed Jul 01 02:11:25 JST 2009] Creating 'GTAGS'. >>> [1] extracting tags of a.cc >>> [2] extracting tags of a.h >>> [Wed Jul 01 02:11:25 JST 2009] Creating 'GRTAGS'. >>> [1/2] extracting tags of a.cc >>> [2/2] extracting tags of a.h >>> [Wed Jul 01 02:11:25 JST 2009] Creating 'GSYMS'. >>> [1/2] extracting tags of a.cc >>> [2/2] extracting tags of a.h >>> [Wed Jul 01 02:11:25 JST 2009] Done. >>> >>> >>> You seem to have forgotten to remove '.h' from the list of the suffix for C. >>> >>>> :langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.cpp.cxx.h.hxx.hpp.C.H,php\:.php.php3.phtml: >>> | >>> V >>> :langmap=c\:.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.cpp.cxx.h.hxx.hpp.C.H,php\:.php.php3.phtml: >>> >>> >>> On Tue, 30 Jun 2009 07:40:46 -0700, Eric Holbrook wrote... >>>> Thanks for the quick response. I'm attaching the file. >>>> >>>> cheers, >>>> Eric >>>> >>>> Hideki IWAMOTO wrote: >>>>> Hi. >>>>> >>>>>> Are there any extra steps i should have taken to set up for generating >>>>>> tags for *.h/*.cpp file pairs for C++ code? >>>>> There is no need for extra steps. >>>>> >>>>> To reproduce the problem, could you post your .globalrc? >>>>> >>>>> On Mon, 29 Jun 2009 13:05:00 -0700, Eric Holbrook wrote... >>>>>> I downloaded v5.7.5, which built/installed w/o any problems. I >>>>>> copied gtags.conf to ~/.globalrc, and added '.h' to the cpp chunk of >>>>>> langmap. >>>>>> >>>>>> When i execute `gtags` at the top of my source area, i get the 4 G* >>>>>> files, *all* with size=16384. gtags executes without any complaints. >>>>>> Here's the output: >>>>>> >>>>>> # gtags -v >>>>>> [Mon Jun 29 12:44:17 PDT 2009] Gtags started. >>>>>> Using config file '/usr/me/.globalrc'. >>>>>> [Mon Jun 29 12:44:17 PDT 2009] Creating 'GTAGS'. >>>>>> [Mon Jun 29 12:44:18 PDT 2009] Creating 'GRTAGS'. >>>>>> [Mon Jun 29 12:44:18 PDT 2009] Creating 'GSYMS'. >>>>>> [Mon Jun 29 12:44:18 PDT 2009] Done. >>>>>> >>>>>> >>>>>> When i run `global` it doesn't complain, but it can't find any class >>>>>> or instance or method in my code: >>>>>> >>>>>> # global -v addrGen >>>>>> object not found (using '/path/to/.../GTAGS'). >>>>>> >>>>>> And there don't appear to be any paths in the GPATHS file: >>>>>> >>>>>> # global -vP >>>>>> file not found (using '/path/to/.../GTAGS'). >>>>>> >>>>>> >>>>>> Am i using the tool wrong, or is global not capable of handling C++ >>>>>> code? >>>>>> >>>>>> Are there any extra steps i should have taken to set up for generating >>>>>> tags for *.h/*.cpp file pairs for C++ code? >>>>>> >>>>>> >>>>>> thanks, >>>>>> Eric >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Help-global mailing list >>>>>> [email protected] >>>>>> http://lists.gnu.org/mailman/listinfo/help-global >>>>> ---- >>>>> Hideki IWAMOTO [email protected] >>>> ______________________________________________________________________ >>>> >>>> #-*-Shell-script-*- >>>> # >>>> # Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003 >>>> # Tama Communications Corporation >>>> # >>>> # This file is part of GNU GLOBAL. >>>> # >>>> # This file is free software; as a special exception the author gives >>>> # unlimited permission to copy and/or distribute it, with or without >>>> # modifications, as long as this notice is preserved. >>>> # >>>> # This program is distributed in the hope that it will be useful, but >>>> # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the >>>> # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. >>>> # >>>> # * >>>> # Configuration file for GNU GLOBAL source code tag system. >>>> # >>>> # GLOBAL doesn't need 'gtags.conf' because it has the default values in it. >>>> # But if you have this file as '/etc/gtags.conf' or "$HOME/.globalrc" >>>> # then GLOBAL system overwrite default values with the values from the file. >>>> # >>>> # 'gtags.conf' is termcap style file. >>>> # 'default' is default target. >>>> # You can specify target with GTAGSLABEL environment variable. >>>> # >>>> # Variable 'suffixes' is obsoleted but is acceptable because it is needed >>>> # for plugged-in parser. If you use gtags-parser(1) then you should use >>>> # variable 'langmap' instead. >>>> # >>>> default:\ >>>> :tc=gtags:tc=htags: >>>> #--------------------------------------------------------------------- >>>> # Configuration for gtags(1) >>>> # See gtags(1). >>>> #--------------------------------------------------------------------- >>>> common:\ >>>> :skip=GPATH,GTAGS,GRTAGS,GSYMS,HTML/,HTML.pub/,html/,tags,TAGS,ID,y.tab.c,y.tab.h,cscope.out,cscope.po.out,cscope.in.out,SCCS/,RCS/,CVS/, >>> CVSROOT/,{arch}/,autom4te.cache/:\ >>>> :langmap=c\:.c.h,yacc\:.y,asm\:.s.S,java\:.java,cpp\:.c++.cc.cpp.cxx.h.hxx.hpp.C.H,php\:.php.php3.phtml: >>>> # >>>> # [gtags-parser] >>>> # >>>> # This command is distributed as part of GLOBAL. >>>> # The %s is replaced with the path of source file. >>>> # You need not use --langmap=xxx option. Gtags-parser(1) get the value >>>> # from environment variable. >>>> # >>>> gtags:\ >>>> :tc=common:\ >>>> :GTAGS=gtags-parser %s:\ >>>> :GRTAGS=gtags-parser -r %s:\ >>>> :GSYMS=gtags-parser -s %s: >>>> # >>>> # [Exuberant Ctags] >>>> # >>>> # This ctags is distributed as a part of Vim editor. >>>> # >>>> # [Installation] >>>> # % cd <Vim source directory>/src/ctags >>>> # % make >>>> # # cp ctags /usr/local/bin/ctags-exuberant >>>> # >>>> ctags-exuberant|Exuberant Ctags|ctags by Darren Hiebert:\ >>>> :tc=common:\ >>>> :suffixes=s,a,sa,asm,C,H,cpp,cxx,hxx,hpp,cc,c,h,y:\ >>>> :extractmethod:\ >>>> :GTAGS=/usr/local/bin/ctags-exuberant -xu %s | perl -ne '\ >>>> if (/^operator \\S+\\s+function\\s/) { s/^operator //; }\ >>>> ($name, $type, $no, $path, $line) = split(/[ \\t]+/, $_, 5);\ >>>> printf(STDOUT "%-16s %4d %-16s %s", $name, $no, $path, $line);': >>>> #--------------------------------------------------------------------- >>>> # Configuration for htags(1) >>>> # Let's paint hypertext with your favorite colors! >>>> # See htags(1). >>>> #--------------------------------------------------------------------- >>>> htags:\ >>>> :body_begin=<body text='#191970' bgcolor='#f5f5dc' vlink='gray'>:body_end=</body>:\ >>>> :table_begin=<table>:table_end=</table>:\ >>>> :title_begin=<h1><font color='#cc0000'>:title_end=</font></h1>:\ >>>> :comment_begin=<i><font color='green'>:comment_end=</font></i>:\ >>>> :sharp_begin=<font color='darkred'>:sharp_end=</font>:\ >>>> :brace_begin=<font color='red'>:brace_end=</font>:\ >>>> :warned_line_begin=<span style='background-color\:yellow'>:warned_line_end=</span>:\ >>>> :reserved_begin=<b>:reserved_end=</b>:script_alias=/cgi-bin/:\ >>>> :ncol#4:tabs#8:normal_suffix=html:gzipped_suffix=ghtml:\ >>>> :definition_header=no: >>> ---- >>> Hideki IWAMOTO [email protected] > > ---- > Hideki IWAMOTO [email protected]