[ 
https://issues.apache.org/jira/browse/XERCESC-2114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16153208#comment-16153208
 ] 

Mathieu Champlon commented on XERCESC-2114:
-------------------------------------------

I just got hit by this when upgrading xerces from 3.1.2 to 3.2.0.
In 3.1.2 there was
{noformat}
$ cl dumpbin /exports ../../../lib/vc100_x64/xerces-c_3.lib | grep 
alignPointerForNewBlockAllocation
                  
?alignPointerForNewBlockAllocation@XMLPlatformUtils@xercesc_3_1@@SA_K_K@Z 
(public: static unsigned __int64 __cdecl 
xercesc_3_1::XMLPlatformUtils::alignPointerForNewBlockAllocation(unsigned 
__int64))
                  
?alignment@?1??alignPointerForNewBlockAllocation@XMLPlatformUtils@xercesc_3_1@@SA_K_K@Z@4_KB
 (unsigned __int64 const `public: static unsigned __int64 __cdecl 
xercesc_3_1::XMLPlatformUtils::alignPointerForNewBlockAllocation(unsigned 
__int64)'::`2'::alignment)
{noformat}
whereas now in 3.2.0
{noformat}
$ cl dumpbin /exports ../../out/vc100_x64/xerces-c/lib/xerces-c_3.lib | grep 
alignPointerForNewBlockAllocation
                  
?alignPointerForNewBlockAllocation@XMLPlatformUtils@xercesc_3_2@@SA_K_K@Z 
(public: static unsigned __int64 __cdecl 
xercesc_3_2::XMLPlatformUtils::alignPointerForNewBlockAllocation(unsigned 
__int64))
{noformat}
meaning it is missing the 'alignment' static variable from the (static inline) 
function
{code}
#ifdef XML_PLATFORM_NEW_BLOCK_ALIGNMENT
    static const XMLSize_t alignment = XML_PLATFORM_NEW_BLOCK_ALIGNMENT;
#else
    static const XMLSize_t alignment = (sizeof(void*) >= sizeof(double)) ? 
sizeof(void*) : sizeof(double);
#endif
{code}

I'm guessing this is likely a compilation flag of some sort as the shift to 
cmake seems to be the only difference with before.
I haven't pushed this further as having alignPointerForNewBlockAllocation 
inline doesn't make much sense to me to begin with.
Also with XML_PLATFORM_NEW_BLOCK_ALIGNMENT this feels like asking for ODR 
violation…

In the end I removed the inline keyword and moved the implementation to 
PlatformUtils.cpp.
Another workaround would have been to remove the static in front of alignment.

> Link failure with Xalan-C
> -------------------------
>
>                 Key: XERCESC-2114
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2114
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.2.0
>         Environment: VS2013 on Windows Server 2012R2
>            Reporter: Roger Leigh
>
> Testing latest rc1 with xalan and VS2013:
> [Build 
> log|https://ci.openmicroscopy.org/view/Files/job/OME-FILES-CPP-DEV-merge-win-superbuild/VSARCH=x64,VSCONFIG=Release,VSVERSION=12,label=maxquant-ome/714/console]
> Using [this 
> patch|https://raw.githubusercontent.com/ome/ome-cmake-superbuild/master/packages/xalan/patches/win-vc12.diff]
>  to build Xalan with VS2013 (it's just the upgraded project files).
> {noformat}
> 12:29:32        (Link target) -> 
> 12:29:32          XalanDiagnosticMemoryManager.obj : error LNK2001: 
> unresolved external symbol "__declspec(dllimport) unsigned __int64 const 
> `public: static unsigned __int64 __cdecl 
> xercesc_3_2::XMLPlatformUtils::alignPointerForNewBlockAllocation(unsigned 
> __int64)'::`2'::alignment" 
> (__imp_?alignment@?1??alignPointerForNewBlockAllocation@XMLPlatformUtils@xercesc_3_2@@SA_K_K@Z@4_KB)
>  
> [D:\build\OME-FILES-CPP-DEV-merge-win-superbuild\2a8f6256\build\xalan-source\c\Projects\Win32\VC12\AllInOne\AllInOne.vcxproj]
> 12:29:32          ..\..\..\..\Build\Win64\VC12\Release\Xalan-C_1_11.dll : 
> fatal error LNK1120: 1 unresolved externals 
> [D:\build\OME-FILES-CPP-DEV-merge-win-superbuild\2a8f6256\build\xalan-source\c\Projects\Win32\VC12\AllInOne\AllInOne.vcxproj]
> {noformat}
> Is there any incompatible change expected here?  Could potentially be missing 
> symbol exports or anything of that nature?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to