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
build: nmake adds space before 1st / in 1st arg to a command invoked with quotes #84
Comments
From derek.br...@gmail.com on March 09, 2009 11:44:50 I fixed in r81 with -Dfoo => -D foo for 1st arg. but what about these:
will hit the issue if someone uses perl installed on path with a space in Labels: -Priority-Critical Priority-Medium |
From derek.br...@gmail.com on March 09, 2009 12:33:08 Summary: build: nmake adds space before 1st / in 1st arg to a command invoked with quotes |
From derek.br...@gmail.com on March 09, 2009 12:43:42 here is a simple Makefile that shows the bug (you may have to update for your cygwin Test case for issue
|
From derek.br...@gmail.com on March 09, 2009 17:58:00 bug is present in older versions of nmake as well: Microsoft (R) Program Maintenance Utility Version 7.10.3077 Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 |
From derek.br...@gmail.com on March 12, 2009 09:42:02 filed CMake request to not use quotes: http://www.cmake.org/Bug/view.php?id=8727 |
From derek.br...@gmail.com on March 09, 2009 14:27:25
when invoked through nmake with a path to cmake that is quoted, if the
1st parameter to cmake is -Dvar=val and val contains a /, all chars
from the / onward are deleted from val: tracked it down to an nmake bug.
workaround is to have 1st parameter not contain any forward slashes, or,
alternatively, to put a space after -D.
for me, from clean slate if I invoke as
e:/PROGRA
2/CMAKE21.6/bin/cmake.exe then 1st build.make runs fine b/c noquotes around cmake.exe command:
% grep -r proj_src api/
api/docs/CMakeFiles/htmldocs.dir/build.make:
e:\PROGRA
2\CMAKE21.6\bin\cmake.exe-Dsrcdir=D:/derek/opensource/dynamorio/api/docs
-Doutfile=D:/derek/opensource/bb/api/docs/Doxyfile
-Dproj_srcdir=D:/derek/opensource/dynamorio -Dversion_number=1.3.2
-Dheader_dir=D:/derek/opensource/bb/include
-DDOXYGEN_EXECUTABLE=E:/cygwin/bin/doxygen.exe -P
D:/derek/opensource/dynamorio/api/docs/CMake_doxyfile.cmake
but if I touch a cmake file and it re-gens on "nmake" it now uses:
api/docs/CMakeFiles/htmldocs.dir/build.make: "E:\Program Files
(x86)\CMake 2.6\bin\cmake.exe"
-Dsrcdir=D:/derek/opensource/dynamorio/api/docs
-Doutfile=D:/derek/opensource/bb/api/docs/Doxyfile
-Dproj_srcdir=D:/derek/opensource/dynamorio -Dversion_number=1.3.2
-Dheader_dir=D:/derek/opensource/bb/include
-DDOXYGEN_EXECUTABLE=E:/cygwin/bin/doxygen.exe -P
D:/derek/opensource/dynamorio/api/docs/CMake_doxyfile.cmake
=> we get error on 1st arg:
[ 80%] Generating Doxyfile
CMake Error at
D:/derek/opensource/dynamorio/api/docs/CMake_doxyfile.cmake:41 (file):
file Internal CMake error when trying to open file: D:/API.doxy for
reading.
if I invoke from clean slate w/ backslashes then get error right away.
cd D:\derek\opensource\bb\api\docs
"E:\Program Files (x86)\CMake 2.6\bin\cmake.exe"
-Dsrcdir=D:/derek/opens
have script print out args:
srcdir="D:" outfile="D:/derek/opensource/bb/api/docs/Doxyfile"
proj_srcdir="D:/d
but if I directly invoke in same way, from cmd, works fine:
D:\derek\opensource\bb\api\docs>"E:\Program Files (x86)\CMake
2.6\bin\cmake.exe" -Dsrcdir=D:/derek/opensource/dynamorio/api/docs
-Doutfile=D:/derek/opensource/bb/api/docs/Doxyfile
-Dproj_srcdir=D:/derek/opensource/dynamorio -Dversion_number=1.3.2
-Dheader_dir=D:/derek/opensource/bb/include
-DDOXYGEN_EXECUTABLE=E:/cygwin/bin/doxygen.exe -P
D:/derek/opensource/dynamorio/api/docs/CMake_doxyfile.cmake
srcdir="D:/derek/opensource/dynamorio/api/docs"
outfile="D:/derek/opensource/bb/api/docs/Doxyfile"
proj_srcdir="D:/derek/opensource/dynamorio"
add bogus 1st arg => 2nd arg is fine:
"E:\Program Files (x86)\CMake 2.6\bin\cmake.exe" -Dfoo=x
-Dsrcdir=D:/derek/opensource/dynamorio/api/docs
-Doutfile=D:/derek/opensource/bb/api/docs/Doxyfile
-Dproj_srcdir=D:/derek/opensource/dynamorio -Dversion_number=1.3.2
-Dheader_dir=D:/derek/opensource/bb/include
-DDOXYGEN_EXECUTABLE=E:/cygwin/bin/doxygen.exe -P
D:/derek/opensource/dynamorio/api/docs/CMake_doxyfile.cmake
tweak 1st arg => it's deleting everything after the 1st forward slash
backward slash works fine: only forward slash
add :PATH => no difference
if put space after -D => works fine
have cmake pause (ran "cat") and attach to debugger so I can see real
cmdline (here I had replaced 1st / with \ on srcdir):
%
/trees/64bit/tools/DRview.exe -cmdline -pid 34962\CMAKE2~1.6\bin\cmake.exe -Dsrcdir=D:\derekPID 3496, Process cmake.exe, running native
Cmdline: e:\PROGRA
/opensource/dynamorio/api/docs
-Doutfile=D:/derek/opensource/bb/api/docs/Doxyfile
-Dproj_srcdir=D:/derek/opensource/dynamorio -Dversion_number=1.3.2
-Dheader_dir=D:/derek/opensource/bb/include
-DDOXYGEN_EXECUTABLE=E:/cygwin/bin/doxygen.exe -P
D:/derek/opensource/dynamorio/api/docs/CMake_doxyfile.cmake
=> it's an nmake bug
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=84
The text was updated successfully, but these errors were encountered: