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

datatype_export.c:1903:19: error: storage size of ‘myenum’ isn’t known #192

Closed
tillea opened this issue Sep 22, 2022 · 9 comments
Closed

Comments

@tillea
Copy link

tillea commented Sep 22, 2022

Hi,
the Debian packaged version of hdf5r received a [bug report about a build time error. While this bug report is against version 1.3.5 I've just verified that the same error also occurs in the just released version 1.3.6. The build happens when building against the Debian packaged libhdf5 1.10.8.

make[1]: Entering directory '/build/r-cran-hdf5r-1.3.6+dfsg/src'
cp 1_10_3/*.c 1_10_3/*.h .
gcc -I"/usr/share/R/include" -DNDEBUG -I/usr/include/hdf5/serial    -D__USE_MINGW_ANSI_STDIO   -fpic  -g -O2 -ffile-prefix-map=/build/r-base-J8F88F/r-base-4.2.1=. -fstack-           protector-     strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c const_export.c -o const_export.o
gcc -I"/usr/share/R/include" -DNDEBUG -I/usr/include/hdf5/serial    -D__USE_MINGW_ANSI_STDIO   -fpic  -g -O2 -ffile-prefix-map=/build/r-base-J8F88F/r-base-4.2.1=. -fstack-           protector-     strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c datatype_export.c -o datatype_export.o
datatype_export.c: In function 'create_DT_H5R_type_t':
datatype_export.c:1903:19: error: storage size of 'myenum' isn't known
 1903 |   enum H5R_type_t myenum;
      |                   ^~~~~~
datatype_export.c:1904:41: error: invalid application of 'sizeof' to incomplete type 'enum H5R_type_t'
 1904 |   hid_t base_type = get_h5_equiv(sizeof(enum H5R_type_t), issigned(enum H5R_type_t));
      |                                         ^~~~
In file included from datatype_export.c:20:
datatype_export.c:1904:73: error: conversion to incomplete type
 1904 |   hid_t base_type = get_h5_equiv(sizeof(enum H5R_type_t), issigned(enum H5R_type_t));
      |                                                                         ^~~~~~~~~~
datatype_export.h:29:24: note: in definition of macro 'issigned'
   29 | #define issigned(t) (((t)(-1)) < 0)
      |                        ^
make[1]: *** [/usr/lib/R/etc/Makeconf:168: datatype_export.o] Error 1

Kind regards, Andreas.

@hhoeflin
Copy link
Owner

hhoeflin commented Sep 22, 2022

Thanks for the bug report, however I have very little time to maintain this project as I am not using it myself anymore. Happy to merge a PR.

@nileshpatra
Copy link

Hi @hhoeflin

As far as I checked the hdf5 code, I am seeing "H5R_type_t" to be already
an enum, and I am not sure why this is defined again as enum here in hdf5r code.

I also looked at the previous snapshot of 1_10_0 in this very repo and and there, I do not see an enum
attached to H5R_type_t see here

I have a small patch that addresses this here and makes it as per prev version. It builds and also passes the tests in our CI, but I am not completely sure if this is sensible to do. So I'd be very very happy if you could let me know?

Cheers!

@hhoeflin
Copy link
Owner

hhoeflin commented Sep 23, 2022 via email

@hhoeflin
Copy link
Owner

hhoeflin commented Sep 23, 2022 via email

@nileshpatra
Copy link

nileshpatra commented Sep 23, 2022 via email

@hhoeflin
Copy link
Owner

hhoeflin commented Sep 23, 2022 via email

@nileshpatra
Copy link

nileshpatra commented Sep 23, 2022 via email

@zingmars
Copy link

I'm running into this on the official R docker image. What would be the workaround for this until this issue is fixed?

@hhoeflin
Copy link
Owner

hhoeflin commented Oct 3, 2022

Should be fixed on master and on the way to CRAN as version 1.3.7

@hhoeflin hhoeflin closed this as completed Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants