Menu

#336 Build error on Solaris Sparc under gcc - constructor priorities are not supported

v1.1.3
closed
None
5
2017-01-29
2016-09-30
Jon Harvie
No

Release 1.1.3-RC7 fails to build on Solaris Sparc with gcc 4.9.2 due to the following error.

In file included from global-init.cxx:21:0:
../include/log4cplus/config.hxx:150:46: error: constructor priorities are not supported
     __attribute__ ((__constructor__ ((prio))))
                                              ^
global-init.cxx:608:5: note: in expansion of macro 'LOG4CPLUS_CONSTRUCTOR_FUNC'
     LOG4CPLUS_CONSTRUCTOR_FUNC (LOG4CPLUS_INIT_PRIORITY_BASE);
     ^

It appears that the configure scripts and macros are assuming that if the GCC constructor attribute is supported then construction priority is also supported.

Discussion

  • Václav Haisman

    Václav Haisman - 2017-01-29
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,5 +1,6 @@
     Release 1.1.3-RC7 fails to build on Solaris Sparc with gcc 4.9.2 due to the following error.
    
    +```
     In file included from global-init.cxx:21:0:
     ../include/log4cplus/config.hxx:150:46: error: constructor priorities are not supported
          __attribute__ ((__constructor__ ((prio))))
    @@ -7,5 +8,6 @@
     global-init.cxx:608:5: note: in expansion of macro 'LOG4CPLUS_CONSTRUCTOR_FUNC'
          LOG4CPLUS_CONSTRUCTOR_FUNC (LOG4CPLUS_INIT_PRIORITY_BASE);
          ^
    +```
    
     It appears that the configure scripts and macros are assuming that if the GCC constructor attribute is supported then construction priority is also supported. 
    
     
  • Václav Haisman

    Václav Haisman - 2017-01-29

    I have just pushed da867ad2fcc4b8220c3b1b66cc4f2b12b75d3a73 to 1.1.x branch which fixes this.

     
  • Václav Haisman

    Václav Haisman - 2017-01-29
    • status: open --> closed
    • assigned_to: Václav Haisman
     

Log in to post a comment.