一馬力のメモ帳

MVSからLinuxまで。基盤屋さんは眠らない

GNU GLOBALのインストール[CentOS7.2]

f:id:htbariki:20180505123620p:plain

GNU GLOBAL」ソースコードタグシステム
Linuxカーネル等の大規模プロジェクトのソースコードを調査するのに重宝する道具です。
Linuxソースコードを読む場合,Vim等と連携する事で,調査等の再便利です。

GNE GLOBALの利用法は他のサイトを参考にしていただき
この記事ではインストール方法を紹介したと思います。

目次


インストール作業の概要

前提パッケージインストール

[root@CentOS7 systemd-219]# yum install wget gcc ncurses-devel vim

ソースのダウンロード

[root@CentOS7 src]# wget ftp://ftp.gnu.org/pub/gnu/global/global-6.5.6.tar.gz

ソースの展開

[root@CentOS7 src]# tar xzvf global-6.5.6.tar.gz

make install

[root@CentOS7 global-6.5.6]# ./configure
[root@CentOS7 global-6.5.6]# make
[root@CentOS7 global-6.5.6]# make install

インストール時のログ

前提パッケージインストール

[root@CentOS7 systemd-219]# yum install wget gcc ncurses-devel vim
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ gcc.x86_64 0:4.8.5-11.el7 を インストール
--> 依存性の処理をしています: libgomp = 4.8.5-11.el7 のパッケージ: gcc-4.8.5-11.el7.x86_64
--> 依存性の処理をしています: cpp = 4.8.5-11.el7 のパッケージ: gcc-4.8.5-11.el7.x86_64
--> 依存性の処理をしています: libgcc >= 4.8.5-11.el7 のパッケージ: gcc-4.8.5-11.el7.x86_64
--> 依存性の処理をしています: glibc-devel >= 2.2.90-12 のパッケージ: gcc-4.8.5-11.el7.x86_64
--> 依存性の処理をしています: libmpfr.so.4()(64bit) のパッケージ: gcc-4.8.5-11.el7.x86_64
--> 依存性の処理をしています: libmpc.so.3()(64bit) のパッケージ: gcc-4.8.5-11.el7.x86_64
---> パッケージ ncurses-devel.x86_64 0:5.9-13.20130511.el7 を インストール
---> パッケージ vim-enhanced.x86_64 2:7.4.160-1.el7_3.1 を インストール
--> 依存性の処理をしています: vim-common = 2:7.4.160-1.el7_3.1 のパッケージ: 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64
--> 依存性の処理をしています: perl(:MODULE_COMPAT_5.16.3) のパッケージ: 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64
--> 依存性の処理をしています: libperl.so()(64bit) のパッケージ: 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64
--> 依存性の処理をしています: libgpm.so.2()(64bit) のパッケージ: 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64
---> パッケージ wget.x86_64 0:1.14-13.el7 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ cpp.x86_64 0:4.8.5-11.el7 を インストール
---> パッケージ glibc-devel.x86_64 0:2.17-157.el7_3.1 を インストール
--> 依存性の処理をしています: glibc-headers = 2.17-157.el7_3.1 のパッケージ: glibc-devel-2.17-157.el7_3.1.x86_64
--> 依存性の処理をしています: glibc = 2.17-157.el7_3.1 のパッケージ: glibc-devel-2.17-157.el7_3.1.x86_64
--> 依存性の処理をしています: glibc-headers のパッケージ: glibc-devel-2.17-157.el7_3.1.x86_64
---> パッケージ gpm-libs.x86_64 0:1.20.7-5.el7 を インストール
---> パッケージ libgcc.x86_64 0:4.8.5-4.el7 を 更新
---> パッケージ libgcc.x86_64 0:4.8.5-11.el7 を アップデート
---> パッケージ libgomp.x86_64 0:4.8.5-4.el7 を 更新
---> パッケージ libgomp.x86_64 0:4.8.5-11.el7 を アップデート
---> パッケージ libmpc.x86_64 0:1.0.1-3.el7 を インストール
---> パッケージ mpfr.x86_64 0:3.1.1-4.el7 を インストール
---> パッケージ perl.x86_64 4:5.16.3-291.el7 を インストール
--> 依存性の処理をしています: perl(Socket) >= 1.3 のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Scalar::Util) >= 1.10 のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl-macros のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(threads::shared) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(threads) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(constant) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Time::Local) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Time::HiRes) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Storable) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Socket) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Scalar::Util) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Pod::Simple::XHTML) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Pod::Simple::Search) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Getopt::Long) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Filter::Util::Call) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(File::Temp) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(File::Spec::Unix) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(File::Spec::Functions) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(File::Spec) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(File::Path) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Exporter) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Cwd) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
--> 依存性の処理をしています: perl(Carp) のパッケージ: 4:perl-5.16.3-291.el7.x86_64
---> パッケージ perl-libs.x86_64 4:5.16.3-291.el7 を インストール
---> パッケージ vim-common.x86_64 2:7.4.160-1.el7_3.1 を インストール
--> 依存性の処理をしています: vim-filesystem のパッケージ: 2:vim-common-7.4.160-1.el7_3.1.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ glibc.x86_64 0:2.17-105.el7 を 更新
--> 依存性の処理をしています: glibc = 2.17-105.el7 のパッケージ: glibc-common-2.17-105.el7.x86_64
---> パッケージ glibc.x86_64 0:2.17-157.el7_3.1 を アップデート
---> パッケージ glibc-headers.x86_64 0:2.17-157.el7_3.1 を インストール
--> 依存性の処理をしています: kernel-headers >= 2.2.1 のパッケージ: glibc-headers-2.17-157.el7_3.1.x86_64
--> 依存性の処理をしています: kernel-headers のパッケージ: glibc-headers-2.17-157.el7_3.1.x86_64
---> パッケージ perl-Carp.noarch 0:1.26-244.el7 を インストール
---> パッケージ perl-Exporter.noarch 0:5.68-3.el7 を インストール
---> パッケージ perl-File-Path.noarch 0:2.09-2.el7 を インストール
---> パッケージ perl-File-Temp.noarch 0:0.23.01-3.el7 を インストール
---> パッケージ perl-Filter.x86_64 0:1.49-3.el7 を インストール
---> パッケージ perl-Getopt-Long.noarch 0:2.40-2.el7 を インストール
--> 依存性の処理をしています: perl(Pod::Usage) >= 1.14 のパッケージ: perl-Getopt-Long-2.40-2.el7.noarch
--> 依存性の処理をしています: perl(Text::ParseWords) のパッケージ: perl-Getopt-Long-2.40-2.el7.noarch
---> パッケージ perl-PathTools.x86_64 0:3.40-5.el7 を インストール
---> パッケージ perl-Pod-Simple.noarch 1:3.28-4.el7 を インストール
--> 依存性の処理をしています: perl(Pod::Escapes) >= 1.04 のパッケージ: 1:perl-Pod-Simple-3.28-4.el7.noarch
--> 依存性の処理をしています: perl(Encode) のパッケージ: 1:perl-Pod-Simple-3.28-4.el7.noarch
---> パッケージ perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 を インストール
---> パッケージ perl-Socket.x86_64 0:2.010-4.el7 を インストール
---> パッケージ perl-Storable.x86_64 0:2.45-3.el7 を インストール
---> パッケージ perl-Time-HiRes.x86_64 4:1.9725-3.el7 を インストール
---> パッケージ perl-Time-Local.noarch 0:1.2300-2.el7 を インストール
---> パッケージ perl-constant.noarch 0:1.27-2.el7 を インストール
---> パッケージ perl-macros.x86_64 4:5.16.3-291.el7 を インストール
---> パッケージ perl-threads.x86_64 0:1.87-4.el7 を インストール
---> パッケージ perl-threads-shared.x86_64 0:1.43-6.el7 を インストール
---> パッケージ vim-filesystem.x86_64 2:7.4.160-1.el7_3.1 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ glibc-common.x86_64 0:2.17-105.el7 を 更新
---> パッケージ glibc-common.x86_64 0:2.17-157.el7_3.1 を アップデート
---> パッケージ kernel-headers.x86_64 0:3.10.0-514.6.1.el7 を インストール
---> パッケージ perl-Encode.x86_64 0:2.51-7.el7 を インストール
---> パッケージ perl-Pod-Escapes.noarch 1:1.04-291.el7 を インストール
---> パッケージ perl-Pod-Usage.noarch 0:1.63-3.el7 を インストール
--> 依存性の処理をしています: perl(Pod::Text) >= 3.15 のパッケージ: perl-Pod-Usage-1.63-3.el7.noarch
--> 依存性の処理をしています: perl-Pod-Perldoc のパッケージ: perl-Pod-Usage-1.63-3.el7.noarch
---> パッケージ perl-Text-ParseWords.noarch 0:3.29-4.el7 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ perl-Pod-Perldoc.noarch 0:3.20-4.el7 を インストール
--> 依存性の処理をしています: perl(parent) のパッケージ: perl-Pod-Perldoc-3.20-4.el7.noarch
--> 依存性の処理をしています: perl(HTTP::Tiny) のパッケージ: perl-Pod-Perldoc-3.20-4.el7.noarch
---> パッケージ perl-podlators.noarch 0:2.5.1-3.el7 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ perl-HTTP-Tiny.noarch 0:0.033-3.el7 を インストール
---> パッケージ perl-parent.noarch 1:0.225-244.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

