Skip to content

Building ITK on Windows #66

@muschellij2

Description

@muschellij2

Building ITK on Windows (through R)

I'm trying to build ITK on Windows, through R in the ITKR package (https://github.com/muschellij2/ITKR). I'm testing this through appveyor (https://ci.appveyor.com/project/muschellij2/itkr). I'm getting the following error:

[ 73%] Building C object Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/hdf5-static.dir/H5Defl.c.obj
In file included from C:\run\ITKR.Rcheck\00_pkg_src\ITKR\src\itks\Modules\ThirdParty\HDF5\src\itkhdf5\src\H5private.h:615:0,
                 from C:\run\ITKR.Rcheck\00_pkg_src\ITKR\src\itks\Modules\ThirdParty\HDF5\src\itkhdf5\src\H5Defl.c:29:
C:\run\ITKR.Rcheck\00_pkg_src\ITKR\src\itks\Modules\ThirdParty\HDF5\src\itkhdf5\src\H5Defl.c: In function 'H5D__efl_read':
C:\run\ITKR.Rcheck\00_pkg_src\ITKR\src\itks\Modules\ThirdParty\HDF5\src\itkhdf5\src\H5win32defs.h:57:66: error: expected expression before ')' token
 #define HDopen(S,F,...)       _open(S, F | _O_BINARY, __VA_ARGS__)
                                                                  ^
C:\run\ITKR.Rcheck\00_pkg_src\ITKR\src\itks\Modules\ThirdParty\HDF5\src\itkhdf5\src\H5Defl.c:291:18: note: in expansion of macro 'HDopen'
         if((fd = HDopen(full_name, O_RDONLY)) < 0)
                  ^
Modules\ThirdParty\HDF5\src\itkhdf5\src\CMakeFiles\hdf5-static.dir\build.make:770: recipe for target 'Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/hdf5-static.dir/H5Defl.c.obj' failed

This worked using commit 4f89edd, but not the latest or anything with respect to v5.0.

Steps to Reproduce

The steps can be seen here: https://ci.appveyor.com/project/muschellij2/itkr

  1. The main configure script is https://github.com/muschellij2/ITKR/blob/master/configure.win
  2. The make version is mingw32-make, and the Makevars necessary to reproduce are: https://github.com/muschellij2/ITKR/blob/master/src/Makevars.win
  3. See the attached 00install.txt file below.

Expected behavior

Successful build such as https://ci.appveyor.com/project/muschellij2/itkr/build/1.0.278

Actual behavior

Build failure such as https://ci.appveyor.com/project/muschellij2/itkr/build/1.0.282

Reproducibility

100% of the builds with

Versions

ITK_VERSION_MAJOR = 5
ITK_VERSION_MINOR = 0
ITK_VERSION_PATCH = 0

Environment

Windows on Appveyor (I believe Windows Server 2012 R2 )

Additional Information

I've uploaded the CMakeLists and the installation output
CMakeLists.txt
00install.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ThirdPartyIssues affecting the ThirdParty moduletype:CompilerCompiler support or related warnings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions