Hi, I'm trying to generate tags for a complex project (mixed C++/CUDA). I ended up needing such command to satisfy headers' dependencies:
LANG=C CFLAGS="-I/home/eu/simple_sph3d/src -I/home/eu/simple_sph3d/options \ -I/usr/local/cuda/include -I/usr/local/cudasdk/shared/inc/ -D__GNUC__" \ geany -v -g $DIR/geany-GPUSPH.c.tags ~/simple_sph3d/src/*.{h,cuh}
Problem 1: output is
--- [some GTK stuff] Geany-INFO: Added filetype CUDA (52). Geany-INFO: Generating C tags file. Failed to create tags file, perhaps because no tags were found. ---
Problem 2: I compiled sources and put some printf to check what goes wrong in tm_workspace_create_global_tags (from a quick look on the code, I guessed this returns false, right?). I couldn't find out the problem, but I get an additional error (I don't have it with the precompiled version):
--- Geany-INFO: Failed to open /usr/local/share/geany/filetypes.common (No such file or directory) ---
Creating a symlink /usr/local/share/geany/ -> /usr/share/geany/ solves it, so it's just a wrong path somewhere. I have the same problems (failed to create tags) also adding -P and passing only .h files (not .cuh).
What can I do?
Eugenio
On 11 May 2011 06:03, Křištof Želechovski giecrilj@stegny.2a.pl wrote:
Geany-INFO: Failed to open /usr/local/share/geany/filetypes.common (No such file or directory)
This probably means you failed to install Geany properly. Chris
Some distros install Geany in different places.
When compiling (especially for hacking) I use a different prefix so as to not get things mixed up.
For what its worth my personal method is:
Say the source is in /somepath/trunk
Then I build with --prefix=somepath, so all files are installed within somepath, and no system privileges are needed to install, so I *can't* overwrite the system stuff.
Run geany from somepath/bin using ,/geany -c ../config and all user configuration is saved in somepath/config and won't overwrite stuff in your home directory.
Some care is needed to build plugins to use the same prefix, but waf works.
As to your tags problem, possibly the tagmanager doesn't understand what a CUDA file is and so doesn't know how to get tags from it. Did you set the tagparser in your filetype file?
Cheers Lex
Dnia środa, 11 maja 2011 o 00:00:10 Lex Trotman napisał(a):
On 11 May 2011 06:03, Křištof Želechovski giecrilj@stegny.2a.pl wrote:
Geany-INFO: Failed to open /usr/local/share/geany/filetypes.common (No such file or directory)
This probably means you failed to install Geany properly. Chris
Some distros install Geany in different places.
When compiling (especially for hacking) I use a different prefix so as to not get things mixed up.
Actually it did not get mixed up since the system installation was intact.
For what its worth my personal method is:
Say the source is in /somepath/trunk
Then I build with --prefix=somepath, so all files are installed within somepath, and no system privileges are needed to install, so I *can't* overwrite the system stuff.
The ordinary value for somepath is /usr/local for home-grown projects.
Chris
On 05/10/11 10:15, Eugenio Rustico wrote:
[some GTK stuff] Geany-INFO: Added filetype CUDA (52). Geany-INFO: Generating C tags file. Failed to create tags file, perhaps because no tags were found.
I don't know what CUDA is, but if you made a custom filetype, I don't know if Geany will still know how to parse this. Generally, something along the lines of this should work for C++ headers:
`geany -P -g ~/.config/geany/tags/gpusph-1.0.cpp.tags ~/simple_sph3d/src/*.h'
Problem 2: I compiled sources and put some printf to check what goes wrong in tm_workspace_create_global_tags (from a quick look on the code, I guessed this returns false, right?). I couldn't find out the problem, but I get an additional error (I don't have it with the precompiled version):
Geany-INFO: Failed to open /usr/local/share/geany/filetypes.common (No such file or directory)
If you just used `./configure' (no options), Geany will be configured to use /usr/local as the prefix. If you then just run the Geany binary from the source directory (without running `make install'), I think it will give errors like this since you told it (or it defaulted) that the prefix is /usr/local and it will try to find it's files there.
Creating a symlink /usr/local/share/geany/ -> /usr/share/geany/ solves it, so it's just a wrong path somewhere. I have the same problems (failed to create tags) also adding -P and passing only .h files (not .cuh).
What can I do?
I've attached the 'gpusph-1.0.cpp.tags' file I generated from the source code here[1] using the above command. Hopefully that helps.
Cheers, Matthew Brush
[1] http://www.ce.jhu.edu/dalrymple/GPU/GPUSPH/Download_Install.html
2011/5/10 Matthew Brush mbrush@codebrainz.ca:
Creating a symlink /usr/local/share/geany/ -> /usr/share/geany/ solves it, so it's just a wrong path somewhere. I have the same problems (failed to create tags) also adding -P and passing only .h files (not .cuh).
What can I do?
I've attached the 'gpusph-1.0.cpp.tags' file I generated from the source code here[1] using the above command. Hopefully that helps.
Thank you. I loaded the tags generated with
CFLAGS="-D__GNUC__ -I/home/eu/simple_sph3d/src -I/home/eu/simple_sph3d/options/ \ -I/usr/local/cuda/include -I/usr/local/cudasdk/shared/inc/" \ geany -g $DIR/geany-GPUSPH.c.tags ~/simple_sph3d/src/*.h ~/simple_sph3d/src/*.cuh
and the ones you sent. In both cases, only functions are loaded. Some structs (e.g. SimParams) and variables (e.g. *any* variable of class ParticleSystem) are not shown. SimParams is declared in src/Options.h.
Is it the default behaviour (just functions)? Shouldn't I see also variables somewhere?
Eugenio
Sorry, it was my fault. I used the command in the wrong shell, where $DIR was not defined, and it couldn't write the file. If DIR is defined, it's just fine... The "perhaps because no tags were found" put off of my head the possibility that was just a permissions problem. With tagparser == C, cuda headers are fine.
For standard library, to make it work without -P I had to do:
CFLAGS="-D__GXX_EXPERIMENTAL_CXX0X__ -I/usr/include/c++/4.5/ -I/usr/include/c++/4.5/bits" \ geany -g $DIR/geany-stdlib.c.tags /usr/include/std*.h $SELECTED_CPP_HEADERS
with
SELECTED_CPP_HEADERS=$( find /usr/include/c++/4.5 -maxdepth 1 -type f | tr '\n' ' ' )
Explanation: if I just use "/usr/include/c++/4.5/*", geany tries to open the "backwards" directory in /usr/include/c++/4.5 as it was a file and returns an error; that "find" command excludes directories and list files in one row, so that dirs are purged. The "-D__GXX_EXPERIMENTAL_CXX0X__" was by analyzing tgmath.h. Without it, I get this:
--- /usr/include/tgmath.h:245: error: #error "Unsupported compiler; you cannot use <tgmath.h>" --- So it's kind of making tgmath believe it's a normal compiler preprocessing. But I couldn't make it work for "/usr/include/*.h" instead of "/usr/include/std*.h", due to continuous include errors (I finally get a missing ioccom.h, and there is no package providing it). Or should just give up and use -P instead?
Eugenio