Message: Re: Having Trouble Installing Geant4.9.5.p02 - CMake Issues Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: Having Trouble Installing Geant4.9.5.p02 - CMake Issues 

Forum: Installation and Configuration
Re: Question Having Trouble Installing Geant4.9.5.p02 - CMake Issues (Ben Hug)
Date: 12 Nov, 2012
From: Ben Morgan <Ben Morgan>

On Fri, 09 Nov 2012 04:08:08 GMT, Ben Hug wrote:
> CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
>   The C compiler "/usr/bin/gcc" is not able to compile a simple test program.
>   It fails with the following output:
>    Change Dir: /root/Geant4Simulations/CMakeFiles/CMakeTmp
>   Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
>   /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
>   CMakeFiles/cmTryCompileExec.dir/build
>   gmake[1]: Entering directory `/root/Geant4Simulations/CMakeFiles/CMakeTmp'
>   /usr/bin/cmake -E cmake_progress_report
>   /root/Geant4Simulations/CMakeFiles/CMakeTmp/CMakeFiles 1
>   Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o
>   /usr/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
>   /root/Geant4Simulations/CMakeFiles/CMakeTmp/testCCompiler.c
>   Linking C executable cmTryCompileExec
>   /usr/bin/cmake -E cmake_link_script
>   CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
>   /usr/bin/gcc -fPIC CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o
>   cmTryCompileExec -rdynamic
>   /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../crt1.o: could not read
>   symbols: File in wrong format

Hmm, the last line is very odd, and would seem to suggest there's something badly wrong with some aspect of your Linux install - possibly CMake, more likely gcc. To diagnose this, I'd try compiling a trivial C program, basically nothing more than:

int main(int argc, const char *argv[])
  return 0;

and try to compile it to an executable in the same way as CMake does. So if you'd saved the above to a file tmp.c, do

gcc -o tmp.c.o -c tmp.c
gcc -fPIC tmp.c.o -o tmp.exe -rdynamic

If that fails in the same way, you could also try compiling directly with:

gcc tmp.c -o tmp.exe

If that also fails, then your system is broken and I'm not sure why, nor how to fix it other than a full reinstall.



Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Question: Re: Having Trouble Installing Geant4.9.5.p02 - CMake Issues   (Ben Hug - 25 Nov, 2012)
 Add Message Add Message
to: "Re: Having Trouble Installing Geant4.9.5.p02 - CMake Issues"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]