From lesaint.jerome at gmail.com Wed Nov 12 17:15:59 2025 From: lesaint.jerome at gmail.com (Jerome Lesaint) Date: Wed, 12 Nov 2025 17:15:59 +0100 Subject: [Vv] Add HDF5 reading capability Message-ID: Hi all, I am trying to add an Nexus/HDF5 file reader in vv but am struggling with the build configuration. The error I get at the end of the compilation is : ================ [100%] Linking CXX executable ../bin/vv.app/Contents/MacOS/vv Undefined symbols for architecture arm64: "_H5check_version", referenced from: rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::CanReadFile(char const*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::Read(void*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) "_H5open", referenced from: rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::CanReadFile(char const*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::Read(void*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) "H5::DSetAccPropList::DEFAULT", referenced from: rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::Read(void*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) "H5::FileAccPropList::DEFAULT", referenced from: rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::CanReadFile(char const*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::Read(void*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) "H5::FileCreatPropList::DEFAULT", referenced from: rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::CanReadFile(char const*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::Read(void*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) "H5::DSetMemXferPropList::DEFAULT", referenced from: rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::Read(void*) in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) "H5::PredType::NATIVE_FLOAT", referenced from: rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) rtk::NexusHdf5ImageIO::ReadImageInformation() in libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) ld: symbol(s) not found for architecture arm64 clang++: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/vv.app/Contents/MacOS/vv] Error 1 make[1]: *** [vv/CMakeFiles/vv.dir/all] Error 2 =========== What I've done : - added files common/rtkNexusHdf5ImageIO.cxx(and .h) and common/rtkNexusHdf5ImageIOFactory.cxx( and .h) - added #include in the common/rtkNexusHdf5ImageIO.h - updated clitkIO.cxx and (root) CMakeLists.txt. If I run `file /opt/homebrew/opt/hdf5/lib/libhdf5_cpp.dylib`, I get `/opt/homebrew/opt/hdf5/lib/libhdf5_cpp.dylib: Mach-O 64-bit dynamically linked shared library arm64`. I guess the ITK - HDF5 installation interferes badly somewhere, but cannot figure it out properly. Any help would be much appreciated. Thanks in advance, Jerome -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon.rit at creatis.insa-lyon.fr Thu Nov 13 11:25:14 2025 From: simon.rit at creatis.insa-lyon.fr (Simon Rit) Date: Thu, 13 Nov 2025 10:25:14 +0000 Subject: [Vv] Add HDF5 reading capability In-Reply-To: References: Message-ID: Hi, I would suggest to open a draft PR on the GitHub repo with your code to see if we can reproduce (and hopefully fix) the problem on Linux. Cheers, Simon On Thu, Nov 13, 2025 at 8:32?AM Jerome Lesaint wrote: > Hi all, > I am trying to add an Nexus/HDF5 file reader in vv but am struggling with > the build configuration. The error I get at the end of the compilation is : > > ================ > [100%] Linking CXX executable ../bin/vv.app/Contents/MacOS/vv > Undefined symbols for architecture arm64: > "_H5check_version", referenced from: > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::CanReadFile(char const*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::Read(void*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > "_H5open", referenced from: > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::CanReadFile(char const*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::Read(void*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > "H5::DSetAccPropList::DEFAULT", referenced from: > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::Read(void*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > "H5::FileAccPropList::DEFAULT", referenced from: > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::CanReadFile(char const*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::Read(void*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > "H5::FileCreatPropList::DEFAULT", referenced from: > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::CanReadFile(char const*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::Read(void*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > "H5::DSetMemXferPropList::DEFAULT", referenced from: > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::Read(void*) in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > "H5::PredType::NATIVE_FLOAT", referenced from: > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > rtk::NexusHdf5ImageIO::ReadImageInformation() in > libclitkCommon.a[17](rtkNexusHdf5ImageIO.cxx.o) > ld: symbol(s) not found for architecture arm64 > clang++: error: linker command failed with exit code 1 (use -v to see > invocation) > make[2]: *** [bin/vv.app/Contents/MacOS/vv] Error 1 > make[1]: *** [vv/CMakeFiles/vv.dir/all] Error 2 > =========== > > What I've done : > - added files common/rtkNexusHdf5ImageIO.cxx(and .h) and > common/rtkNexusHdf5ImageIOFactory.cxx( and .h) > - added #include in the common/rtkNexusHdf5ImageIO.h > - updated clitkIO.cxx and (root) CMakeLists.txt. > > If I run `file /opt/homebrew/opt/hdf5/lib/libhdf5_cpp.dylib`, I get > `/opt/homebrew/opt/hdf5/lib/libhdf5_cpp.dylib: Mach-O 64-bit dynamically > linked shared library arm64`. > > I guess the ITK - HDF5 installation interferes badly somewhere, but cannot > figure it out properly. > Any help would be much appreciated. > Thanks in advance, > Jerome > > _______________________________________________ > vv mailing list > vv at creatis.insa-lyon.fr > https://www.creatis.insa-lyon.fr/mailman/listinfo/vv > -------------- next part -------------- An HTML attachment was scrubbed... URL: