ome / ome-cmake-superbuild

CMake super-build for the OME C++ libraries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XercesChecks and XalanChecks spuriously fail when using using system xerces-c, xalan-c [Windows 7 x64, Visual Studio 2015]

seanwarren opened this issue · comments

Hello, When compiling the superbuild using system xerces-c and xalan-c (see #164) on Windows 7 x64 with Visual Studio 2015, both XercesChecks and XalanChecks fail, producing the following error log. However, building the same code from the check works in a small external test CMake project. If I manually disable these checks in ome-common, ome-model and ome-files, the build completes successfully.

I'm not sure how to debug these tests further, but let me know if I can help.

Cheers
Sean

Performing C++ SOURCE FILE Test XERCES_LINK failed with the following output:
Change Dir: C:/Users/CIMLab/Documents/flim-ui/ome-files-build/ome-files-build/CMakeFiles/CMakeTmp

Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_12556.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.25420.1

Copyright (C) Microsoft Corporation. All rights reserved.



Build started 28/09/2017 4:26:07 PM.

The target "CopyLocalFilesOutputGroup" listed in a BeforeTargets attribute at "c:\Users\CIMLab\Documents\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets (62,82)" does not exist in the project, and will be ignored.

Project "C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\cmTC_12556.vcxproj" on node 1 (default targets).

PrepareForBuild:

  Creating directory "cmTC_12556.dir\Debug\".

  Creating directory "C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\Debug\".

  Creating directory "cmTC_12556.dir\Debug\cmTC_12556.tlog\".

InitializeBuildStatus:

  Creating "cmTC_12556.dir\Debug\cmTC_12556.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

VcpkgTripletSelection:

  Using triplet "x64-windows" from "c:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\"

ClCompile:

  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /I"C:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\include" /I"c:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\include" /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D XERCES_LINK /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_12556.dir\Debug\\" /Fd"cmTC_12556.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue  /bigobj "C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\src.cxx"

  Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x64

  Copyright (C) Microsoft Corporation.  All rights reserved.

  

  cl /c /I"C:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\include" /I"c:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\include" /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D XERCES_LINK /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_12556.dir\Debug\\" /Fd"cmTC_12556.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue  /bigobj "C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\src.cxx"

  

  src.cxx

Link:

  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\Debug\cmTC_12556.exe" /INCREMENTAL /NOLOGO /LIBPATH:"c:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\debug\lib" /LIBPATH:"c:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\debug\lib\manual-link" "C:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\lib\boost_filesystem-vc140-mt-1_65_1.lib" "C:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\lib\boost_system-vc140-mt-1_65_1.lib" "C:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\lib\xerces-c_3.lib" kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/Users/CIMLab/Documents/flim-ui/ome-files-build/ome-files-build/CMakeFiles/CMakeTmp/Debug/cmTC_12556.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/CIMLab/Documents/flim-ui/ome-files-build/ome-files-build/CMakeFiles/CMakeTmp/Debug/cmTC_12556.lib" /MACHINE:X64  /machine:x64 cmTC_12556.dir\Debug\src.obj

  cmTC_12556.vcxproj -> C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\Debug\cmTC_12556.exe

  cmTC_12556.vcxproj -> C:/Users/CIMLab/Documents/flim-ui/ome-files-build/ome-files-build/CMakeFiles/CMakeTmp/Debug/cmTC_12556.pdb (Full PDB)

AppLocalFromInstalled:

  powershell.exe -ExecutionPolicy Bypass -noprofile -File "c:\Users\CIMLab\Documents\vcpkg\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\Debug\cmTC_12556.exe" "c:\Users\CIMLab\Documents\vcpkg\installed\x64-windows\debug\bin" "cmTC_12556.dir\Debug\cmTC_12556.tlog\cmTC_12556.write.1u.tlog" "cmTC_12556.dir\Debug\vcpkg.applocal.log"

FinalizeBuildStatus:

  Deleting file "cmTC_12556.dir\Debug\cmTC_12556.tlog\unsuccessfulbuild".

  Touching "cmTC_12556.dir\Debug\cmTC_12556.tlog\cmTC_12556.lastbuildstate".

Done Building Project "C:\Users\CIMLab\Documents\flim-ui\ome-files-build\ome-files-build\CMakeFiles\CMakeTmp\cmTC_12556.vcxproj" (default targets).



Build succeeded.

    0 Warning(s)

    0 Error(s)



Time Elapsed 00:00:01.22


Return value: FAILED_TO_RUN
Source file was:
#include <xercesc/util/PlatformUtils.hpp>

int main() {
  xercesc::XMLPlatformUtils::Initialize();
  xercesc::XMLPlatformUtils::Terminate();
}

Did you disable the xerces and xalan builds in the superbuild? E.g. by adding -Dome-cmake-superbuild_BUILD_xerces=OFF -Dome-cmake-superbuild_BUILD_xalan=OFF.

I suspect the cause may be because of a header/library mismatch if the build ends up using the superbuild headers with the system libraries (or vice versa), depending upon how the search paths for headers and libraries are ordered.

Hi Roger, yes I disabled the xerces and xalan-c builds (these fail for me so if I don't disable them the build gets stuck before it gets to the ome-* modules).

Are the DLLs on the PATH? If it's built then the headers and import libraries were most likely found, but maybe it's not finding the DLL at runtime?

Ah apologies - I wasn't added them to the path until after building ome-files. The checks now pass successfully. Thanks for your continued help!