HDF52root undefined reference

Hello.

I am trying to convert HDF5 to root and saw https://github.com/delaossa/hdf2root
I am working on ubuntu16.04.

  • I installed hdf5-1.10.1 locally in /usr/local/hdf5

  • I changed the configure/env.sh into

# Setting up Root environment....
export ROOTSYS=/usr/local/root
export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export PATH=$ROOTSYS/bin:$PATH

# HDF5: C++ interface
# HDF5: C++ interface
export HDF5CPP=/usr/local/hdf5/
export DYLD_LIBRARY_PATH=$HDF5CPP/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$HDF5CPP/lib:$LD_LIBRARY_PATH

# HDF2ROOT environment:
export HDF2ROOT=/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master
export DYLD_LIBRARY_PATH=$HDF2ROOT/lib:$DYLD_LIBRARY_PATH
export LD_LIBRARY_PATH=$HDF2ROOT/lib:$LD_LIBRARY_PATH
export PATH=$HDF2ROOT/bin:$PATH

But when I digit make I get

make[1]: Entering directory '/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/src'
Compiling hdf2root_methods.cc
g++ -c -O2 -Wall -fPIC -pthread -m64 -I/usr/include/root -I/include -I/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/inc -I.   hdf2root_methods.cc 
Building shared library /local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/lib/libhdf2root.so ... 
g++ -shared hdf2root_methods.o -o  /local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/lib/libhdf2root.so -L/usr/lib/x86_64-linux-gnu -lCore -lRIO -lTree  -Llib -lhdf5 -lhdf5_cpp 
Done
Compiling hdf2root.cc
g++ -c -O2 -Wall -fPIC -pthread -m64 -I/usr/include/root -I/include -I/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/inc -I.   hdf2root.cc 
Linking hdf2root.o
g++ -O2 -m64 -o hdf2root.e hdf2root.o -L/usr/lib/x86_64-linux-gnu -lCore -lRIO -lTree  -Llib -lhdf5 -lhdf5_cpp -L/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/lib -lhdf2root 
hdf2root.o: In function `main':
hdf2root.cc:(.text.startup+0x3bd): undefined reference to `H5::H5Location::openGroup(char const*) const'
hdf2root.cc:(.text.startup+0x55a): undefined reference to `H5::Group::getNumObjs() const'
hdf2root.cc:(.text.startup+0x577): undefined reference to `H5::H5Location::getObjTypeByIdx(unsigned long long) const'
hdf2root.cc:(.text.startup+0x592): undefined reference to `H5::H5Location::getObjnameByIdx[abi:cxx11](unsigned long long) const'
hdf2root.cc:(.text.startup+0x658): undefined reference to `H5::H5Location::openGroup(char const*) const'
/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/lib/libhdf2root.so: undefined reference to `H5::H5Object::openAttribute(unsigned int) const'
/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/lib/libhdf2root.so: undefined reference to `H5::H5Location::openDataSet(char const*) const'
collect2: error: ld returned 1 exit status
Makefile:39: recipe for target 'hdf2root.e' failed
make[1]: *** [hdf2root.e] Error 1
rm hdf2root.o
make[1]: Leaving directory '/local/home/fbelloni/WORK/CameraHDF5Example/hdf2root-master/src'
Makefile:6: recipe for target 'build' failed
make: *** [build] Error 2

Could anyone tell me what’s the problem (and how to solve it), please?

Thanks,
regards,
franciuska

May be you should contact the author of this utility ? It seems the undefined references are coming from symbols in this package.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.