===============================================================================================================================================================================
 Package                                           アーキテクチャー                  バージョン                                       リポジトリー                        容量
===============================================================================================================================================================================
インストール中:
 gcc                                               x86_64                            4.8.5-11.el7                                     base                                16 M
 ncurses-devel                                     x86_64                            5.9-13.20130511.el7                              base                               713 k
 vim-enhanced                                      x86_64                            2:7.4.160-1.el7_3.1                              updates                            1.0 M
 wget                                              x86_64                            1.14-13.el7                                      base                               546 k
依存性関連でのインストールをします:
 cpp                                               x86_64                            4.8.5-11.el7                                     base                               5.9 M
 glibc-devel                                       x86_64                            2.17-157.el7_3.1                                 updates                            1.1 M
 glibc-headers                                     x86_64                            2.17-157.el7_3.1                                 updates                            668 k
 gpm-libs                                          x86_64                            1.20.7-5.el7                                     base                                32 k
 kernel-headers                                    x86_64                            3.10.0-514.6.1.el7                               updates                            4.8 M
 libmpc                                            x86_64                            1.0.1-3.el7                                      base                                51 k
 mpfr                                              x86_64                            3.1.1-4.el7                                      base                               203 k
 perl                                              x86_64                            4:5.16.3-291.el7                                 base                               8.0 M
 perl-Carp                                         noarch                            1.26-244.el7                                     base                                19 k
 perl-Encode                                       x86_64                            2.51-7.el7                                       base                               1.5 M
 perl-Exporter                                     noarch                            5.68-3.el7                                       base                                28 k
 perl-File-Path                                    noarch                            2.09-2.el7                                       base                                26 k
 perl-File-Temp                                    noarch                            0.23.01-3.el7                                    base                                56 k
 perl-Filter                                       x86_64                            1.49-3.el7                                       base                                76 k
 perl-Getopt-Long                                  noarch                            2.40-2.el7                                       base                                56 k
 perl-HTTP-Tiny                                    noarch                            0.033-3.el7                                      base                                38 k
 perl-PathTools                                    x86_64                            3.40-5.el7                                       base                                82 k
 perl-Pod-Escapes                                  noarch                            1:1.04-291.el7                                   base                                51 k
 perl-Pod-Perldoc                                  noarch                            3.20-4.el7                                       base                                87 k
 perl-Pod-Simple                                   noarch                            1:3.28-4.el7                                     base                               216 k
 perl-Pod-Usage                                    noarch                            1.63-3.el7                                       base                                27 k
 perl-Scalar-List-Utils                            x86_64                            1.27-248.el7                                     base                                36 k
 perl-Socket                                       x86_64                            2.010-4.el7                                      base                                49 k
 perl-Storable                                     x86_64                            2.45-3.el7                                       base                                77 k
 perl-Text-ParseWords                              noarch                            3.29-4.el7                                       base                                14 k
 perl-Time-HiRes                                   x86_64                            4:1.9725-3.el7                                   base                                45 k
 perl-Time-Local                                   noarch                            1.2300-2.el7                                     base                                24 k
 perl-constant                                     noarch                            1.27-2.el7                                       base                                19 k
 perl-libs                                         x86_64                            4:5.16.3-291.el7                                 base                               688 k
 perl-macros                                       x86_64                            4:5.16.3-291.el7                                 base                                43 k
 perl-parent                                       noarch                            1:0.225-244.el7                                  base                                12 k
 perl-podlators                                    noarch                            2.5.1-3.el7                                      base                               112 k
 perl-threads                                      x86_64                            1.87-4.el7                                       base                                49 k
 perl-threads-shared                               x86_64                            1.43-6.el7                                       base                                39 k
 vim-common                                        x86_64                            2:7.4.160-1.el7_3.1                              updates                            5.9 M
 vim-filesystem                                    x86_64                            2:7.4.160-1.el7_3.1                              updates                            9.7 k
