gnu global does not work with debian, ubuntu

Asked 2 months ago, Updated 2 months ago, 5 views

I would like to use gnu global in vim to fly to the definition source or reference point.
Currently I use mac and debian and ubuntu respectively, and so far the mac is working fine.
So, I'm also trying to introduce gnu global to debian and ubuntu.
GTAGS is not generated successfully.The file itself is generated as GTAGS GPATH GRTAGS, but the contents of GTAGS are empty (to be exact, only one line) and it doesn't work when I type the global command on the terminal side or the gtags.vim on the vim side.
The GTAGS that you generated successfully in the first place contains various tag information, so there should be no single line.
When I used the -v option, it seems that I have extracted tag information from all the files, but it doesn't work.

Regarding the installation method,
For mac, use homebrew

  • brew install global--with-exuberant-ctags--with-pygments

The installation with the command worked, so
First, I installed it using linuxbrew.But it didn't move

  • apt install global

(In this case, python 2.7 and python 3.6.3, which I put in pyenv, installed python 3.7 and python 3.6.3, and installed exuberant-ctags with apt in advance), but it didn't work the same way.The version was 6.5.7 for global and 6.5.6 for gtags.
Since the above two measures did not work, I tried to build global-6.4, global-6.5, and global-6.5.7 from the source code, but none of them worked.

So I did one experiment.

in the folder where the known good GTAGS, GPATH, and GRTAGS files made by mac are located I accessed the folder from debian using parallels and tried to see if it worked well with a known good G* file. The destination file name was displayed on the terminal as global {method name}.
However, it didn't work well on vim.
: Gtags-f%

  • Error: global command failed.command line:global --result=ctags-mod-qf'XXX'

error
Type !global {method name} and

  • global:directory'/home/{username}/.cache/tags_dir/{hoge}'not found.

received an error.{hoge} is the extraction of all / from the full path to the directory where the file with the !global command is located.

The plug-in for gtags is

  • gtags.vim (version 0.6.8)
  • jsfaint/gen_tags.vim
  • ozelentok/denite-gtags

is used.

I've tried many things, but I don't have much information about gnu global in the first place, and I'm not sure if it's reproducible.
Also, I would appreciate it if you could let me know if there are any other plug-ins related to tag jumping.

Thank you for your cooperation.

ubuntu vim debian

2022-09-30 11:37

1 Answers

Self-Solving

:! I tried global and found that ~/.cache/tags_dir/{hoge} that would originally be loaded in gen_tags.vim is missing
At this point, it became clear that gen_tags.vim was doing some work on the global, so set the gen_tags.vim plug-in not to load.
And get the gtags.conf of the gtags that you installed without sharing .globalrc
Now both macOS and debian worked as expected

The cause is unknown


2022-09-30 11:37

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.