ANTsX / ITKR

port of ITK to R
6 stars 14 forks source link

Is this a bug or just something weird #24

Closed muschellij2 closed 5 years ago

muschellij2 commented 6 years ago

In building for Windows, I'm getting the following error:

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

which is found at: https://ci.appveyor.com/project/muschellij2/itkr/build/1.0.236#L3035.

As per the SO comments here: https://stackoverflow.com/questions/18968070/error-when-defining-a-stringising-macro-with-va-args, it seems as though we should have ##__VA_ARGS__ instead. Do you agree?

If so, it is located at https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/ThirdParty/HDF5/src/itkhdf5/src/H5win32defs.h#L57, where we have

#define HDopen(S,F,...)       _open(S, F | _O_BINARY, __VA_ARGS__)

So should this be

#define HDopen(S,F,...)       _open(S, F | _O_BINARY, ##__VA_ARGS__)

or is this a red herring and the real error at https://ci.appveyor.com/project/muschellij2/itkr/build/1.0.236#L3161? I am curious because this build: https://ci.appveyor.com/project/muschellij2/itkr/build/1.0.236 is failing but this build https://ci.appveyor.com/project/muschellij2/itkr/build/1.0.233 looks like it was fine and the code was the same. The difference was the passing run was built on R version 3.5.0 Patched (2018-06-01 r74838) and failing built on R version 3.5.1 Patched (2018-08-06 r75070), but unsure if that would affect the results.

stnava commented 6 years ago

not sure but possibly relevant: https://discourse.itk.org/t/updating-itks-hdf5/472/34