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.

Bug 149153 - Path to make tools cannot contain spaces
Summary: Path to make tools cannot contain spaces
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Alexander Simon
URL:
Keywords:
: 152365 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-04 13:53 UTC by habbit
Modified: 2010-04-17 08:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description habbit 2008-10-04 13:53:20 UTC
NetBeans 6.1 w/CND pack mishandles paths with spaces in Windows (at least) because it either fails to escape them or
quote the whole path. In particular, I have GFortran installed into C:\Program Files\gfortran, so all my tools are in
the bin subdirectory of that folder. Trying to build the project reports:

------ Output - FTest (Build)

Running "C:\Program Files\gfortran\bin\make.exe -f Makefile CONF=debug" in "C:\Users\javier\Documents\NetBeansProjects\FTest

"C:\Programª is not recognized as an internal or external
command, application or batch file

Build failed. Exit value 1

------

Clearly NetBeans is running the make.exe without noticing that it should either quote it or escape the space in "Program
Files" - I don't know cmd.exe very well so escaping might not be possible, but the command line would have failed under
MSys, so quoting would be the most sensible approach.
Comment 1 _ gordonp 2008-10-05 05:36:01 UTC
I'll look at this next week. Bear in mind that Unixish tools like GNU make, gcc, and g++
do have limitations with respect to spaces in paths. This one might be OK, but no guarantees.

Although I'll look at it next week, its not critical enough to consider for NB 6.5 (which is
very close to code freeze for FCS).
Comment 2 Leonid Lenyashin 2008-10-07 21:49:49 UTC
This issue filed after code freeze for P3s.
Comment 3 habbit 2008-10-08 12:51:10 UTC
I don't really know how strict the freeze policies are in the NetBeans project, but this change might consist of just
looking for the line of code that invokes external commands and make it quote them. If it works, then life is beautiful;
if it doesn't, then it is reverted and the issue set for re-examination after the release. Would that be acceptable? I
could even propose the patch myself if it's OK and people here are too busy with the release...
Comment 4 Leonid Lenyashin 2008-10-08 13:06:13 UTC
NO65 Keyword has been misused.
Comment 5 Thomas Preisler 2009-02-13 21:29:20 UTC
*** Issue 152365 has been marked as a duplicate of this issue. ***
Comment 6 Egor Ushakov 2009-05-22 14:32:02 UTC
i can see that MakeArtifacts' getBuildCommand and getCleanCommand prevented us from having spaces in tool path,
but now makeFlags are always empty (see usages of the above methods), so we can provide tool path to the execution.
Comment 7 Alexander Simon 2009-11-11 07:25:57 UTC
Bug can be reproduced on any platform.
Comment 8 Alexander Simon 2009-11-11 07:33:17 UTC
Make can be fixed if IDE provides environment variable.
For example: this is work right on unix:

#/opt/SUNWspro\ old/prod/bin/dmake MAKE="/opt/SUNWspro\ old/prod/bin/dmake"

But exist a couple other places with bad escaping.
Comment 9 Thomas Preisler 2010-04-12 21:15:49 UTC
A lot has changed since this bug was filed, but the bug is still there. I made a fix in make project how it setups the make command and it should be correct now. The ProjectAction now ends up in RemoteBuildAction Handler and I think it is not handling the space correctly in the exe command. Will reassign to Vladimir K. for further evaluation. I think the fix is somewhere in RemoteBuildAction where it needs to either escape the space or quote the path.
Comment 10 Quality Engineering 2010-04-13 17:38:11 UTC
Integrated into 'main-golden', will be available in build *201004131450* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/13f27bb3eab9
User: Thomas Preisler <thp@netbeans.org>
Log: #149153 Path to make tool cannot contain spaces
Comment 11 Alexander Simon 2010-04-16 16:02:38 UTC
no remote issues, only project bugs.
Comment 12 Alexander Simon 2010-04-16 16:15:55 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/b7ec219c95ea
Comment 13 Quality Engineering 2010-04-17 08:18:03 UTC
Integrated into 'main-golden', will be available in build *201004170515* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b7ec219c95ea
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed BZ#149153 Path to make tools cannot contain spaces