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.
Windows XP, Cygwin Scenario: - Create file.h file in C:\test directory - Create 'New C/C++ project' in C:\test_projects directory - Add 'C:/test' into 'Include Directories' property - Add '#include <file.h>' line into C++ file - Press 'Clean and Build' ==> ok - Press 'Clean and Build' again ==> build failed Running "C:\util\cygwin\bin\make.exe -f Makefile CONF=Debug clean" in C:\test_projects\Application_1 /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .clean-conf make[1]: Entering directory `/cygdrive/c/test_projects/Application_1' build/Debug/Cygwin-Windows/newmain.o.d:1: *** несколько образцов цели. Останов. make[1]: Leaving directory `/cygdrive/c/test_projects/Application_1' make: *** [.clean-impl] Ошибка 2 Clean failed. Exit value 2.
Please attach here the following files after the failure: - nbproject/Makefile-${CONF}.mk - build/Debug/Cygwin-Windows/newmain.o.d
Created attachment 71775 [details] Project
I've analyzed the attached project. The line that causes make's complaints is: build/Debug/Cygwin-Windows/newmain.o: newmain.cpp C:/test/file.h Indeed it's incorrect. Colon in path should be escaped: build/Debug/Cygwin-Windows/newmain.o: newmain.cpp C\:/test/file.h Or the path should be in another form: build/Debug/Cygwin-Windows/newmain.o: newmain.cpp /cygdrive/c/test/file.h Those *.d files are generated by gcc, not NetBeans, so this looks like Cygwin gcc bug. The problem does not reproduce in MinGW.
We hadn't such problem in NB6.1, therefore I think it can be showstopper.
The solution could be to pass all paths to gcc in "/cygdrive/c/..." form.
The root cause is that the path to include files is stored as absolute. So the workaround is to transform the path to relative manually in project properties. The problem can not be resolved in a such way only when include directory is on another disk.
Hmm, I see that MinGW is also affected. For Cygwin the workaround is to transform include directories from windows-style path to cygwin-style path, so that C:\test becomes /cygdrive/c/test. It can be done automatically when writing Makefile. For MinGW I'd like to have similar workaround: change C:\test to /c/test. There is some evidence in the Internet that it should work, but it doesn't for me. So a not-so-nice workaround for MinGW is to disable dependency generation when absolute include paths are used.
1. The problem can be triggered by absolute source file paths as well, not only by absolute include directory paths. 2. Same thing happens on Linux: gcc does not escape ':' when generating dependency files, so that make fails to parse those files. But on Linux colon is not a common symbol in paths.
Previously Cygwin's make used to handle Windows paths with colons (with --win32 argument or MAKE_MODE=win32 env variable), but this support has been removed. See http://www.cygwin.com/ml/cygwin-announce/2006-07/msg00008.html MinGW make is recommended if Makefile contains Windows paths. For us it means MSYS make, because we recommend to replace MinGW make with MSYS make :) Configuring toolchains for both Cygwin and MinGW to use MSYS make solves the problem.
See also issue 110752
Fixed in http://hg.netbeans.org/main/rev/0b947aac9fa9
Integrated into 'main-golden', will be available in build *200811301401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0b947aac9fa9 User: Alexey Vladykin <alexey_vladykin@netbeans.org> Log: Fixed #150099 & #153308
Fix failed in build 200812080201. Now the second "Clean&Build" fails on "Clean" /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .clean-conf make[1]: Entering directory `/cygdrive/c/working/nb_trunk_working/issue150099' build/Debug/Cygwin-Windows/_ext/C_/temp/welcome.o.d:1: *** target pattern contains no `%'. Stop. make[1]: Leaving directory `/cygdrive/c/working/nb_trunk_working/issue150099' make: *** [.clean-impl] Error 2 CLEAN FAILED (exit value 2, total time: 3s)
The absolute source path should be normalized in one more place. Fixed with changeset http://hg.netbeans.org/main/rev/89559fd07d56
verified in build 200812150201
Sorry, marked as verified by mistake
It seems that the fix is not integrated yet
fix failed in build 200812150201 with provided org-netbeans-modules-cnd-makeproject.jar The second Clean&Build gives: /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .clean-conf make[1]: Entering directory `/cygdrive/c/working/nb_trunk_working/issue150099' build/Debug/Cygwin-Windows/_ext/C_/temp/welcome.o.d:1: *** target pattern contains no `%'. Stop. make[1]: Leaving directory `/cygdrive/c/working/nb_trunk_working/issue150099' make: *** [.clean-impl] Error 2 CLEAN FAILED (exit value 2, total time: 987ms)
sorry once again the issue has been fixed in trunk. For verifying the tested project should be recreated. Fix does not work for old projects.
Cumulative backport of fix of IZ 150099, 153308 in release65_fixes branch: http://hg.netbeans.org/release65_fixes/rev/3870929f513a
verified in patch2