leoliu / ggtags

Emacs frontend to GNU Global source code tagging system.

Home Page:http://elpa.gnu.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error calling global: "GTAGSDBPATH must be an absolute path"

jlowenz opened this issue · comments

After creating a GTAGS file in my project root and installing ggtags, any find operation (e.g. ggtags-find-tag-dwim) fails with the following error:

-*- mode: ggtags-global; default-directory: "~/path/to/project/" -*-
Global started at Fri Sep 13 08:21:20

global -v --result=grep --color=always --path-style=shorter -- GRTAGS
global: GTAGSDBPATH must be an absolute path.

Global exited abnormally with code 1 at Fri Sep 13 08:21:20

I do not have GTAGSDBPATH set, but I do have GTAGSLABEL=new-ctags set. Running the same command in the shell does not produce the error.

Debugging seemed to indicate that the gtags-project-root was correctly set to an absolute path, but it's interesting the modeline shows that default-directory is set to a shortened / relative path.

Any ideas on how to get this working?

global version: 6.6.3
ggtags version: 20190320.2208

Do you have GTAGSDBPATH set in emacs? To check M-: (getenv "GTAGSDBPATH"). I just checked ggtags and it doesn't set GTAGSDBPATH.

Oy! You are correct. I had some old setting buried deep in my Emacs configuration files. Removed it and things behave as expected. Sorry about that.