Reputation: 351
I'm trying to build an example using cmake which needs python and mpi.I have several python versions installed, pvpython python ipython and anaconda python. I set normal python in my PATH variable (I'm working in ubuntu-linux) I'm new to cmake stuff. Some people stated I have to change toolchainfile.cmake but I cannot locate it in my example files. Any lead on how to solve this? Thanks in advance! Following is the error I get while running ccmake.
CMake Warning at CMakeLists.txt:14 (ADD_EXECUTABLE):
Cannot generate a safe runtime search path for target Fortran90FullExample because files in some directories may conflict with libraries in implicit directories:
runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by
files in:/home/xxx/anaconda/lib
runtime library [libpython2.7.so.1.0] in /usr/lib/x86_64-linux-gnu may be
hidden by files in:
/home/xxx/anaconda/libSome of these libraries may not be found correctly.
Upvotes: 4
Views: 7016
Reputation: 5310
my solution is to deactivate conda and run cmake again
note: need remove old cmake caches
conda deactivate
rm -rf *
cmake ..
Upvotes: 0
Reputation: 51
I renamed the Anaconda folder, and it worked for me.
$ mv anaconda3 anaconda3_temp
then run
$ cmake ..
Once successfully built, then you can rename the Anaconda folder.
Upvotes: 0
Reputation: 351
I searched for the file libz.so.1 in /usr/lib/x86_64-linux-gnu directory and it was in it. So I set the paths specifically for this directory and not the anaconda directories.
This time I used ccmake instead of cmake and I was able to easily give the paths on /usr/lib/x86_64-linux-gnu instead of the anaconda paths. Also I changed my python path from anaconda python to the usual python location which was /usr/bin for me.
I added this to the path PATH=/usr/bin:$PATH This adds it to the front of the PATH variable and does not effect what is already there. Also I had to set PYTHONHOME=$PYTHONPATH to get rid of all the relatedd errors
Upvotes: 1