-
Notifications
You must be signed in to change notification settings - Fork 14
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
Question - cmake runs examples fine but not after I copy them to ~/shared #15
Comments
Remove the CMakeCache.txt file. You have a problem because you first configured the test and then moved the directory. Because of that all the paths are wrong. You need to remove CMakeCache.txt in order to do a clean configure. |
@Rombur Thank you Rombur for your response! Yes I tried that already and posted it in the first message, but I failed to explain it clearly enough (I did not break them up into sub paragraphs). Apologies for the confusion. At first I did forget to remove the
So I removed all those files except for the
And then I re-ran the
|
remove also the directory CMakeFiles…
L.
… On 23 Mar 2018, at 16:14, Yuxiang Wang ***@***.***> wrote:
@Rombur Thank you Rombur for your response! Yes I tried that already and posted it in the first message, but I failed to explain it clearly enough. Apologies for the confusion.
At first I did forget to remove the CMakeCache.txt:
***@***.***:~/dealii-v8.5.1-src/examples/step-1$ cp -r ~/dealii-v8.5.1-src/examples ~/shared/examples
***@***.***:~/dealii-v8.5.1-src/examples/step-1$ cd ~/shared/examples/step-1
***@***.***:~/shared/examples/step-1$ cmake CMakeLists.txt
CMake Error: The current CMakeCache.txt directory /home/dealii/shared/examples/step-1/CMakeCache.txt is different than the directory /home/dealii/dealii-v8.5.1-src/examples/step-1 where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source "/home/dealii/shared/examples/step-1/CMakeLists.txt" does not match the source "/home/dealii/dealii-v8.5.1-src/examples/step-1/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
So I removed all those files except for the step-1.cc and the CMakeLists.txt:
***@***.***:~/shared/examples/step-1$ ls | grep -v 'CMakeLists.txt\|step-1.cc' | xargs rm -rf
***@***.***:~/shared/examples/step-1$ ls
CMakeLists.txt step-1.cc
And then I re-ran the cmake command, and encountered an issue where mpicc is not working:
***@***.***:~/shared/examples/step-1$ cmake CMakeLists.txt
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: /usr/bin/mpicc
-- Check for working C compiler: /usr/bin/mpicc -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/usr/bin/mpicc" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: /home/dealii/shared/examples/step-1/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_f6b04/fast"
make: *** No rule to make target 'cmTC_f6b04/fast'. Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:38 (PROJECT)
-- Configuring incomplete, errors occurred!
See also "/home/dealii/shared/examples/step-1/CMakeFiles/CMakeOutput.log".
See also "/home/dealii/shared/examples/step-1/CMakeFiles/CMakeError.log".
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@luca-heltai Thanks for you response! Yes I did - I only left |
is the directory writeable by you? |
@luca-heltai Thank you for the quick response.
|
Mmmm... it seems like it does not create directories. Can you create directories? |
@luca-heltai Yes I feel the same way - it seems like it failed to create cmTC_a147c/fast. However, it did create all the other folders like CMakeFiles, CMakeTmp. Also, I tried the following:
|
Maybe this could help to debug it. |
Short summary: cmake runs examples fine when I run it in the pre-installed src example folder, but not after I copied it to ~/shared. Could you please help see why?
Full story: first, when I run it in the pre-installed src example folder, it works:
However, if I copy the examples to my local folder, it wouldn't work. (Edit on 3/23 - removed the confusion parts of the code where I forgot to clean the old cmake file first)
(I cleaned the folder and then copied the
examples
to~/shared/examples
)Could you please help?
Thank you,
Shawn
The text was updated successfully, but these errors were encountered: