This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Code assistance fails to locate header files mounted with NFS | ||
---|---|---|---|
Product: | cnd | Reporter: | AE56 |
Component: | Code Model | Assignee: | Vladimir Voskresensky <vv159170> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | comaniac0422, Marc_W |
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | Macintosh (x86) | ||
OS: | Mac OS X | ||
See Also: | https://netbeans.org/bugzilla/show_bug.cgi?id=268070 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Code Assistance/Dump C/C++ Code Model Diagnostic/Preprocessor States
patch to apply after code freeze |
Description
AE56
2014-09-04 18:43:47 UTC
As I understand you have a project located in the home directory. You build the project on a remote host. The remote host can access to source files by path mapping. Please provide more details: 1. Path mapping. 2. If you open your project, does IDE reports missing headers? 3. Does IDE report missing headers after build? 4. Does IDE report missing headers after reparse project (project pop-up menu Code Assistance->Reparse Project)? 5. Provide details about missing header (navigate to broken include directive and press Ctrl+Alt). (In reply to Alexander Simon from comment #1) > As I understand you have a project located in the home directory. > You build the project on a remote host. > The remote host can access to source files by path mapping. Correct. > > Please provide more details: > 1. Path mapping. The path on the remote machine is /home/aevers. This is mounted via nfs on the mac at /Volumes/aevers. Project source files are navigable and editable on the mac. The command to mount: sudo mount -o rw,hard,intr,rsize=8192,wsize=8192,timeo=900,retrans=3,proto=tcp -t nfs rio:/lvm/home07/aevers /Volumes/aevers The NFS volume rio:/lvm/home07/aevers is automounted as /home/aevers when I log in to the remote build host, which is tarzan. > 2. If you open your project, does IDE reports missing headers? IDE reports "Some #include/#error directives failed." Project icon has blue question mark icon in the Projects tree. > 3. Does IDE report missing headers after build? Gcc does not report errors. IDE continues to report, "Some #include/#error directives failed." > 4. Does IDE report missing headers after reparse project (project pop-up > menu Code Assistance->Reparse Project)? Yes, same. > 5. Provide details about missing header (navigate to broken include > directive and press Ctrl+Alt). One example project TestServer, repoorts: Unresolved directive #include "TestServer.h" Then lists a bunch of directories with absolute paths on the /Volumes/aevers volume. The directory that contains TestServer.h is in the list and is black. TestServer.h is in the main project directory, shows up in the Project tree, and can be opened if double-clicked in the project tree. Note that this project builds via cmake and was originally created as a Netbeans project via the "New C++ project from existing sources" dialog." Please open source file with broken include directive and attach output of Project pop-up menu Code Assistance/Dump C/C++ Code Model Diagnostic/Preprocessor States Created attachment 149228 [details]
Code Assistance/Dump C/C++ Code Model Diagnostic/Preprocessor States
(In reply to AE56 from comment #4) > Created attachment 149228 [details] > Code Assistance/Dump C/C++ Code Model Diagnostic/Preprocessor States Thank you, please provide text of broken include directive and #pwd and #ls of directory where included file located. (In reply to Alexander Simon from comment #5) > (In reply to AE56 from comment #4) > > Created attachment 149228 [details] > > Code Assistance/Dump C/C++ Code Model Diagnostic/Preprocessor States > Thank you, please provide text of broken include directive Cannot find include file "HfssServer.h" > and #pwd /Volumes/aevers/repositories/hfm/projects/hfss/apps/HfssServer > and #ls > of directory where included file located. CMakeLists.txt HfssServer.cpp HfssServer.h Options.xml build/ build.sh* main.cpp nbproject/ I have the same issue and I have tested it with version 8.1, but it isn't solved. Are there any updates on this issue? Same issue with 8.1. Also, the relative path problem is still there and I think it is the root of this problem. When you add or new a source file from a remote directory (whatever it's a mounted directory on OS X or network directory on Windows), it always adds the file with an absolute path. The setting of "Always relative" in Tools -> Options -> C/C++ is not working. As a result, NetBeans cannot find the header file that mentioned in your source code such as #include "header.h", because "header.h" is a relative path. However, files in the project have the absolute file path such as "/home/aevers/header.h" (I borrow AE56's case here). To my knowledge, this problem has existed for a couple of years (you can find this question on StackOverview and somewhere else) but no one knows how to solve it. Hello, sorry for the long delay. It's hard to investigate the bug without system where we can reproduce the issue ourselves. May be you can help us. We have a guess that case-sensitivity of file system can be involved here. Could you, please, inform about case-sensitive configuration of your OS? And what is the case-sensitivity of mounted network directories? Could you try the following: If you have your sources on path /Volumes/aevers/repositories please, create on the same volument tmp directory (i.e. /Volumes/aevers/tmp). Then start NB with extra option -J-Djava.io.tmpdir=/Volumes/aevers/tmp If it will help, I will recommend to change your system configuration property to always use case-sensitive file systems. Created attachment 162129 [details]
patch to apply after code freeze
*** This bug has been marked as a duplicate of bug 269098 *** |