依存性関連での更新をします:
 glibc                                             x86_64                            2.17-157.el7_3.1                                 updates                            3.6 M
 glibc-common                                      x86_64                            2.17-157.el7_3.1                                 updates                             11 M
 libgcc                                            x86_64                            4.8.5-11.el7                                     base                                97 k
 libgomp                                           x86_64                            4.8.5-11.el7                                     base                               152 k

トランザクションの要約
===============================================================================================================================================================================
インストール  4 パッケージ (+36 個の依存関係のパッケージ)
更新                       (  4 個の依存関係のパッケージ)

総ダウンロード容量: 64 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/44): cpp-4.8.5-11.el7.x86_64.rpm                                                                                                                     | 5.9 MB  00:00:02
(2/44): glibc-2.17-157.el7_3.1.x86_64.rpm                                                                                                               | 3.6 MB  00:00:02
(3/44): glibc-devel-2.17-157.el7_3.1.x86_64.rpm                                                                                                         | 1.1 MB  00:00:00
(4/44): glibc-headers-2.17-157.el7_3.1.x86_64.rpm                                                                                                       | 668 kB  00:00:00
(5/44): gpm-libs-1.20.7-5.el7.x86_64.rpm                                                                                                                |  32 kB  00:00:00
(6/44): libgcc-4.8.5-11.el7.x86_64.rpm                                                                                                                  |  97 kB  00:00:00
(7/44): libgomp-4.8.5-11.el7.x86_64.rpm                                                                                                                 | 152 kB  00:00:00
(8/44): libmpc-1.0.1-3.el7.x86_64.rpm                                                                                                                   |  51 kB  00:00:00
(9/44): mpfr-3.1.1-4.el7.x86_64.rpm                                                                                                                     | 203 kB  00:00:00
(10/44): ncurses-devel-5.9-13.20130511.el7.x86_64.rpm                                                                                                   | 713 kB  00:00:00
(11/44): kernel-headers-3.10.0-514.6.1.el7.x86_64.rpm                                                                                                   | 4.8 MB  00:00:01
(12/44): glibc-common-2.17-157.el7_3.1.x86_64.rpm                                                                                                       |  11 MB  00:00:06
(13/44): perl-5.16.3-291.el7.x86_64.rpm                                                                                                                 | 8.0 MB  00:00:02
(14/44): perl-Carp-1.26-244.el7.noarch.rpm                                                                                                              |  19 kB  00:00:00
(15/44): perl-Encode-2.51-7.el7.x86_64.rpm                                                                                                              | 1.5 MB  00:00:00
(16/44): perl-Exporter-5.68-3.el7.noarch.rpm                                                                                                            |  28 kB  00:00:00
(17/44): perl-File-Path-2.09-2.el7.noarch.rpm                                                                                                           |  26 kB  00:00:00
(18/44): perl-File-Temp-0.23.01-3.el7.noarch.rpm                                                                                                        |  56 kB  00:00:00
(19/44): perl-Filter-1.49-3.el7.x86_64.rpm                                                                                                              |  76 kB  00:00:00
(20/44): perl-Getopt-Long-2.40-2.el7.noarch.rpm                                                                                                         |  56 kB  00:00:00
(21/44): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm                                                                                                          |  38 kB  00:00:00
(22/44): perl-PathTools-3.40-5.el7.x86_64.rpm                                                                                                           |  82 kB  00:00:00
(23/44): perl-Pod-Escapes-1.04-291.el7.noarch.rpm                                                                                                       |  51 kB  00:00:00
(24/44): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm                                                                                                         |  87 kB  00:00:00
(25/44): perl-Pod-Simple-3.28-4.el7.noarch.rpm                                                                                                          | 216 kB  00:00:00
(26/44): perl-Pod-Usage-1.63-3.el7.noarch.rpm                                                                                                           |  27 kB  00:00:00
(27/44): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm                                                                                                 |  36 kB  00:00:00
(28/44): perl-Socket-2.010-4.el7.x86_64.rpm                                                                                                             |  49 kB  00:00:00
(29/44): perl-Storable-2.45-3.el7.x86_64.rpm                                                                                                            |  77 kB  00:00:00
(30/44): perl-Text-ParseWords-3.29-4.el7.noarch.rpm                                                                                                     |  14 kB  00:00:00
(31/44): gcc-4.8.5-11.el7.x86_64.rpm                                                                                                                    |  16 MB  00:00:07
(32/44): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm                                                                                                        |  45 kB  00:00:00
(33/44): perl-Time-Local-1.2300-2.el7.noarch.rpm                                                                                                        |  24 kB  00:00:00
(34/44): perl-constant-1.27-2.el7.noarch.rpm                                                                                                            |  19 kB  00:00:00
(35/44): perl-macros-5.16.3-291.el7.x86_64.rpm                                                                                                          |  43 kB  00:00:00
(36/44): perl-parent-0.225-244.el7.noarch.rpm                                                                                                           |  12 kB  00:00:00
(37/44): perl-podlators-2.5.1-3.el7.noarch.rpm                                                                                                          | 112 kB  00:00:00
(38/44): perl-libs-5.16.3-291.el7.x86_64.rpm                                                                                                            | 688 kB  00:00:00
(39/44): perl-threads-shared-1.43-6.el7.x86_64.rpm                                                                                                      |  39 kB  00:00:00
(40/44): perl-threads-1.87-4.el7.x86_64.rpm                                                                                                             |  49 kB  00:00:00
(41/44): vim-enhanced-7.4.160-1.el7_3.1.x86_64.rpm                                                                                                      | 1.0 MB  00:00:00
(42/44): vim-filesystem-7.4.160-1.el7_3.1.x86_64.rpm                                                                                                    | 9.7 kB  00:00:00
(43/44): vim-common-7.4.160-1.el7_3.1.x86_64.rpm                                                                                                        | 5.9 MB  00:00:01
(44/44): wget-1.14-13.el7.x86_64.rpm                                                                                                                    | 546 kB  00:00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
合計                                                                                                                                           6.9 MB/s |  64 MB  00:00:09
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  更新します              : libgcc-4.8.5-11.el7.x86_64                                                                                                                    1/48
  更新します              : glibc-2.17-157.el7_3.1.x86_64                                                                                                                 2/48
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
  更新します              : glibc-common-2.17-157.el7_3.1.x86_64                                                                                                          3/48
  インストール中          : mpfr-3.1.1-4.el7.x86_64                                                                                                                       4/48
  インストール中          : libmpc-1.0.1-3.el7.x86_64                                                                                                                     5/48
  インストール中          : cpp-4.8.5-11.el7.x86_64                                                                                                                       6/48
  インストール中          : 1:perl-parent-0.225-244.el7.noarch                                                                                                            7/48
  インストール中          : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                                                             8/48
  インストール中          : perl-podlators-2.5.1-3.el7.noarch                                                                                                             9/48
  インストール中          : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                                                           10/48
  インストール中          : 1:perl-Pod-Escapes-1.04-291.el7.noarch                                                                                                       11/48
  インストール中          : perl-Encode-2.51-7.el7.x86_64                                                                                                                12/48
  インストール中          : perl-Text-ParseWords-3.29-4.el7.noarch                                                                                                       13/48
  インストール中          : perl-Pod-Usage-1.63-3.el7.noarch                                                                                                             14/48
  インストール中          : perl-threads-1.87-4.el7.x86_64                                                                                                               15/48
  インストール中          : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                                                                                        16/48
  インストール中          : perl-Exporter-5.68-3.el7.noarch                                                                                                              17/48
  インストール中          : perl-Socket-2.010-4.el7.x86_64                                                                                                               18/48
  インストール中          : perl-Carp-1.26-244.el7.noarch                                                                                                                19/48
  インストール中          : perl-Storable-2.45-3.el7.x86_64                                                                                                              20/48
  インストール中          : perl-threads-shared-1.43-6.el7.x86_64                                                                                                        21/48
  インストール中          : perl-PathTools-3.40-5.el7.x86_64                                                                                                             22/48
  インストール中          : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                                                                   23/48
  インストール中          : 4:perl-libs-5.16.3-291.el7.x86_64                                                                                                            24/48
  インストール中          : 4:perl-macros-5.16.3-291.el7.x86_64                                                                                                          25/48
  インストール中          : perl-Time-Local-1.2300-2.el7.noarch                                                                                                          26/48
  インストール中          : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                                                          27/48
  インストール中          : perl-constant-1.27-2.el7.noarch                                                                                                              28/48
  インストール中          : perl-File-Temp-0.23.01-3.el7.noarch                                                                                                          29/48
  インストール中          : perl-File-Path-2.09-2.el7.noarch                                                                                                             30/48
  インストール中          : perl-Filter-1.49-3.el7.x86_64                                                                                                                31/48
  インストール中          : perl-Getopt-Long-2.40-2.el7.noarch                                                                                                           32/48
  インストール中          : 4:perl-5.16.3-291.el7.x86_64                                                                                                                 33/48
  インストール中          : gpm-libs-1.20.7-5.el7.x86_64                                                                                                                 34/48
  更新します              : libgomp-4.8.5-11.el7.x86_64                                                                                                                  35/48
  インストール中          : 2:vim-filesystem-7.4.160-1.el7_3.1.x86_64                                                                                                    36/48
  インストール中          : 2:vim-common-7.4.160-1.el7_3.1.x86_64                                                                                                        37/48
  インストール中          : kernel-headers-3.10.0-514.6.1.el7.x86_64                                                                                                     38/48
  インストール中          : glibc-headers-2.17-157.el7_3.1.x86_64                                                                                                        39/48
  インストール中          : glibc-devel-2.17-157.el7_3.1.x86_64                                                                                                          40/48
  インストール中          : gcc-4.8.5-11.el7.x86_64                                                                                                                      41/48
  インストール中          : 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64                                                                                                      42/48
  インストール中          : wget-1.14-13.el7.x86_64                                                                                                                      43/48
  インストール中          : ncurses-devel-5.9-13.20130511.el7.x86_64                                                                                                     44/48
  整理中                  : libgomp-4.8.5-4.el7.x86_64                                                                                                                   45/48
  整理中                  : glibc-2.17-105.el7.x86_64                                                                                                                    46/48
  整理中                  : glibc-common-2.17-105.el7.x86_64                                                                                                             47/48
  整理中                  : libgcc-4.8.5-4.el7.x86_64                                                                                                                    48/48
  検証中                  : perl-HTTP-Tiny-0.033-3.el7.noarch                                                                                                             1/48
  検証中                  : perl-threads-shared-1.43-6.el7.x86_64                                                                                                         2/48
  検証中                  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                                                                                                         3/48
  検証中                  : perl-threads-1.87-4.el7.x86_64                                                                                                                4/48
  検証中                  : perl-Exporter-5.68-3.el7.noarch                                                                                                               5/48
  検証中                  : perl-PathTools-3.40-5.el7.x86_64                                                                                                              6/48
  検証中                  : cpp-4.8.5-11.el7.x86_64                                                                                                                       7/48
  検証中                  : 1:perl-Pod-Escapes-1.04-291.el7.noarch                                                                                                        8/48
  検証中                  : glibc-headers-2.17-157.el7_3.1.x86_64                                                                                                         9/48
  検証中                  : 1:perl-parent-0.225-244.el7.noarch                                                                                                           10/48
  検証中                  : glibc-common-2.17-157.el7_3.1.x86_64                                                                                                         11/48
  検証中                  : perl-File-Temp-0.23.01-3.el7.noarch                                                                                                          12/48
  検証中                  : wget-1.14-13.el7.x86_64                                                                                                                      13/48
  検証中                  : 1:perl-Pod-Simple-3.28-4.el7.noarch                                                                                                          14/48
  検証中                  : perl-Time-Local-1.2300-2.el7.noarch                                                                                                          15/48
  検証中                  : gpm-libs-1.20.7-5.el7.x86_64                                                                                                                 16/48
  検証中                  : perl-Pod-Perldoc-3.20-4.el7.noarch                                                                                                           17/48
  検証中                  : 2:vim-common-7.4.160-1.el7_3.1.x86_64                                                                                                        18/48
  検証中                  : perl-Socket-2.010-4.el7.x86_64                                                                                                               19/48
  検証中                  : glibc-devel-2.17-157.el7_3.1.x86_64                                                                                                          20/48
  検証中                  : perl-Carp-1.26-244.el7.noarch                                                                                                                21/48
  検証中                  : glibc-2.17-157.el7_3.1.x86_64                                                                                                                22/48
  検証中                  : ncurses-devel-5.9-13.20130511.el7.x86_64                                                                                                     23/48
  検証中                  : perl-Storable-2.45-3.el7.x86_64                                                                                                              24/48
  検証中                  : libgcc-4.8.5-11.el7.x86_64                                                                                                                   25/48
  検証中                  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                                                                                                   26/48
  検証中                  : libmpc-1.0.1-3.el7.x86_64                                                                                                                    27/48
  検証中                  : 4:perl-libs-5.16.3-291.el7.x86_64                                                                                                            28/48
  検証中                  : 4:perl-macros-5.16.3-291.el7.x86_64                                                                                                          29/48
  検証中                  : perl-Pod-Usage-1.63-3.el7.noarch                                                                                                             30/48
  検証中                  : perl-Encode-2.51-7.el7.x86_64                                                                                                                31/48
  検証中                  : kernel-headers-3.10.0-514.6.1.el7.x86_64                                                                                                     32/48
  検証中                  : perl-podlators-2.5.1-3.el7.noarch                                                                                                            33/48
  検証中                  : perl-Getopt-Long-2.40-2.el7.noarch                                                                                                           34/48
  検証中                  : perl-constant-1.27-2.el7.noarch                                                                                                              35/48
  検証中                  : perl-File-Path-2.09-2.el7.noarch                                                                                                             36/48
  検証中                  : 4:perl-5.16.3-291.el7.x86_64                                                                                                                 37/48
  検証中                  : mpfr-3.1.1-4.el7.x86_64                                                                                                                      38/48
  検証中                  : perl-Filter-1.49-3.el7.x86_64                                                                                                                39/48
  検証中                  : perl-Text-ParseWords-3.29-4.el7.noarch                                                                                                       40/48
  検証中                  : libgomp-4.8.5-11.el7.x86_64                                                                                                                  41/48
  検証中                  : 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64                                                                                                      42/48
  検証中                  : gcc-4.8.5-11.el7.x86_64                                                                                                                      43/48
  検証中                  : 2:vim-filesystem-7.4.160-1.el7_3.1.x86_64                                                                                                    44/48
  検証中                  : glibc-2.17-105.el7.x86_64                                                                                                                    45/48
  検証中                  : glibc-common-2.17-105.el7.x86_64                                                                                                             46/48
  検証中                  : libgomp-4.8.5-4.el7.x86_64                                                                                                                   47/48
  検証中                  : libgcc-4.8.5-4.el7.x86_64                                                                                                                    48/48

