You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alan Conway (JIRA)" <ji...@apache.org> on 2011/03/23 16:43:05 UTC

[jira] [Created] (QPID-3163) Define public/private library symbols with gcc

Define public/private library symbols with gcc
----------------------------------------------

                 Key: QPID-3163
                 URL: https://issues.apache.org/jira/browse/QPID-3163
             Project: Qpid
          Issue Type: Improvement
          Components: C++ Client
    Affects Versions: 0.11
            Reporter: Alan Conway
            Assignee: Alan Conway
             Fix For: 0.11


Currently qpid libraries built with gcc export all symbols, public and private. This makes it difficult to define the public interface of our libraries and to create automated tools that can  verify compatibility between library versions or detect incompatible changes.

gcc provides a flag flag to make symbols hidden by default (--fvisibility=hidden), and the qpid source code already has macros to mark public functions, the FOO_EXTERN macros defined to support exporting the public API on Windows. By suitably defining these macros for gcc we can control the symbols exported by our libraries. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3163) Define public/private library symbols with gcc

Posted by "Robbie Gemmell (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell updated QPID-3163:
---------------------------------

    Fix Version/s:     (was: 0.11)
                   Future

Assigning an unreleased version as fix-for.
                
> Define public/private library symbols with gcc
> ----------------------------------------------
>
>                 Key: QPID-3163
>                 URL: https://issues.apache.org/jira/browse/QPID-3163
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Client
>    Affects Versions: 0.11
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>            Priority: Minor
>             Fix For: Future
>
>
> Currently qpid libraries built with gcc export all symbols, public and private. This makes it difficult to define the public interface of our libraries and to create automated tools that can  verify compatibility between library versions or detect incompatible changes.
> gcc provides a flag flag to make symbols hidden by default (--fvisibility=hidden), and the qpid source code already has macros to mark public functions, the FOO_EXTERN macros defined to support exporting the public API on Windows. By suitably defining these macros for gcc we can control the symbols exported by our libraries. 
> For more details:
> http://gcc.gnu.org/wiki/Visibility
> http://gcc.gnu.org/faq.html#dso

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3163) Define public/private library symbols with gcc

Posted by "Alan Conway (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Conway updated QPID-3163:
------------------------------

    Description: 
Currently qpid libraries built with gcc export all symbols, public and private. This makes it difficult to define the public interface of our libraries and to create automated tools that can  verify compatibility between library versions or detect incompatible changes.

gcc provides a flag flag to make symbols hidden by default (--fvisibility=hidden), and the qpid source code already has macros to mark public functions, the FOO_EXTERN macros defined to support exporting the public API on Windows. By suitably defining these macros for gcc we can control the symbols exported by our libraries. 

For more details:
http://gcc.gnu.org/wiki/Visibility
http://gcc.gnu.org/faq.html#dso

  was:
Currently qpid libraries built with gcc export all symbols, public and private. This makes it difficult to define the public interface of our libraries and to create automated tools that can  verify compatibility between library versions or detect incompatible changes.

gcc provides a flag flag to make symbols hidden by default (--fvisibility=hidden), and the qpid source code already has macros to mark public functions, the FOO_EXTERN macros defined to support exporting the public API on Windows. By suitably defining these macros for gcc we can control the symbols exported by our libraries. 


> Define public/private library symbols with gcc
> ----------------------------------------------
>
>                 Key: QPID-3163
>                 URL: https://issues.apache.org/jira/browse/QPID-3163
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Client
>    Affects Versions: 0.11
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>             Fix For: 0.11
>
>
> Currently qpid libraries built with gcc export all symbols, public and private. This makes it difficult to define the public interface of our libraries and to create automated tools that can  verify compatibility between library versions or detect incompatible changes.
> gcc provides a flag flag to make symbols hidden by default (--fvisibility=hidden), and the qpid source code already has macros to mark public functions, the FOO_EXTERN macros defined to support exporting the public API on Windows. By suitably defining these macros for gcc we can control the symbols exported by our libraries. 
> For more details:
> http://gcc.gnu.org/wiki/Visibility
> http://gcc.gnu.org/faq.html#dso

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3163) Define public/private library symbols with gcc

Posted by "Alan Conway (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072475#comment-13072475 ] 

Alan Conway commented on QPID-3163:
-----------------------------------

Work to date is on branch https://svn.apache.org/repos/asf/qpid/branches/qpid-3163.

The bulk of the extern declarations etc. are in place, however I'm stuck on a run time failure. The boost::any code, used by boost::program_options, used by qpid/Options, does a typeinfo comparison which fails due to  multiple typeinfo symbols for std::string. (See http://gcc.gnu.org/wiki/Visibility). 

One (impractical) solution that I have verified is to wrap every #include <string> like this
 
#pragma GCC visibility push(default)
#include <string>
#pragma GCC visibility pop

This includes occurences in system header files! Clearly not practical.

Another solution would be to re-write qpid::Options to avoid boost::options.

There are further issues to resolve after getting past this one, not clear how many although I think we're nearly there.

> Define public/private library symbols with gcc
> ----------------------------------------------
>
>                 Key: QPID-3163
>                 URL: https://issues.apache.org/jira/browse/QPID-3163
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Client
>    Affects Versions: 0.11
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>             Fix For: 0.11
>
>
> Currently qpid libraries built with gcc export all symbols, public and private. This makes it difficult to define the public interface of our libraries and to create automated tools that can  verify compatibility between library versions or detect incompatible changes.
> gcc provides a flag flag to make symbols hidden by default (--fvisibility=hidden), and the qpid source code already has macros to mark public functions, the FOO_EXTERN macros defined to support exporting the public API on Windows. By suitably defining these macros for gcc we can control the symbols exported by our libraries. 
> For more details:
> http://gcc.gnu.org/wiki/Visibility
> http://gcc.gnu.org/faq.html#dso

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3163) Define public/private library symbols with gcc

Posted by "Alan Conway (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Conway updated QPID-3163:
------------------------------

    Priority: Minor  (was: Major)

> Define public/private library symbols with gcc
> ----------------------------------------------
>
>                 Key: QPID-3163
>                 URL: https://issues.apache.org/jira/browse/QPID-3163
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Client
>    Affects Versions: 0.11
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>            Priority: Minor
>             Fix For: 0.11
>
>
> Currently qpid libraries built with gcc export all symbols, public and private. This makes it difficult to define the public interface of our libraries and to create automated tools that can  verify compatibility between library versions or detect incompatible changes.
> gcc provides a flag flag to make symbols hidden by default (--fvisibility=hidden), and the qpid source code already has macros to mark public functions, the FOO_EXTERN macros defined to support exporting the public API on Windows. By suitably defining these macros for gcc we can control the symbols exported by our libraries. 
> For more details:
> http://gcc.gnu.org/wiki/Visibility
> http://gcc.gnu.org/faq.html#dso

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org