title: CMake reports GCC is broken. Where do I start?
body: <p>I am trying to compile a project, but CMake stops right at the beginning with the message that gcc is broken (see below). I am ignoramus when it comes to CMake, so any help where to get me starting debugging this problem is very very welcome.</p>
  
  <ul>
  <li>GCC (Ubuntu/Linaro 4.6.3-1ubuntu5) <strong>4.6.3</strong> (I checked that my GCC compiles a 'hello world' problem)</li>
  <li>CMake version <strong>2.8.7</strong></li>
  <li>CMake command: <code>cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../Mantid</code></li>
  </ul>
  
  <p><strong>Output to terminal:</strong></p>
  
  <blockquote>
    <p>-- The C compiler identification is GNU <br/>
    -- The CXX compiler identification is GNU <br/>
    -- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong. <br/>
    -- Check for working C compiler: /usr/bin/gcc-4.6 <br/>
    -- Check for working C compiler: /usr/bin/gcc-4.6 -- <strong>broken</strong> <br/> CMake Error at
    /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52
    (MESSAGE): <br/>   <strong>The C compiler "/usr/bin/gcc-4.6" is not able to
    compile a simple testprogram.</strong></p>
  </blockquote>
  
  <p>It fails with the following output:</p>
  
  <blockquote>
    <p>Change Dir:
    /home/jmborr/devel/mantidproject/mantid/Code/debug/CMakeFiles/CMakeTmp</p>
    
    <p>Run Build Command:/usr/bin/make "cmTryCompileExec/fast"</p>
    
    <p>/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
    CMakeFiles/cmTryCompileExec.dir/build</p>
    
    <p>make[1]: Entering directory
    `/home/jmborr/devel/mantidproject/mantid/Code/debug/CMakeFiles/CMakeTmp'</p>
    
    <p>/usr/bin/cmake -E cmake_progress_report
    /home/jmborr/devel/mantidproject/mantid/Code/debug/CMakeFiles/CMakeTmp/CMakeFiles
    1</p>
    
    <p>Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o</p>
    
    <p>/usr/bin/gcc-4.6 /usr/include -o
    CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
    /home/jmborr/devel/mantidproject/mantid/Code/debug/CMakeFiles/CMakeTmp/testCCompiler.c</p>
    
    <p><strong>gcc-4.6: warning: /usr/include: linker input file unused because
    linking not done</strong></p>
    
    <p>Linking C executable cmTryCompileExec</p>
    
    <p>/usr/bin/cmake -E cmake_link_script
    CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1</p>
    
    <p>/usr/bin/gcc-4.6 /usr/include /usr/lib
    CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o cmTryCompileExec
    -rdynamic</p>
    
    <p><strong>/usr/bin/ld: cannot find /usr/include: File format not
    recognized</strong></p>
    
    <p><strong>/usr/bin/ld: cannot find /usr/lib: File format not recognized</strong></p>
    
    <p>collect2: ld returned 1 exit status</p>
    
    <p>make[1]: Leaving directory</p>
  </blockquote>