-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some (bundled) minor changes (take 2) #176
Conversation
…mplate instantiation issues on Win32)
# Conflicts: # ACE/ace/Condition_Recursive_Thread_Mutex.h
@@ -101,11 +108,22 @@ class ACE_Export ACE_Condition<ACE_Recursive_Thread_Mutex> | |||
ACE_Recursive_Thread_Mutex &mutex_; | |||
|
|||
}; | |||
// *NOTE*: prevent implicit instantiations by includees to relieve the linker | |||
#if defined (__GNUG__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this have a version check on g++ version, maybe add a new ACE_HAS... macro because probably this is then needed on more places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, please see commit 4155a8c
#if defined (ACE_HAS_CPP11_EXTERN_TEMPLATES) | ||
// suppress a warning, g++ 5.2.1 does not support attributes on template | ||
// instantiation declarations. *TODO*: this may go back further | ||
# if defined (__GNUG__) && (__GNUC__ == 5 && __GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ == 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also use a new define for this, that makes it easier when this is needed in more places and for example gcc 5.2.2 has the same issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, please see commit b695f27
…mplate instantiation issues on Win32) (update) this addresses complaints by the integration build system (#include ace/OS.h)
Looks the travis-ci build fails, have you compiled also the complete TAO codebase with these changes? |
Hi. As you can see the test builds now complete successfully. I tried compiling TAO with MSVC. However, there appears to be an issue with some headers missing from the (MPC-generated) project file(s) (e.g. $TAO_ROOT/tao/IOPC.h), so some of the projects do not compile with this approach at the moment. I have not pursued this any further. |
# Conflicts: # ACE/protocols/ace/HTBP/HTBP_Channel.cpp # ACE/protocols/ace/HTBP/HTBP_Inside_Squid_Filter.cpp # ACE/protocols/ace/HTBP/HTBP_Session.cpp
All checks have failed |
Could you provide some more background on the "mainly template instantiation problems with MSVC." We haven't seen this problem until now and I am not sure what you are fixing. |
#include "test_config.h" | ||
|
||
// *NOTE*: explicit template instantiation required here... | ||
template class ACE_Condition<ACE_Recursive_Thread_Mutex>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed with 53bbf4b
I am using ACE in a project that has had trouble linking with MSVC 2015. The error was that of multiple defined symbols in conjunction with (explicit) template instantiations scattered over the ACE code (specifically, the |
I am concerned about breaking user applications given the significant amount of changes you made outside of the ACE core, are they all really needed? Could you extend one of the unit tests with an use case that doesn't work before your changes? Also please make a note about these changes in the ACE/NEWS file |
#include "ace/Recursive_Thread_Mutex.h" | ||
#include "ace/Condition_Attributes.h" | ||
#include "ace/Condition_T.h" | ||
|
||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL | ||
|
||
class ACE_Time_Value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this one needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a 'forward declaration'; the header does not #include ace/Time_Value.h
, even though it is referencing ACE_Time_Value*
. Depending on what the other #include
s pull in, this may not be needed (but the header is more consistent this way). As I was changing the header, I cleaned it up a little bit.
// instantiation declarations | ||
// *TODO*: this probably goes back further than 5.2 | ||
# if (__GNUC__ >= 6 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 2)) | ||
# define ACE_LACKS_CPP11_EXTERN_TEMPLATE_ATTRIBUTES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about gcc 6.x, still needed? Your remark is just about 5.2.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be tested against newer versions of gcc and adjusted when it integrates the C++11 extern template
attributes feature in the future. Also, the targeted version range needs tuning, as the patch applies to earlier versions of gcc as well (see TODO: this probably goes back as far as gcc 4.3 when ACE_HAS_CPP11_EXTERN_TEMPLATES
was introduced (not verified)).
I don't have access to any other versions of gcc, so I cannot test this exhaustively. However, as this feature merely introduces/suppresses a compiler warning, the impact ought to be minimal, while timely feedback from other users on different platforms is likely.
Updated NEWS. The only changes that are really features is the support for |
Merged to check with the full scoreboard |
Had to revert, looks builds started to break |
@esohns Issue #320 got merged to master, can you get that and look at the errors in the FACE configuration. Also check http://www.dre.vanderbilt.edu/scoreboard/integrated.html, could be that some other builds also compile the changes. |
I had a look at the build failures on the Linux platform [http://scoreboard.ociweb.com/doc_master_ant_linux-sb_gcc_d0o1/2016_10_31_14_39_Totals.html](build failures). The errors are related to the removal of Other than that, I found nothing unusual on the scoreboard so far |
second submission of pull request #172 (see description and commit labels).
This addresses some issues with ACE, mainly template instantiation problems with MSVC.
Has been compiled and (briefly) tested on Win32 (Windows 8 and 10, MSVC 2015) and Linux (g++ 5.2.1)