I'm trying to build CLHEP (http://www.cern.ch/clhep) and Geant4 toolkit (http://www.geant4.org) with Intel C++ Compiler 11.1.069 on machine with SLES 11 and gcc 4.3.2.
I have the following error:
Command line: icc -DHAVE_CONFIG_H -I. -I. -I../Vector -I.. -I/opt/intel/Compiler/11.1/069/include -O -ansi -fp-model precise -no-gcc -w1 -MT AxisAngle.o -MD -MP -MF ".deps/AxisAngle.Tpo" -c -o AxisAngle.o AxisAngle.cc
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(100): error: function "__gthrw_pthread_once" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(101): error: function "__gthrw_pthread_getspecific" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(102): error: function "__gthrw_pthread_setspecific" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(104): error: function "__gthrw_pthread_cancel" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(105): error: function "__gthrw_pthread_mutex_lock" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(106): error: function "__gthrw_pthread_mutex_trylock" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(107): error: function "__gthrw_pthread_mutex_unlock" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(109): error: function "__gthrw_pthread_cond_broadcast" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(110): error: function "__gthrw_pthread_cond_wait" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(113): error: function "__gthrw_pthread_key_create" was referenced but not defined
/usr/include/c++/4.3/x86_64-suse-linux/bits/gthr-default.h(114): error: function "__gthrw_pthread_key_delete" was referenced but not defined
compilation aborted for AxisAngle.cc (code 2)
I also tried with -cxxlib key but with the same result.
When compiling with g++ everything is ok.
I was able to reproduce the problem with the source clhep. However, when I remove the -no-gcc option from the command-line, the error goes away.
I think you have accidentally included that with icc. The option means that all GNU macros are undefined, and the definitions will not be included. What was the intent behind including it.
Please try w/o -no-gcc , and let us know whether it still reproduces at your end.
icc -DHAVE_CONFIG_H -I. -I. -I../Vector -I.. -I/opt/intel/Compiler/11.1/069/include -O -ansi -fp-model precise -no-gcc -w1 -gcc -MT AxisAngle.o -MD -MP -MF ".deps/AxisAngle.Tpo" -c -o AxisAngle.o AxisAngle.cc
Fortunately, icc understood my intentions and build CLHEP without errors.
Next step was to build Geant4 - I modified provided /geant4.9.3/config/sys/Linux-icc.gmk to remove -no-gcc flag and Geant4 was built succesfully.
However, now I bumped into another problem - when I try to build my application that uses Geant4 libraries with icc, I have an error:
/apps/geant4.9.3/lib/Linux-icc/libG4processes.so: undefined reference to `__builtin_isnan'
Is it the same error as in this thread: http://software.intel.com/en-us/forums/showthread.php?t=64188 or not?
Regarding isnan , its the same error, and bug already filed.
The current icpc supports g++ 4.2.1 headers, but not current g++, so this error comes with >= g++ 4.3 .
So, I just removed "-no-gcc" in the following text files.
Geant4 (9.3 p2):
and it works.
One thing I am not sure is about the result of the Geant4. In the release note of geant4, they note icc-linux environment is neither tested nor supported. I don't understand what that means.
Is there any possibility that icc compiled Geant4 can makes a wrong result??
Can anyone let me know what is exactly the problem when using icc compiled Geant4? even if the compilation is done without error..?
Here, its mentioned that Linux-icc & 11.1are supported:--
The icc is meant to be binary and source compatible with gcc, and mostly the results should be right.
If you face any problem with regressionor any test suites , please let us know test-case..
I try to compile CLHEP 220.127.116.11 and Geant4 (9.4.beta1). Can you shed more light into this issue? What exactly do you do to get CLHEP configured because I am getting errors. I am using icc v11.1.073 on RHEL5. Bellow is what I am issuing from a buid directory:
CC=icc CPP=icc CXX=icc CXXCPP=icc CPPFLAGS='-O3 -g -m64 -multiple-processes=8 -mtune=core2 -parallel -gcc -icc' ./../18.104.22.168/CLHEP/configure --prefix=/opt/clhep-22.214.171.124_intel
and I shortly get:
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... configure: error: cannot run C++ compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Were you able to correct it.
Try with this:--
CC=icc CPP='icc -E' CXX=icpc CXXCPP='icc -E' CPPFLAGS='-O3 -g -m64 -multiple-processes=8 -mtune=core2 -parallel -gcc -icc'
And let me know whether that works. If not, check the config.log for specific reason for why the configure threw error, and then you can correct it.