[SERVER-24195] Windows --dbg=on --opt=off is broken because of link dependency on ICU Created: 18/May/16 Updated: 06/Jun/16 Resolved: 24/May/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.8 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Kaloian Manassiev | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible | |
| Operating System: | ALL | |
| Steps To Reproduce: | Use the following command and include the enterprise repo as well (not sure if this is a requirement):
|
|
| Sprint: | Query 15 (06/03/16) | |
| Participants: |
| Description |
|
Building mongod/mongos on Windows with --opt=off/--dbg=on fails with the following error:
The same build succeeds, when --opt=on is used. |
| Comments |
| Comment by Githook User [ 20/May/16 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: |
| Comment by Githook User [ 20/May/16 ] |
|
Author: {u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}Message: |
| Comment by Eric Milkie [ 18/May/16 ] |
|
ODR violation! |
| Comment by J Rassi [ 18/May/16 ] |
|
Thanks, Eric. The issue indeed seems to be that the ICU sources are being built with the U_STATIC_IMPLEMENTATION define enabled (which sets a particular value for U_I18N_API), but mongo sources that include ICU headers are not being built with this define. This is causing (among other issues) CollationKey to be declared with __declspec(dllimport) in mongo sources that indirectly include <unicode/sortkey.h>, and the same class to be declared without __declspec(dllimport) in ICU sources. |
| Comment by Eric Milkie [ 18/May/16 ] |
|
It might be because the class is marked: U_I18N_API |
| Comment by J Rassi [ 18/May/16 ] |
|
collator_interface_icu.cpp includes <unicode/sortkey.h>, which provides an inline definition for getByteArray() ("inline const uint8_t* CollationKey::getByteArray(int32_t &count) const"). I would expect the definition of this symbol to be emitted into collator_interface_icu.obj. I'm attempting to reproduce. |
| Comment by Mark Benvenuto [ 18/May/16 ] |
|
What is the ETA for the fix as this blocks my ability to use debug builds on Windows? |