-
Notifications
You must be signed in to change notification settings - Fork 264
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
Can't build Dr. Memory when giving DR root as a relative path #67
Comments
From timurrrr@google.com on October 27, 2010 08:23:33 With r79 , I get the following error: cd drmemory\build CMake Warning at CMakeLists.txt:379 (find_package): Adjust CMAKE_MODULE_PATH to find FindDynamoRIO.cmake or set DynamoRIO_DIR
... though there IS the file in Dynamorio_DIR! |
From derek.br...@gmail.com on October 27, 2010 08:47:51 r79 requires DR 2.1 so it requires a full build from the latest DR sources (b/c of DR issue #34) |
From derek.br...@gmail.com on October 27, 2010 08:48:02 r79 requires DR 2.1 so it requires a full build from the latest DR sources (b/c of DR issue #34) |
From timurrrr@google.com on October 27, 2010 09:27:00 r474 is the latest DR revision, isn't it? |
From derek.br...@gmail.com on October 27, 2010 09:31:24 I first tried your .bat with r75 and I did hit the "Could not find module FindDynamoRIO.cmake..." but when I switch its DynamoRIO_DIR to use an absolute path it configures and builds. With r79 I get the same behavior. Looks like a CMake issue: probably CMake cd's to a subdir and then references the path or something. In my own builds it looks like I'm always using absolute paths. With Unix Makefiles in cygwin I see the same behavior. I have not been able to repro the TRY_EXCEPT syntax errors: I have to assume something prevented the newer DR exported include files from replacing the older. Can you repro that and check whether DR_TRY_EXCEPT is in the exported headers? It's building fine for me other than not working w/ the relative DynamoRIO_DIR path. |
From derek.br...@gmail.com on October 27, 2010 09:35:43
Yes, sorry, I didn't check before posting my comment. Dr. Memory r79 + requires DynamoRIO r469 +. |
From derek.br...@gmail.com on October 27, 2010 09:45:34 Interestingly when the build dir is not a child of the source dir (which is my standard practice and IMHO cleaner), a relative path for DynamoRIO_DIR does work. |
From timurrrr@google.com on October 27, 2010 10:06:12 r79 compiled fine with absolute path given to DynamoRIO_DIR Anyways, thank you very much for the quick help! Status: Verified |
From timurrrr@google.com on October 27, 2010 10:07:24 "-DDynamoRIO_DIR:FILEPATH=..\dynamorio\exports\cmake" works. D'oh! |
From timurrrr@google.com on October 27, 2010 10:14:14 ... but not quite entirely: |
From timurrrr@google.com on October 27, 2010 10:22:57 Can you please fix this small issue? I'm not good at CMake... Summary: Can't build Dr. Memory when giving DR root as a relative path |
From derek.br...@gmail.com on October 27, 2010 10:39:57 Can you re-list the exact command sequence you're using now? I'm not sure where you're putting your build dir, etc. |
From timurrrr@google.com on October 27, 2010 10:45:36 (in C:\drmemory-build) |
From derek.br...@gmail.com on October 27, 2010 10:49:58 uh, am I missing something? you're two dirs deep, so your "..\dynamorio" is invalid, so find_package() must be searching standard places like Program Files and your home dir, etc. to find DynamoRIO. it is weird that it seems to find something that works for building drmem but then it tries to use the invalid path you passed in for installing: that doesn't make sense. what is DynamoRIO_DIR set to in your drmemory\build\CMakeCache.txt? |
From timurrrr@google.com on October 27, 2010 11:17:22 drmemory\build\CMakeCache.txt: |
From derek.br...@gmail.com on October 27, 2010 12:40:21 if you build without specifying DynamoRIO_DIR at all, it should all work, and then CMakeCache.txt should contain the path it used. I believe some CMakeLists.txt changes are in order:
|
From derek.br...@gmail.com on November 02, 2010 14:51:49 in r80 : handle relative and invalid DynamoRIO_DIR paths
can you verify it works for you (you should now be able to use the original .. paths you were using) Status: Fixed |
From timurrrr@google.com on October 27, 2010 11:04:46
(Taken from my comments on r75 )
I build it with the following .bat file:
svn checkout -r 474 http://dynamorio.googlecode.com/svn/trunk/ dynamorio
mkdir dynamorio\build
cd dynamorio\build
cmake -G"NMake Makefiles" -DBUILD_DOCS:BOOL=OFF -DNTDLL_LIBPATH:FILEPATH=C:\WinDDK\7600.16385.1\lib\wxp\i386\ntdll.lib .. && nmake install
cmake -G"NMake Makefiles" -DDEBUG=ON -DBUILD_DOCS:BOOL=OFF -DNTDLL_LIBPATH:FILEPATH=C:\WinDDK\7600.16385.1\lib\wxp\i386\ntdll.lib .. && nmake install
cd ....
svn checkout -r 75 http://drmemory.googlecode.com/svn/trunk/ drmemory
mkdir drmemory\build
cd drmemory\build
cmake -G"NMake Makefiles" -DUSE_DRSYMS=ON -DDynamoRIO_DIR:FILEPATH=....\dynamorio\exports\cmake -DBUILD_DOCS:BOOL=OFF -DNTDLL_LIBPATH:FILEPATH=C:\WinDDK\7600.16385.1\lib\wxp\i386\ntdll.lib .. && nmake install
The last command fails with:
[ 36%] Building C object CMakeFiles/drmemorylib.dir/drmemory/replace.c.obj
replace.c
C:\drmemory-build\drmemory\drmemory\replace.c(517) : error C2059: syntax error : '{'
C:\drmemory-build\drmemory\drmemory\replace.c(519) : error C2143: syntax error : missing ';' before ','
C:\drmemory-build\drmemory\drmemory\replace.c(521) : error C2143: syntax error : missing ';' before ')'
C:\drmemory-build\drmemory\drmemory\replace.c(525) : error C2065: 'orig_addr' : undeclared identifier
C:\drmemory-build\drmemory\drmemory\replace.c(525) : warning C4047: 'function' : 'app_pc' differs in levels of indirection from 'int'
C:\drmemory-build\drmemory\drmemory\replace.c(525) : warning C4024: 'replace_all_strlen' : different types for formal and actual parameter 4
C:\drmemory-build\drmemory\drmemory\replace.c(529) : error C2059: syntax error : 'else'
C:\drmemory-build\drmemory\drmemory\replace.c(536) : error C2059: syntax error : 'if'
C:\drmemory-build\drmemory\drmemory\replace.c(538) : error C2059: syntax error : 'else'
C:\drmemory-build\drmemory\drmemory\replace.c(542) : error C2059: syntax error : '}'
Can you please run the same set of commands and verify it's working / fails?
I can't keep up with the source anymore!
Original issue: http://code.google.com/p/drmemory/issues/detail?id=67
The text was updated successfully, but these errors were encountered: