You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Pete MacKinnon (JIRA)" <qp...@incubator.apache.org> on 2010/02/05 16:21:30 UTC
[jira] Created: (QPID-2391) Use of global static intializers in
code creates problems for a correct Windows static build
Use of global static intializers in code creates problems for a correct Windows static build
--------------------------------------------------------------------------------------------
Key: QPID-2391
URL: https://issues.apache.org/jira/browse/QPID-2391
Project: Qpid
Issue Type: Improvement
Components: C++ Client
Environment: Windows XP SP3
Visual C++ 9.0
Reporter: Pete MacKinnon
The use of global static intilaizers like the StaticInit struct in:
qpid\cpp\src\qpid\client\windows\TCPConnector.cpp
qpid\cpp\src\qpid\client\windows\SslConnector.cpp
won't work at runtime in a static compile/link of qpidc. The transport factory registrations won't happen since the linker will strip out these unreferenced symbols. Not a problem in the DLL model. There are few options for addressing this in the linker command line (e.g., /INCLUDE:<mangled name of symbol>), in the devenv ("Link Library Dependencies", "Use Library Dependency Inputs"), or writing function wrappers to force load - none of which seem very useful.
There may be more instances of this pattern in the code elsewhere.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] Commented: (QPID-2391) Use of global static intializers in
code creates problems for a correct Windows static build
Posted by "Andrew Stitcher (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857302#action_12857302 ]
Andrew Stitcher commented on QPID-2391:
---------------------------------------
The way these plugins are designed they effectively have to be either linked in statically with the application that uses them or they have to be statically linked into a shared object that dynamically loads them. They export no symbols that could be required for a static library type link.
This is so that the same code could be either linked into the app itself or into a loaded shared object/dll.
A possible fix to this problem would be to link the protocol directly into the app rather than into a library that the app depends on.
> Use of global static intializers in code creates problems for a correct Windows static build
> --------------------------------------------------------------------------------------------
>
> Key: QPID-2391
> URL: https://issues.apache.org/jira/browse/QPID-2391
> Project: Qpid
> Issue Type: Improvement
> Components: C++ Client
> Environment: Windows XP SP3
> Visual C++ 9.0
> Reporter: Pete MacKinnon
>
> The use of global static intilaizers like the StaticInit struct in:
> qpid\cpp\src\qpid\client\windows\TCPConnector.cpp
> qpid\cpp\src\qpid\client\windows\SslConnector.cpp
> won't work at runtime in a static compile/link of qpidc. The transport factory registrations won't happen since the linker will strip out these unreferenced symbols. Not a problem in the DLL model. There are few options for addressing this in the linker command line (e.g., /INCLUDE:<mangled name of symbol>), in the devenv ("Link Library Dependencies", "Use Library Dependency Inputs"), or writing function wrappers to force load - none of which seem very useful.
> There may be more instances of this pattern in the code elsewhere.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.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] Issue Comment Edited: (QPID-2391) Use of global static
intializers in code creates problems for a correct Windows static build
Posted by "Andrew Stitcher (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857303#action_12857303 ]
Andrew Stitcher edited comment on QPID-2391 at 4/15/10 9:15 AM:
----------------------------------------------------------------
Its not clear to me that supporting a static library version of libqpidbroker is really very important, so I've decreased the priority
was (Author: astitcher):
Its not clear to me that supporting a static library version of libqpidcommon is really very important, so I've decreased the priority
> Use of global static intializers in code creates problems for a correct Windows static build
> --------------------------------------------------------------------------------------------
>
> Key: QPID-2391
> URL: https://issues.apache.org/jira/browse/QPID-2391
> Project: Qpid
> Issue Type: Improvement
> Components: C++ Client
> Environment: Windows XP SP3
> Visual C++ 9.0
> Reporter: Pete MacKinnon
> Priority: Minor
>
> The use of global static intilaizers like the StaticInit struct in:
> qpid\cpp\src\qpid\client\windows\TCPConnector.cpp
> qpid\cpp\src\qpid\client\windows\SslConnector.cpp
> won't work at runtime in a static compile/link of qpidc. The transport factory registrations won't happen since the linker will strip out these unreferenced symbols. Not a problem in the DLL model. There are few options for addressing this in the linker command line (e.g., /INCLUDE:<mangled name of symbol>), in the devenv ("Link Library Dependencies", "Use Library Dependency Inputs"), or writing function wrappers to force load - none of which seem very useful.
> There may be more instances of this pattern in the code elsewhere.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.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-2391) Use of global static intializers in
code creates problems for a correct Windows static build
Posted by "Andrew Stitcher (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Stitcher updated QPID-2391:
----------------------------------
Priority: Minor (was: Major)
Its not clear to me that supporting a static library version of libqpidcommon is really very important, so I've decreased the priority
> Use of global static intializers in code creates problems for a correct Windows static build
> --------------------------------------------------------------------------------------------
>
> Key: QPID-2391
> URL: https://issues.apache.org/jira/browse/QPID-2391
> Project: Qpid
> Issue Type: Improvement
> Components: C++ Client
> Environment: Windows XP SP3
> Visual C++ 9.0
> Reporter: Pete MacKinnon
> Priority: Minor
>
> The use of global static intilaizers like the StaticInit struct in:
> qpid\cpp\src\qpid\client\windows\TCPConnector.cpp
> qpid\cpp\src\qpid\client\windows\SslConnector.cpp
> won't work at runtime in a static compile/link of qpidc. The transport factory registrations won't happen since the linker will strip out these unreferenced symbols. Not a problem in the DLL model. There are few options for addressing this in the linker command line (e.g., /INCLUDE:<mangled name of symbol>), in the devenv ("Link Library Dependencies", "Use Library Dependency Inputs"), or writing function wrappers to force load - none of which seem very useful.
> There may be more instances of this pattern in the code elsewhere.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.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