インストール:
  gcc.x86_64 0:4.8.5-11.el7          ncurses-devel.x86_64 0:5.9-13.20130511.el7          vim-enhanced.x86_64 2:7.4.160-1.el7_3.1          wget.x86_64 0:1.14-13.el7

依存性関連をインストールしました:
  cpp.x86_64 0:4.8.5-11.el7                   glibc-devel.x86_64 0:2.17-157.el7_3.1         glibc-headers.x86_64 0:2.17-157.el7_3.1  gpm-libs.x86_64 0:1.20.7-5.el7
  kernel-headers.x86_64 0:3.10.0-514.6.1.el7  libmpc.x86_64 0:1.0.1-3.el7                   mpfr.x86_64 0:3.1.1-4.el7                perl.x86_64 4:5.16.3-291.el7
  perl-Carp.noarch 0:1.26-244.el7             perl-Encode.x86_64 0:2.51-7.el7               perl-Exporter.noarch 0:5.68-3.el7        perl-File-Path.noarch 0:2.09-2.el7
  perl-File-Temp.noarch 0:0.23.01-3.el7       perl-Filter.x86_64 0:1.49-3.el7               perl-Getopt-Long.noarch 0:2.40-2.el7     perl-HTTP-Tiny.noarch 0:0.033-3.el7
  perl-PathTools.x86_64 0:3.40-5.el7          perl-Pod-Escapes.noarch 1:1.04-291.el7        perl-Pod-Perldoc.noarch 0:3.20-4.el7     perl-Pod-Simple.noarch 1:3.28-4.el7
  perl-Pod-Usage.noarch 0:1.63-3.el7          perl-Scalar-List-Utils.x86_64 0:1.27-248.el7  perl-Socket.x86_64 0:2.010-4.el7         perl-Storable.x86_64 0:2.45-3.el7
  perl-Text-ParseWords.noarch 0:3.29-4.el7    perl-Time-HiRes.x86_64 4:1.9725-3.el7         perl-Time-Local.noarch 0:1.2300-2.el7    perl-constant.noarch 0:1.27-2.el7
  perl-libs.x86_64 4:5.16.3-291.el7           perl-macros.x86_64 4:5.16.3-291.el7           perl-parent.noarch 1:0.225-244.el7       perl-podlators.noarch 0:2.5.1-3.el7
  perl-threads.x86_64 0:1.87-4.el7            perl-threads-shared.x86_64 0:1.43-6.el7       vim-common.x86_64 2:7.4.160-1.el7_3.1    vim-filesystem.x86_64 2:7.4.160-1.el7_3.1

