Menu

Solaris 7 and gcc

Help
2003-04-23
2003-05-03
  • Coen Siebrecht

    Coen Siebrecht - 2003-04-23

    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

     
    • Coen Siebrecht

      Coen Siebrecht - 2003-05-03

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.