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

hdf5 1.14.1-1.5.9 is broken on Windows for hdf.hdf5lib.H5 bindings #1405

Open
mkitti opened this issue Aug 22, 2023 · 8 comments
Open

hdf5 1.14.1-1.5.9 is broken on Windows for hdf.hdf5lib.H5 bindings #1405

mkitti opened this issue Aug 22, 2023 · 8 comments

Comments

@mkitti
Copy link
Contributor

mkitti commented Aug 22, 2023

hdf5-1.14.1-1.5.9-windows-x86_64.jar contains only three DLLs:

  1. hdf5_java.dll
  2. jni_hdf5.dll
  3. jni_hdf5_java.dll

hdf5_java.dll depends on hdf5.dll which does not exist. The other two DLLs do not seem to depend on hdf5.dll but perhaps statically link it?

@saudet
Copy link
Member

saudet commented Aug 23, 2023

Works fine for me, but that can always be enhanced

@mkitti
Copy link
Contributor Author

mkitti commented Aug 23, 2023

I do not see a clear option in the build to statically include the library. This also poses an issue for plugins.

The quickest fix I can think of would be to preload hdf5.dll in

@Platform(preload = {"hdf5_java"}),

Would it also be possible to have the JNI libraries also dynamically link that?

I'm confused about what makes Windows distinct from the other platform builds here. Why are the jni* libs statically linked to HDF5 on Windows?

@saudet
Copy link
Member

saudet commented Aug 23, 2023

It didn't work before, if it works now, great!

@saudet
Copy link
Member

saudet commented Nov 12, 2023

I've tried it again with HDF5 1.14.3 and it still doesn't work. The problem on Windows is that most symbols don't get exported from the DLLs, so they are not actually usable. This isn't something related to JavaCPP, so it should be fixed upstream.

@mkitti
Copy link
Contributor Author

mkitti commented Nov 12, 2023

I'm unclear which DLL we are talking about. The main hdf5.dll, which should export the symbols is not being packaged.

@saudet
Copy link
Member

saudet commented Nov 13, 2023 via email

@mkitti
Copy link
Contributor Author

mkitti commented Nov 13, 2023

  • hdf5.dll contains and exports the C API.
  • hdf5_cpp.dll contains and exports the C++ API.
C:\Program Files\HDF_Group\HDF5\1.14.0\bin>dumpbin /exports hdf5_cpp.dll
Microsoft (R) COFF/PE Dumper Version 14.29.30138.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file hdf5_cpp.dll