依存性を更新しました:
  glibc.x86_64 0:2.17-157.el7_3.1            glibc-common.x86_64 0:2.17-157.el7_3.1            libgcc.x86_64 0:4.8.5-11.el7            libgomp.x86_64 0:4.8.5-11.el7

完了しました!
[root@CentOS7 systemd-219]#

ソースのダウンロード

[root@CentOS7 src]# wget ftp://ftp.gnu.org/pub/gnu/global/global-6.5.6.tar.gz
--2017-02-05 11:08:12--  ftp://ftp.gnu.org/pub/gnu/global/global-6.5.6.tar.gz
           => `global-6.5.6.tar.gz'
ftp.gnu.org (ftp.gnu.org) をDNSに問いあわせています... 208.118.235.20
ftp.gnu.org (ftp.gnu.org)|208.118.235.20|:21 に接続しています... 接続しました。
anonymous としてログインしています... ログインしました!
==> SYST ... 完了しました。    ==> PWD ... 完了しました。
==> TYPE I ... 完了しました。  ==> CWD (1) /pub/gnu/global ... 完了しました。
==> SIZE global-6.5.6.tar.gz ... 2935032
==> PASV ... 完了しました。    ==> RETR global-6.5.6.tar.gz ... 完了しました。
長さ: 2935032 (2.8M) (確証はありません)

100%[=====================================================================================================================================>] 2,935,032   1.08MB/s 時間 2.6s

2017-02-05 11:08:20 (1.08 MB/s) - `global-6.5.6.tar.gz' へ保存終了 [2935032]

[root@CentOS7 src]# ll
合計 94228
-rw-r--r--. 1 root root  2935032  2月  5 11:08 global-6.5.6.tar.gz
-rw-r--r--. 1 root root 88959056  1月 19 21:48 kernel-3.10.0-514.6.1.el7.src.rpm
-rw-r--r--. 1 root root  4581045 12月 16 06:17 systemd-219-30.el7_3.6.src.rpm
[root@CentOS7 src]#

ソースの展開

[root@CentOS7 src]# tar xzvf global-6.5.6.tar.gz
global-6.5.6/
global-6.5.6/acinclude.m4
global-6.5.6/aclocal.m4
global-6.5.6/AUTHORS

[root@CentOS7 src]# ll
合計 94232
drwxr-xr-x. 21  501 wheel     4096 12月 19 09:58 global-6.5.6
-rw-r--r--.  1 root root   2935032  2月  5 11:08 global-6.5.6.tar.gz
-rw-r--r--.  1 root root  88959056  1月 19 21:48 kernel-3.10.0-514.6.1.el7.src.rpm
-rw-r--r--.  1 root root   4581045 12月 16 06:17 systemd-219-30.el7_3.6.src.rpm
[root@CentOS7 src]#

make install

ディレクトリの移動

[root@CentOS7 src]#
[root@CentOS7 src]# cd global-6.5.6
[root@CentOS7 global-6.5.6]# pwd
/usr/local/src/global-6.5.6
[root@CentOS7 global-6.5.6]#

