HingeAssembler / HINGE

Software accompanying "HINGE: Long-Read Assembly Achieves Optimal Repeat Resolution"
http://genome.cshlp.org/content/27/5/747.full.pdf+html?sid=39918b0d-7a7d-4a12-b720-9238834902fd
Other
64 stars 9 forks source link

Cannot compile HINGE; why? #141

Closed SchwarzEM closed 6 years ago

SchwarzEM commented 6 years ago

I've tried compiling HINGE according to the following steps:

git clone https://github.com/fxia22/HINGE.git HINGE_11jan2017 ;

cd HINGE_11jan2017 ;
git submodule init ;
git submodule update ;
./utils/build.sh ;

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:

gcc-4.8

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:

g++-4.8

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?

fxia22 commented 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 
govinda-kamath commented 6 years ago

Hi @SchwarzEM,

Were you able to compile successfully?

SchwarzEM commented 6 years ago

@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:

""" 19c19 < cmake .. -DCMAKE_INSTALL_PREFIX=../inst -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8

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.

SchwarzEM commented 6 years ago

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.

govinda-kamath commented 6 years ago

Thanks for letting us know what the issue was. We'll try automating some of it in our next release.