Closed SchwarzEM closed 6 years ago
In build.sh
we used
cmake .. -DCMAKE_INSTALL_PREFIX=../inst -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8
And that assumes g++-4.8
and gcc-4.8
are installed. Can you check if they are indeed installed? Our code should work with g++-4.9
too so if you have g++-4.9
you can also try
cmake .. -DCMAKE_INSTALL_PREFIX=../inst -DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9
or maybe try going with your system's default g++ compiler (should work for newer linux distributions)
cmake .. -DCMAKE_INSTALL_PREFIX=../inst
Hi @SchwarzEM,
Were you able to compile successfully?
@govinda-kamath asked: "Were you able to compile successfully?"
Yes, I was -- thanks for asking!
Specifically, I edited ./utils/build.sh so that it changed in the following way:
cmake .. -DCMAKE_INSTALL_PREFIX=../inst -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ """
This worked fine (given availability of GNU/6.2 and CMake/3.7.2) and allowed compilation to complete successfully.
The above came out looking weird -- let me try posting it again.
Line 19 of ./utils/build.sh was originally:
cmake .. -DCMAKE_INSTALL_PREFIX=../inst -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8
I changed it to read:
cmake .. -DCMAKE_INSTALL_PREFIX=../inst -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
which worked.
Thanks for letting us know what the issue was. We'll try automating some of it in our next release.
I've tried compiling HINGE according to the following steps:
This last step seems to work for a while; then, on two different platforms, it gives me the following error message:
""" -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): The CMAKE_C_COMPILER:
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:2 (project): The CMAKE_CXX_COMPILER:
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred! See also "[$HOME]/src/HINGE_11jan2017/build/CMakeFiles/CMakeOutput.log". See also "[$HOME]/src/HINGE_11jan2017/build/CMakeFiles/CMakeError.log". make: *** No targets specified and no makefile found. Stop. """
Is there some reason why I should be getting this error message? I've checked my system to make sure that $CC and $CXX variables are set; they are. I also tried editing the build/CMakeCache.txt file so that it explicitly has CMAKE_C_COMPILER:UNINITIALIZED= and CMAKE_CXX_COMPILER:UNINITIALIZED= pointing to the correct system binaries, but that didn't seem to help.
Is there some specific thing I can do to get the code to actually compile according to the prescribed line-commands for compilation?