Up to now we have been using xmlbeansxx with GCC (3.4.6), and want to move our build environment to use Intel's ICC 9.1 for the performance gains, so we are rebuilding our infrastructure as well. We are running Redhat EL 4 Update 4 as our build and target platform, and intending to use ICC version 9.1.043.
We have a problem in that the test programs (BeansTest and GenTest) crash with a segmentation violation when run.
I have done some investigation, and it looks like static initialisation is not always being done in the xmlbeansxx library. We are using shared libraries for xmlbeansxx, log4cxx etc. Using gdb, I found that the GenTest program failed with an unset LOG pointer.
Many of the classes have a static log4cxx::Logger member which is statically initialised using a call to log4cxx::Logger::getLogger("some.name"). I instrumented the getLogger function to print out its calls, and whereas with the gcc-compiled program, I got of the order of 20+ calls before the main program started (as expected), with the icc-compiled program I only got a couple of calls.
Has anyone else tried to use ICC, and either got it to work, or found (fixed?) the problem ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem turned out to be the version of libtool used to generate the configure script - it didn't handle icc correctly for version 8 and later, which we are using.
Our development machine didn't have an uptodate version either, and getting it updated would take too long in the first instance (we have a standardised setup), I ended up patching the libtool script after the configure stage to correct it (in the "archive_cmds" for the CXX tag, remove the "-nostdlib", the "$predep_objects" and the "$postdep_objects").
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We decided not to rely so much on templates in our new upcoming version. We are going to make a release soon and I think it will make less problems with portability.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Up to now we have been using xmlbeansxx with GCC (3.4.6), and want to move our build environment to use Intel's ICC 9.1 for the performance gains, so we are rebuilding our infrastructure as well. We are running Redhat EL 4 Update 4 as our build and target platform, and intending to use ICC version 9.1.043.
We have a problem in that the test programs (BeansTest and GenTest) crash with a segmentation violation when run.
I have done some investigation, and it looks like static initialisation is not always being done in the xmlbeansxx library. We are using shared libraries for xmlbeansxx, log4cxx etc. Using gdb, I found that the GenTest program failed with an unset LOG pointer.
Many of the classes have a static log4cxx::Logger member which is statically initialised using a call to log4cxx::Logger::getLogger("some.name"). I instrumented the getLogger function to print out its calls, and whereas with the gcc-compiled program, I got of the order of 20+ calls before the main program started (as expected), with the icc-compiled program I only got a couple of calls.
Has anyone else tried to use ICC, and either got it to work, or found (fixed?) the problem ?
The problem turned out to be the version of libtool used to generate the configure script - it didn't handle icc correctly for version 8 and later, which we are using.
Our development machine didn't have an uptodate version either, and getting it updated would take too long in the first instance (we have a standardised setup), I ended up patching the libtool script after the configure stage to correct it (in the "archive_cmds" for the CXX tag, remove the "-nostdlib", the "$predep_objects" and the "$postdep_objects").
We decided not to rely so much on templates in our new upcoming version. We are going to make a release soon and I think it will make less problems with portability.