File Type: DLL

  Section contains the following exports for hdf5_cpp.dll

    00000000 characteristics
    FFFFFFFF time date stamp
        0.00 version
           1 ordinal base
        1130 number of functions
        1130 number of names

    ordinal hint RVA      name

          1    0 00001970 ??0AbstractDs@H5@@IEAA@XZ
          2    1 00001970 ??0AbstractDs@H5@@QEAA@AEBV01@@Z
          3    2 00003600 ??0ArrayType@H5@@QEAA@AEBV01@@Z
          4    3 00003630 ??0ArrayType@H5@@QEAA@AEBVDataType@1@HPEB_K@Z
          5    4 00003750 ??0ArrayType@H5@@QEAA@AEBVH5Location@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
          6    5 000037B0 ??0ArrayType@H5@@QEAA@AEBVH5Location@1@PEBD@Z
          7    6 00003810 ??0ArrayType@H5@@QEAA@XZ
          8    7 00003840 ??0ArrayType@H5@@QEAA@_J@Z
          9    8 00003AF0 ??0AtomType@H5@@IEAA@XZ
         10    9 00003B20 ??0AtomType@H5@@IEAA@_J@Z
         11    A 00003B50 ??0AtomType@H5@@QEAA@AEBV01@@Z
         12    B 000045A0 ??0Attribute@H5@@QEAA@AEBV01@@Z
         13    C 00004610 ??0Attribute@H5@@QEAA@XZ
         14    D 00004660 ??0Attribute@H5@@QEAA@_J@Z
         15    E 00001980 ??0AttributeIException@H5@@QEAA@AEBV01@@Z
         16    F 0000E720 ??0AttributeIException@H5@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z
         17   10 0000E780 ??0AttributeIException@H5@@QEAA@XZ
         18   11 00005880 ??0CommonFG@H5@@QEAA@AEBV01@@Z
         19   12 00005880 ??0CommonFG@H5@@QEAA@XZ
         20   13 00006900 ??0CompType@H5@@QEAA@AEBV01@@Z
         21   14 00006930 ??0CompType@H5@@QEAA@AEBVDataSet@1@@Z
         22   15 00006A00 ??0CompType@H5@@QEAA@AEBVH5Location@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
         23   16 00006A60 ??0CompType@H5@@QEAA@AEBVH5Location@1@PEBD@Z
         24   17 00006AC0 ??0CompType@H5@@QEAA@XZ
         25   18 00006AF0 ??0CompType@H5@@QEAA@_J@Z
         26   19 00006B20 ??0CompType@H5@@QEAA@_K@Z
         27   1A 0000B6E0 ??0DSetAccPropList@H5@@QEAA@AEBV01@@Z
         28   1B 0000B710 ??0DSetAccPropList@H5@@QEAA@XZ
         29   1C 0000B750 ??0DSetAccPropList@H5@@QEAA@_J@Z
         30   1D 0000BA60 ??0DSetCreatPropList@H5@@QEAA@AEBV01@@Z
         31   1E 0000BA90 ??0DSetCreatPropList@H5@@QEAA@XZ
         32   1F 0000BAD0 ??0DSetCreatPropList@H5@@QEAA@_J@Z
         33   20 0000CF30 ??0DSetMemXferPropList@H5@@QEAA@AEBV01@@Z
         34   21 0000CF60 ??0DSetMemXferPropList@H5@@QEAA@PEBD@Z
         35   22 0000CFC0 ??0DSetMemXferPropList@H5@@QEAA@XZ
         36   23 0000D000 ??0DSetMemXferPropList@H5@@QEAA@_J@Z
         37   24 000075A0 ??0DataSet@H5@@QEAA@AEBV01@@Z
         38   25 00007610 ??0DataSet@H5@@QEAA@AEBVAttribute@1@PEBXW4H5R_type_t@@AEBVPropList@1@@Z
         39   26 000076B0 ??0DataSet@H5@@QEAA@AEBVH5Location@1@PEBXW4H5R_type_t@@AEBVPropList@1@@Z
         40   27 00007750 ??0DataSet@H5@@QEAA@XZ
         41   28 000077A0 ??0DataSet@H5@@QEAA@_J@Z
         42   29 000019B0 ??0DataSetIException@H5@@QEAA@AEBV01@@Z
         43   2A 0000E7C0 ??0DataSetIException@H5@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z
         44   2B 0000E820 ??0DataSetIException@H5@@QEAA@XZ
         45   2C 00008DB0 ??0DataSpace@H5@@QEAA@AEBV01@@Z
         46   2D 00008E00 ??0DataSpace@H5@@QEAA@HPEB_K0@Z
         47   2E 00008EC0 ??0DataSpace@H5@@QEAA@W4H5S_class_t@@@Z
         48   2F 00008F80 ??0DataSpace@H5@@QEAA@_J@Z
         49   30 000019E0 ??0DataSpaceIException@H5@@QEAA@AEBV01@@Z
         50   31 0000E860 ??0DataSpaceIException@H5@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z
         51   32 0000E8C0 ??0DataSpaceIException@H5@@QEAA@XZ
         52   33 00009F50 ??0DataType@H5@@QEAA@AEBV01@@Z
         53   34 00009FA0 ??0DataType@H5@@QEAA@AEBVH5Location@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
         54   35 0000A010 ??0DataType@H5@@QEAA@AEBVH5Location@1@PEBD@Z
         55   36 0000A070 ??0DataType@H5@@QEAA@AEBVH5Location@1@PEBXW4H5R_type_t@@AEBVPropList@1@@Z
         56   37 0000A100 ??0DataType@H5@@QEAA@AEBVPredType@1@@Z
         57   38 0000A1D0 ??0DataType@H5@@QEAA@W4H5T_class_t@@_K@Z
         58   39 0000A290 ??0DataType@H5@@QEAA@XZ
         59   3A 0000A2D0 ??0DataType@H5@@QEAA@_J@Z
         60   3B 00001A10 ??0DataTypeIException@H5@@QEAA@AEBV01@@Z
         61   3C 0000E900 ??0DataTypeIException@H5@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z
...

@saudet
Copy link
Member

saudet commented Nov 14, 2023

hdf5_cpp.dll exports only some of the C++ API. It's not actually usable. That needs to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants