{"action":"created","issue":{"url":"https://api.github.com/repos/Andersbakken/rtags/issues/404","labels_url":"https://api.github.com/repos/Andersbakken/rtags/issues/404/labels{/name}","comments_url":"https://api.github.com/repos/Andersbakken/rtags/issues/404/comments","events_url":"https://api.github.com/repos/Andersbakken/rtags/issues/404/events","html_url":"https://github.com/Andersbakken/rtags/issues/404","id":101048519,"number":404,"title":"Cannot find system headers","user":{"login":"hotpxl","id":2174815,"avatar_url":"https://avatars.githubusercontent.com/u/2174815?v=3","gravatar_id":"","url":"https://api.github.com/users/hotpxl","html_url":"https://github.com/hotpxl","followers_url":"https://api.github.com/users/hotpxl/followers","following_url":"https://api.github.com/users/hotpxl/following{/other_user}","gists_url":"https://api.github.com/users/hotpxl/gists{/gist_id}","starred_url":"https://api.github.com/users/hotpxl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hotpxl/subscriptions","organizations_url":"https://api.github.com/users/hotpxl/orgs","repos_url":"https://api.github.com/users/hotpxl/repos","events_url":"https://api.github.com/users/hotpxl/events{/privacy}","received_events_url":"https://api.github.com/users/hotpxl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-14T16:33:09Z","updated_at":"2015-08-14T16:46:20Z","closed_at":null,"body":"The problem looks like this.\r\n\r\nI started with `rdm -vv` to show some debugging information. Before that I cleaned `.rtags` directory. I had a simple C++ file like:\r\n\r\n    #include <cstdio>\r\n    int main() {}\r\n\r\nI had my `g++` symlinked. So I invoke `g++ main.cpp`. This will instruct `rdm` to index this file. Instead I got this back:\r\n\r\n> listening /home/lyt/.rdm\r\n> Running with 32 jobs, using args: -ferror-limit=0 -Wall -fspell-checking -Wno-unknown-warning-option\r\n> Includepaths: -isystem /home/lyt/nix/store/mwx6w59gp3l0959a8c6bbbk3zk6ay3hb-llvm-3.6.2/lib/clang/3.6.2/include/\r\n> Source::parse ( /usr/bin/g++-4.9 main.cpp ) => List<String>(/usr/bin/g++-4.9, main.cpp) /home/lyt/tmp/haha/\r\n> Parsed Source(s) successfully: List<Source>(Source(/usr/bin/g++-4.9 -ferror-limit=0 -Wall -fspell-checking -Wno-unknown-> warning-option -isystem /home/lyt/nix/store/mwx6w59gp3l0959a8c6bbbk3zk6ay3hb-llvm-3.6.2/lib/clang/3.6.2/include/ /home/lyt/> tmp/haha/main.cpp Build: /home/lyt/tmp/haha/))\r\n> Starting process for 1 4294967299 0x246f7f0\r\n> job got index data message 1 4294967299 0x246f7f0\r\n> [100%] 1/1 00:29:35 ~/tmp/haha/main.cpp in 5ms. (2 syms, 4 symNames, 0 includes, 1 of 1 files, symbols: 2 of 2, 0 queried) > (4/0/1ms). (priority 0)\r\n> Jobs took 0.01s. We're using 2mb of memory.\r\n> Output from /home/lyt/tmp/haha/main.cpp:\r\n> CI::parse: List<String>(-ferror-limit=0, -Wall, -fspell-checking, -Wno-unknown-warning-option, -isystem, /home/lyt/nix/> store/mwx6w59gp3l0959a8c6bbbk3zk6ay3hb-llvm-3.6.2/lib/clang/3.6.2/include/, )\r\n> \r\n> /home/lyt/tmp/haha/main.cpp:1:10: fatal error: 'cstdio' file not found\r\n> CI::parse loading unit: clang -ferror-limit=0 -Wall -fspell-checking -Wno-unknown-warning-option -isystem /home/lyt/nix/> store/mwx6w59gp3l0959a8c6bbbk3zk6ay3hb-llvm-3.6.2/lib/clang/3.6.2/include/  /home/lyt/tmp/haha/main.cpp true\r\n> couldn't create included file inclusion directive i cstdio /home/lyt/tmp/haha/main.cpp:1:1\r\n\r\nAnyways it says it couldn't find `cstdio`, which is part of standard headers.\r\n\r\nI built `rdm` using a `nix-shell`. The built was correct. I don't know if you have used Nix before. But the main difference it had every shared library's `RPATH` hard-coded so it will link to a specific version. Besides, it's no different than a normal build.\r\n\r\nWonder why it can't find system headers. Could you provide me more instructions on debugging this?"},"comment":{"url":"https://api.github.com/repos/Andersbakken/rtags/issues/comments/131175926","html_url":"https://github.com/Andersbakken/rtags/issues/404#issuecomment-131175926","issue_url":"https://api.github.com/repos/Andersbakken/rtags/issues/404","id":131175926,"user":{"login":"hotpxl","id":2174815,"avatar_url":"https://avatars.githubusercontent.com/u/2174815?v=3","gravatar_id":"","url":"https://api.github.com/users/hotpxl","html_url":"https://github.com/hotpxl","followers_url":"https://api.github.com/users/hotpxl/followers","following_url":"https://api.github.com/users/hotpxl/following{/other_user}","gists_url":"https://api.github.com/users/hotpxl/gists{/gist_id}","starred_url":"https://api.github.com/users/hotpxl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hotpxl/subscriptions","organizations_url":"https://api.github.com/users/hotpxl/orgs","repos_url":"https://api.github.com/users/hotpxl/repos","events_url":"https://api.github.com/users/hotpxl/events{/privacy}","received_events_url":"https://api.github.com/users/hotpxl/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T16:46:20Z","updated_at":"2015-08-14T16:46:20Z","body":"I tried `rdm` on my Mac (where it works perfectly). Now I could find the header `cstdio`, but the `cstdio` file isn't in the `Includepaths` either. So I guess this is not related to `Includepaths`?"}}