./configure

[root@CentOS7 global-6.5.6]# pwd
/usr/local/src/global-6.5.6
[root@CentOS7 global-6.5.6]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for emacs... no
checking for xemacs... no
checking where .elc files should go... ${datadir}/emacs/site-lisp
checking for perl... /usr/bin/perl
checking for ar... ar
checking for a Python interpreter with version >= 2.6... python
checking for python... /usr/bin/python
checking for python version... 2.7
checking for python platform... linux2
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib64/python2.7/site-packages
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking what extension is used for runtime loadable modules... .so
checking what variable specifies run-time module search path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib /usr/lib64/mysql
checking for library containing dlopen... -ldl
checking for dlerror... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dld_link in -ldld... no
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_add... yes
checking for argz_append... yes
checking for argz_count... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking if argz actually works... yes
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for ltdl.h... no
checking where to find libltdl headers... -I$(top_srcdir)/libltdl
checking where to find libltdl library... $(top_build_prefix)libltdl/libltdlc.la
checking for unistd.h... (cached) yes
checking for dl.h... no
checking for sys/dl.h... no
checking for dld.h... no
checking for mach-o/dyld.h... no
checking for dirent.h... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for strlcat... no
checking for strlcpy... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking whether stat file-mode macros are broken... no
checking whether time.h and sys/time.h may both be included... yes
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for size_t... yes
checking for struct stat.st_blksize... yes
checking whether byte ordering is bigendian... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for ssize_t... yes
checking for caddr_t... yes
checking size of int... 4
checking size of short... 2
checking size of char... 1
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for working memcmp... yes
checking return type of signal handlers... void
checking for strftime... yes
checking for getcwd... yes
checking for putenv... yes
checking for lstat... yes
checking for snprintf... yes
checking for index... yes
checking for rindex... yes
checking for bzero... yes
checking for bcmp... yes
checking for bcopy... yes
checking for strchr... yes
checking for strrchr... yes
checking for memset... yes
checking for memcmp... yes
checking for memmove... yes
checking for putc_unlocked... yes
checking for getc_unlocked... yes
checking for gettimeofday... yes
checking for getrusage... yes
checking whether we are using the GNU DJGPP compiler... no
configure: checking "location of ncurses.h file"...
Found ncurses on /usr/include/ncurses.h
checking for ncurses version... 5.9
checking for an ANSI C-conforming const... (cached) yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... (cached) yes
checking for sighandler_t... no
checking for sigsetjmp... yes
checking for fixkeypad... no
checking for strerror... yes
checking for sqlite3 support... no
checking for home-etc support... no
checking for pread/pwrite support... no
checking for exuberant ctags program... no
checking for universal ctags program... no
checking for POSIX sort program... using /usr/bin/sort
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gtags.conf
config.status: creating Doxyfile
config.status: creating libutil/langmap.h
config.status: creating libutil/Makefile
config.status: creating gtags/Makefile
config.status: creating htags/Makefile
config.status: creating libdb/Makefile
config.status: creating global/Makefile
config.status: creating gozilla/Makefile
config.status: creating gtags-cscope/Makefile
config.status: creating globash/Makefile
config.status: creating htags-refkit/Makefile
config.status: creating htags-server/Makefile
config.status: creating libglibc/Makefile
config.status: creating doc/Makefile
config.status: creating icons/Makefile
config.status: creating jquery/Makefile
config.status: creating jquery/images/Makefile
config.status: creating script/Makefile
config.status: creating libparser/Makefile
config.status: creating plugin-factory/Makefile
config.status: creating plugin-factory/pygments_parser.py
config.status: creating libltdl/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
[root@CentOS7 global-6.5.6]#

