bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GTAGSLIBPATH definition search


From: Shigio YAMAGUCHI
Subject: Re: GTAGSLIBPATH definition search
Date: Thu, 26 Feb 2015 19:00:06 +0900

Hi all,
I have fixed the bug in the repository.
Please try when you feel like it.

Thanks
Shigio


2015-02-25 19:03 GMT+09:00 Shigio YAMAGUCHI <address@hidden>:
Hi,
I could reproduce the bug.

[Bug]
global(1) cannot work with GTAGSLIBPATH + -c option.

[Workaround]
Please use gtags without the -c option in the library paths.

> Is it possible to store the GTAGSROOT in the DB file itself
(the project root is known at DB creation time)?

Though it is impossible, the --objdir option of gtags might help you.

> Is it also possible to make a command line option to global to specify DB path
> (instead of using GTAGSDBPATH)? For example --gtagsdbpath=<path>.

How about by the following?

$ GTAGSDBPATH=xxxx global ...

Thank you for the report.
This bug will be fixed soon.

Regards,
Shigio


2015-02-25 18:29 GMT+09:00 Pavel Nedev <address@hidden>:
Hi,

Yes, of course.
Here is what I do (* is command, > is output) :

*       global --version

>       global (GNU GLOBAL) 6.3.4

*       cd /usr/include
*       sudo gtags -c
*       cd ~/workspace/project/
*       gtags -c
*       export GTAGSLIBPATH=/usr/include
*       global -dxMT resolve

>       Warning: source file './boost/asio/detail/resolver_service.hpp' is not available.
>       resolve 59 ../../../../usr/include/boost/asio/detail/resolver_service.hpp
>       resolve 91 ../../../../usr/include/boost/asio/detail/resolver_service.hpp

There are several other matches but I have omitted them to keep things concise and clear. The pattern is the same - Warning about './boost/....' file not available and match results for '../../../../usr/include/boost/....'.

*       cat ../../../../usr/include/boost/asio/detail/resolver_service.hpp

Works just fine, the file opens without problems.

I also tried creating library DB in another folder without sudo:

*       (pwd = /usr/include)    gtags -c ~/temp
*       export GTAGSLIBPATH=~/temp

The result is a bit weird, the relative file path in the match is relative to the location of the library DB (~/temp in this case):

>       Warning: source file './boost/asio/detail/resolver_service.hpp' is not available.
>       resolve 59 ../../temp/boost/asio/detail/resolver_service.hpp
>       resolve 91 ../../temp/boost/asio/detail/resolver_service.hpp

Logically,
'../../temp/boost/asio/detail/resolver_service.hpp'
doesn't exist.


I also see that if I create DB for the project in another folder, let's say I do

*       (pwd = ~/workspace/project)             gtags -c ~/temp

then I need to set GTAGSROOT to the project root and GTAGSDBPATH to the DB path to be able to use global successfully.

Is it possible to store the GTAGSROOT in the DB file itself (the project root is known at DB creation time)?
Is it also possible to make a command line option to global to specify DB path (instead of using GTAGSDBPATH)? For example --gtagsdbpath=<path>.
This will be useful if you have several projects and you make DB files for all of them at different places. Now you'll need to change GTAGSROOT and GTAGSDBPATH for every project.


Thanks & Regards,
Pavel

-- 
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3



--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]