I cannot seem to get log4cpp working as a shared object for Solaris 7 with gcc (tried both 2.95.3 and 3.2.2). I do not have a Sun CC compiler available, so that's not an option. Has anyone found a way to get it working? Whatever I do, I keep getting segmentation faults on the first call to the library (works fine on Linux and staticly linked).
Bye,
Coen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've solved the problem myself. For anyone running into the same kind of trouble, this is the solution:
When software on Solaris 7 is compiled using gcc and linked with the Solaris linker, the static variables in the shared object are not correctly initialized. Since libtool defaults to the Solaris linker when it is installed you can specify an alternative linker by setting the environment variable LD to g++ before running configure.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I cannot seem to get log4cpp working as a shared object for Solaris 7 with gcc (tried both 2.95.3 and 3.2.2). I do not have a Sun CC compiler available, so that's not an option. Has anyone found a way to get it working? Whatever I do, I keep getting segmentation faults on the first call to the library (works fine on Linux and staticly linked).
Bye,
Coen
I've solved the problem myself. For anyone running into the same kind of trouble, this is the solution:
When software on Solaris 7 is compiled using gcc and linked with the Solaris linker, the static variables in the shared object are not correctly initialized. Since libtool defaults to the Solaris linker when it is installed you can specify an alternative linker by setting the environment variable LD to g++ before running configure.