[vtkusers] Summary notes on successful VTK 6.3.0.rc2 Debug and Release x64 builds using MS VS2015 on Windows 10 x64

Audrius Stundzia audrius at tomographix.com
Wed Aug 12 13:03:34 EDT 2015


VTK Users,

A summary of the bug fixes required to successfully build VTK 6.3.0.rc2
x64 Debug and Release versions using MS VS2015 on Windows 10 x64.

OS: Windows 10 x64 IDE: Visual Studio 2015 CMake: 3.3.0 VTK: 6.3.0.rc2
Build version: x64

1/ CMake bug during "Configure":

Repeatedly hitting "Ignore" on the pop up window generates

HDF5: Checking for appropriate format for 64 bit long:


HDF5: Width with l64 failed with result: 3


HDF5: Width with l failed with result: 3


HDF5: Width with L failed with result: 3


HDF5: Width with q failed with result: 3


HDF5: Width with I64 failed with result: 3


HDF5: Width with ll failed with result: 3


HDF5: Checking for apropriate format for 64 bit long: not found



The bug fix was provided by Ben Boeckel <ben.boeckel at kitware.com>

10 August 2015 at 21:59:

_____Ben Boeckel wrote:

HDF5 does not support VS2015 in its try_run code. There is a branch for
2015 support here:

https://gitlab.kitware.com/vtk/vtk/merge_requests/446

This specific problem is fixed here:

https://gitlab.kitware.com/ben.boeckel/vtk/commit/718941125d967015e366172dd09793268f4c9eb5

[Comment: I had to manually implement this part of the fix]

with a fix to make long long format string detection actually work
right after it:

https://gitlab.kitware.com/ben.boeckel/vtk/commit/a4cf06de481eb2a354d10e7874928200be65c400

_____End_____


2/ The following 3 bug fixes resulted were required for both Debug and
   Release builds

2.1/ Project: vtklibxml2

File: config.h

/* Win32 Std C name mangling work-around */ /* MS VS2015: deprecated.
snprintf is now the standard in VS2015. */ // #if defined(_MSC_VER) // #
define snprintf _snprintf / #endif

2.2/ Project: vtktiff

File: tiffiop.h

// MS VS2015: added header
# include <corecrt_search.h>

// MS VS2015: deprecated /* #ifdef HAVE_SEARCH_H
# include <search.h>
#else extern void *lfind(const void *, const void *, size_t *, size_t,
int (*)(const void *, const void *)); #endif */

2.3/ Project: vtkhdf5

File:  H5Omtime.c

#elif defined(H5_HAVE_LNX_TIMEZONE) // Dummy argument for now    /*
Linux libc-5 */    the_time -= timezone - (tm.tm_isdst?3600:0); #elif
defined(H5_HAVE_TIMEZONE) && defined(_MSC_VER) && _MSC_VER >= 1900 //
In Visual Studio prior to VS2015 'timezone' is a global variable
declared // in time.h. That variable was deprecated and in VS2015 is
removed, with // _get_timezone replacing it. long time_zone = 0;
_get_timezone(&time_zone); the_time -= time_zone - (tm.tm_isdst ?
3600 : 0);

Comment: Is this correct? Maybe, but frankly I don't care as I have less
than zero interest in HDF5.

2.4/ Fixed in VTK 6.3.0.rc2

Project: vtkCommonCore

File: vtkWin32ProcessOutputWindow.cxx

Fix: add a space before and after PRIdword.

// Construct the executable name from the process id, pointer to  //
this output window instance, and a count.  This should be unique.
sprintf(exeName, "vtkWin32OWP_%" PRIdword "_%p_%u.exe",
GetCurrentProcessId(), this, this->Count++);

3/VTK 6.3.0.rc2 Release x64 build specific MS VS2015 ICE (Internal
  Compiler Error)

Project: vtkIOEnSight

File: vtkEnSightReader.cxx

e:\vtk\vtk-6.3.0.rc2\io\ensight\vtkensightreader.cxx(1578): fatal error
  C1001: An internal error has occurred in the compiler. (compiler file
  'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)

Temporary workaround: add #pragma optimize before after the problem
member function:  int vtkEnSightReader::ReadVariableFiles

// Start | MS VS2015 ICE workaround #pragma optimize( "ts", on ) #pragma
optimize( "g", on ) int
vtkEnSightReader::ReadVariableFiles(vtkMultiBlockDataSet *output) { ...
} // End | MS VS2015 ICE workaround #pragma optimize( "ts", off )
#pragma optimize( "g", off )

4/ Happy building.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150812/40053c75/attachment.html>


More information about the vtkusers mailing list