Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to know more about RDM indexing errors ? #1389

Closed
fperies opened this issue May 12, 2020 · 7 comments
Closed

How to know more about RDM indexing errors ? #1389

fperies opened this issue May 12, 2020 · 7 comments

Comments

@fperies
Copy link

fperies commented May 12, 2020

Command 'rc -g' reports the following:

[ 81%] 17/21 15:47:32 ~/repo/gnb/uplane/sct/tickler/cpp_testsuites/l2ps/tc/baseline/bl_LoopCellGroupSetupDelete.cpp error in 18ms.  (dirty). (priority 2)
[ 86%] 18/21 15:47:32 ~/repo/gnb/uplane/sct/tickler/cpp_testsuites/l2ps/sctl2ps_support.cpp error in 19ms.  (dirty). (priority 2)

How to find out what is behind those errors ?
Is there any trace I can activate to know more about this issue ?

Thanks
Regards

@casch-at
Copy link
Collaborator

You could try rdm -vvv.

@fperies
Copy link
Author

fperies commented May 12, 2020

I've already tried without any success:

*********************************
info
*********************************
Running a release build
socketFile: /ebs/frperies/.rdm
dataDir: /dev/shm/rtags/
options: 0x40080001c
jobCount: 16

I understand I run into the following condition:
image

Is there any more accurate way to find out what is missing in the DB ?

UPDATE
I've just added the dump of variable hasUnit and it is false:
[ 96%] 26/27 11:48:52 ~/repo/gnb/uplane/sct/tickler/cpp_testsuites/l2ps/sctl2ps_support.cpp error (hasUnit(0)) in 26ms. (dirty). (priority 2).
But I've also checked this file is effectivily in DB (extract from file compile_commands.json):
....
{
"directory": "/ebs/frperies/repo/gnb/uplane/build/tickler",
"command": "/ebs/frperies/repo/gnb/uplane/sdkuplane/prefix-root-list/asik-x86_64-ps_lfs-dynamic-linker-on/usr/bin/x86_64-pc-linux-gnu-g++ --sysroot=/ebs/frperies/repo/gnb/uplane/sdkuplane/prefix-root-list/asik-x86_64-ps_lfs-dynamic-linker-on/toolchain/sysroots/core2-64-pc-linux-gnu ... -include /ebs/frperies/repo/gnb/uplane/build/tickler/cpp_testsuites/l2ps/tc/CMakeFiles/sctl2psTemplatesVars.dir/cmake_pch.hxx -o cpp_testsuites/l2ps/CMakeFiles/sctl2ps_support.dir/sctl2ps_support.cpp.o -c /ebs/frperies/repo/gnb/uplane/sct/cpp_testsuites/l2ps/sctl2ps_support.cpp",
"file": "/ebs/frperies/repo/gnb/uplane/sct/cpp_testsuites/l2ps/sctl2ps_support.cpp"
},
...

How is it possible to get hasUnit to false while file is in the DB ??

Also I've just noticed that maybe some symbols is causing the issue because I get an error prior to the first error of this post:
Error during validation: /ebs/frperies/repo/gnb/uplane/sct/tickler/cpp_testsuites/l2ps/sctl2ps_support.cpp /dev/shm/rtags/%2Febs%2Ffrperies%2Frepo%2Fgnb%2F/6800/symbols doesn't exist

Thanks

@fperies
Copy link
Author

fperies commented May 13, 2020

@cslux : I think I found the issue : this is due to the following include option in compilation command:

-include /ebs/frperies/repo/gnb/uplane/build/tickler/cpp_testsuites/l2ps/tc/CMakeFiles/sctl2psTemplatesVars.dir/cmake_pch.hxx

If I remove this option the error goes away.

It seems that this .cxx file is not indexed according to the following trace:
Shouldn't index /ebs/frperies/repo/gnb/uplane/build/tickler/cpp_testsuites/l2ps/tc/CMakeFiles/sctl2psTemplatesVars.dir/cmake_pch.hxx.cxx because of exclude filter

That is .cxx files are part of the exclude filter by default.
The question now is : how do I remove .cxx files from exclude filter ?

Thanks again for your support !

@fperies
Copy link
Author

fperies commented May 13, 2020

So, I've used the --exclude-filter RDM's option as follows:
--exclude-filter="/cmake/Modules/;/conftest.c*;/tmp/;/private/tmp/;/private/var/*"
and the Shouldn't index message goes away but unfortunately errors are still there.

So, for some reasons the "-include" option in compilation command does not work....

I'm still looking forward your opinion on this topic.

Thanks

@zhihuiFan
Copy link

Hi @fperies can you have a steps to reproduce this issue? If so, I would like to have a try if it is not too complex.

@fperies
Copy link
Author

fperies commented Jun 2, 2020

Hello @zhihuiFan,

My understanding is that RTags does not support compilation commands where the CMake feature precompiled headers has been used.
I'm not a CMake expert but I think that if the CMake macro target_precompile_header() has been used in file CMakeLists.txt then it will add both a warning (-Winvalid-pch) and a preprocessor include directive (-include <path_to_precompiled_header>/cmake_pch.hxx) to the compilation command line of the associated CMake target.
Knowing that, if you want to reproduce it, you have to set up a CMake target with a precompiled header (by using the macro target_precompiled_header()) and then try to index it with RTags. Of course, you will need also to remove string "/CMakeFiles/" from RTags --exclude-filter option as I did above, because CMake put the precompiled headers in some /CMakeFiles/ path within build directory. Then, you should hit the error I've described at the beginning of this issue.

Otherwise, I've found a workaround by using the CMake flag:
image
but I can not really say if it is acceptable in all situations.

Let me know if you need additional information.
Thanks !

@zhihuiFan
Copy link

Hi @fperies :

Actually I was expecting an reproduce steps like

git clone xxxx/demo.git
cmake --version
cmake ..
rc -J .
balabala...

Maybe the steps like above is not easy, and I didn't use CMAKE in my real work, so it would be hard to provide help.

@fperies fperies closed this as completed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants