Skip to content

Instantly share code, notes, and snippets.

@looopTools
Forked from carakan/Readme.md
Last active April 1, 2024 10:23
Show Gist options
  • Save looopTools/c5ee067de6b1c27c3d2747cb323ac7d5 to your computer and use it in GitHub Desktop.
Save looopTools/c5ee067de6b1c27c3d2747cb323ac7d5 to your computer and use it in GitHub Desktop.
How to install GNU Global with universall ctags support on mac OS

Unfortunately, homebrew does not support --with-universal-ctags option for global (on the state of April 2018) The reason is that universal-ctags is not officially released yet.

Install universal ctags

Run brew install universal-ctags

If you're on macOS, you might have an old ctags installed with command line tools for XCode. To fix this, simply run alias ctags="`brew --prefix`/bin/ctags"

To check that universal-ctags installed correctly, run the ctags --version command. You must see the following output:

Universal Ctags 0.0.0(8e09804), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Apr  8 2018, 10:06:38
  URL: https://ctags.io/

Install GNU Global from source

Download GNU Global from https://www.gnu.org/software/global/download.html Uncompress and configure it with universal ctags

./configure --with-universal-ctags=/opt/homebrew/bin/ctags and then make & sudo make install

To check that gtags was installed correctly, you could run which gtags. It must point out to /usr/local/bin/gtags

Now, running the gtags --gtagslabel=new-ctags should not produce any errors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment