freebayes: Compliation problems

A strange error occured when I typed make. Maybe you can help me ?

xapple@cluster freebayes ((03cb231...)) $ make
cd src && make
make[1]: Entering directory `~/test/freebayes/src'
cd ../bamtools && mkdir -p build && cd build && cmake .. && make
-- The C compiler identification is unknown
-- The CXX compiler identification is GNU
-- Check for working C compiler: /bubo/sw/comp/gcc/4.6.3_kalkyl/bin/g++
-- Check for working C compiler: /bubo/sw/comp/gcc/4.6.3_kalkyl/bin/g++ -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
  The C compiler "/bubo/sw/comp/gcc/4.6.3_kalkyl/bin/g++" is not able to
  compile a simple test program.

  It fails with the following output:

   Change Dir: ~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp



  Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"

  gmake[2]: Entering directory
  `~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp'

  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  gmake[3]: Entering directory
  `~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp'

  /usr/bin/cmake -E cmake_progress_report
  ~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o

  /bubo/sw/comp/gcc/4.6.3_kalkyl/bin/g++ -o
  CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
  ~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp/testCCompiler.c



  ~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp/testCCompiler.c:2:3:
  error: #error "The CMAKE_C_COMPILER is set to a C++ compiler"

  gmake[3]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o] Error 1

  gmake[3]: Leaving directory
  `~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp'

  gmake[2]: *** [cmTryCompileExec/fast] Error 2

  gmake[2]: Leaving directory
  `~/test/freebayes/bamtools/build/CMakeFiles/CMakeTmp'





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:9 (project)


-- Configuring incomplete, errors occurred!
make[1]: *** [../bamtools/lib/libbamtools.a] Error 1
make[1]: Leaving directory `~/test/freebayes/src'
make: *** [all] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 15

Most upvoted comments

CMake is bullshit

I encountered the same problem, trying to compile with the Intel suite.

The problem comes from the src/Makefile. It uses the well-known “CC” variable for the C++ compiler, and “C” for the C compiler. It should be “CC” for the C comp, and CXX for the C++ comp.

As a workaround, I changed the value of “CC” to “icc”, then “make …/bamtools/lib/libbamtools.a”, and changed again CC to “icpc” to make the rest.