Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on Windows with hdf5 1.10.5 from rtools40 #128

Closed
jeroen opened this issue Oct 2, 2019 · 6 comments

Comments

@jeroen
Copy link

commented Oct 2, 2019

Hi, we are trying to upgrade the Windows toolchain and libraries. This package fails to build with hdf5 1.10.5 on Windows. The cran package fails with an issue that looks like #97:

*** arch - i386
cp 1_8_14/*.c 1_8_14/*.h .
/mingw32/bin/gcc  -I"C:/progra~1/R/R-testing/include" -DNDEBUG       -I/include/hdf5 -I/include/hdf5_hl -I/include/cmakeconf -I1_8_14 -I. -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mtune=generic -c const_export.c -o const_export.o

/mingw32/bin/gcc  -I"C:/progra~1/R/R-testing/include" -DNDEBUG       -I/include/hdf5 -I/include/hdf5_hl -I/include/cmakeconf -I1_8_14 -I. -D__USE_MINGW_ANSI_STDIO   -O2 -Wall  -std=gnu99 -mtune=generic -c datatype_export.c -o datatype_ex
port.o
datatype_export.c: In function 'create_DT_H5D_mpio_no_collective_cause_t':
datatype_export.c:1471:12: error: 'H5D_MPIO_FILTERS' undeclared (first use in this function); did you mean 'H5Z_MAX_NFILTERS'?
   myenum = H5D_MPIO_FILTERS;
            ^~~~~~~~~~~~~~~~
            H5Z_MAX_NFILTERS
datatype_export.c:1471:12: note: each undeclared identifier is reported only once for each function it appears in
In file included from C:/rtools40/mingw32/lib/gcc/i686-w64-mingw32/8.3.0/include/stddef.h:1,
                 from C:/rtools40/mingw32/i686-w64-mingw32/include/inttypes.h:14,
                 from C:/rtools40/mingw32/include/H5public.h:54,
                 from C:/rtools40/mingw32/include/hdf5.h:22,
                 from global.h:23,
                 from datatype_export.h:23,
                 from datatype_export.c:20:
datatype_export.c: In function 'create_DT_H5F_info_t':
datatype_export.c:2272:41: error: 'H5F_info2_t' {aka 'struct H5F_info2_t'} has no member named 'super_ext_size'
   H5Tinsert(dtype_id, "super_ext_size", HOFFSET(H5F_info_t, super_ext_size), h5_datatype[DT_hsize_t]);
                                         ^~~~~~~
make: *** [C:/progra~1/R/R-testing/etc/i386/Makeconf:208: datatype_export.o] Error 1
ERROR: compilation failed for package 'hdf5r'

I also tried the Github release but that one fails even sooner:

*** arch - i386
/mingw32/bin/gcc  -I"C:/progra~1/R/R-testing/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c H5Error.c -o H5Error.o
In file included from H5Error.c:19:
global.h:33:10: fatal error: HelperStructs.h: No such file or directory
 #include "HelperStructs.h"
          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [C:/progra~1/R/R-testing/etc/i386/Makeconf:208: H5Error.o] Error 1
ERROR: compilation failed for package 'hdf5r'
* removing 'C:/R/library/hdf5r'
* restoring previous 'C:/R/library/hdf5r'

Can you please unblock us by looking into a fix?

@jeroen jeroen changed the title Fails to build on Windows with hdf5 from rtools40 Fails to build on Windows with hdf5 1.10.5 from rtools40 Oct 2, 2019
@hhoeflin

This comment has been minimized.

Copy link
Owner

commented Oct 2, 2019

@jeroen

This comment has been minimized.

Copy link
Author

commented Oct 2, 2019

Yes I am testing with 1.10.5 on this server.

@hhoeflin

This comment has been minimized.

Copy link
Owner

commented Oct 2, 2019

@jeroen

This comment has been minimized.

Copy link
Author

commented Oct 2, 2019

Sure they are here:

But these are compiled with a new toolchain, I'm not sure they can be linked with the old toolchain.

If you want to test this on Windows, please install rtools40 and R-testing. Then open the rtools40 shell and type:

pacman -Syu
pacman -Sy mingw-w64-{i686,x86_64}-hdf5

And now you can start R and run install.packages("hdf5r").

@hhoeflin

This comment has been minimized.

Copy link
Owner

commented Oct 2, 2019

@jeroen

This comment has been minimized.

Copy link
Author

commented Oct 3, 2019

I have implemented a better solution here: #129. This uses the same method most R packages use which require an external lib on Windows. It downloads a known working version of hdf5 for windows at build time, such that you don't make any assumptions on what is installed on the server.

@hhoeflin hhoeflin closed this in 55b1ce3 Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.