make & install

[root@CentOS7 global-6.5.6]# make
[root@CentOS7 global-6.5.6]# make install

使ってみる

インストールが完了したので,早速動作を確認して見る。
CentOS7から採用されたsystemdのソースコードを対象にタグ付けしてみる

ソースコードが保存されているディレクトリに移動する

[root@CentOS7 systemd-219]# pwd
/root/rpmbuild/SOURCES/systemd-219
[root@CentOS7 systemd-219]#

タグ付け(ソースコードの解析)

タグ付けのコマンドは

  • gtags -v
[root@CentOS7 systemd-219]# gtags -v
[Sun Feb 05 11:17:03 JST 2017] Gtags started.
 Using default configuration.
[Sun Feb 05 11:17:03 JST 2017] Creating 'GTAGS' and 'GRTAGS'.
 [1] extracting tags of man/glib-event-glue.c
 [2] extracting tags of src/ac-power/ac-power.c
 [3] extracting tags of src/activate/activate.c
 [4] extracting tags of src/analyze/analyze.c
 [5] extracting tags of src/analyze/analyze-verify.c
 [6] extracting tags of src/analyze/analyze-verify.h
 [7] extracting tags of src/ask-password/ask-password.c
 [8] extracting tags of src/backlight/backlight.c
 [9] extracting tags of src/binfmt/binfmt.c

 [996] extracting tags of libsystemd-daemon.c
 [997] extracting tags of libsystemd-id128.c
 [998] extracting tags of libsystemd-journal.c
 [999] extracting tags of libsystemd-login.c
 [1000] extracting tags of test-libsystemd-sym.c
 [1001] extracting tags of test-libudev-sym.c
[Sun Feb 05 11:17:04 JST 2017] Done.
[root@CentOS7 systemd-219]#

ソースコードgrep

GLOBALコマンドを利用して,ソースコードgrepする
コマンドは

  • global -g 検索文字列

下の例では「ctrl-alt-del」を検索しています。

[root@CentOS7 systemd-219]# global -g ctrl-alt-del
src/core/manager.c
src/shared/special.h
[root@CentOS7 systemd-219]# global -gx ctrl-alt-del
ctrl-alt-del      363 src/core/manager.c                 log_warning_errno(errno, "Failed to enable ctrl-alt-del handling: %m");
ctrl-alt-del      109 src/shared/special.h #define SPECIAL_CTRL_ALT_DEL_TARGET "ctrl-alt-del.target"
[root@CentOS7 systemd-219]#

[参考]viとの連携のための設定

参考として,GLOBALとviと連携して利用する場合の設定をUPしておきます。

[root@CentOS7 ~]# pwd
/root
[root@CentOS7 ~]#
[root@CentOS7 ~]# mkdir -p ~/.vim/plugin
[root@CentOS7 ~]# find / -name gtags.vim
/usr/local/share/gtags/gtags.vim
/usr/local/src/global-6.5.6/gtags.vim
[root@CentOS7 ~]# cp /usr/local/share/gtags/gtags.vim  ~/.vim/plugin/

試した環境

ホストOS

2500/15.4 MJLT2J/A MacBook Pro Retinaディスプレイ

MacBook Pro (Retina, 13-inch, Late 2013)
macOS High Sierra
 システムのバージョン:    macOS 10.13.3 (17D102)
 カーネルのバージョン:    Darwin 17.4.0
VirtualBox
 VirtualBox バージョン 5.2.8 r121009 (Qt5.6.3)
 Oracle_VM_VirtualBox_Extension_Pack-5.2.8r121009

ゲストOS

[root@CentOS7 ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

GNU Globalのバージョン 

global-6.5.6