Closed darkstar007 closed 6 years ago
The following changes to the setup.m file (you have to modify the file in the installed location) will fix this problem. Notice the pipe to the head function, if you had openmpi installed then the find command returned two lines because there could be two versions of htf5.h on your system and the command to locate the header file got confused. This just returns the first one. I have also updated the options to the mkoctfile command as they appeared to not concatenate the names quite correctly.
[res, fn_so] = unix('find /usr/lib -name libhdf5.so'); [res, fn_h] = unix('find /usr/include -name hdf5.h | head -1');
[hdf5lib_dir, hdf5lib_fn, ext] = fileparts(fn_so); disp(["HDF5 library path found at: " hdf5lib_dir])
[hdf5inc_dir, hdf5inc_fn, ext] = fileparts(fn_h); disp(["HDF5 include path found at: " hdf5inc_dir]) mkoctfile("h5readatt_octave.cc", ["-L" hdf5lib_dir], ["-I" hdf5inc_dir], "-L hdf5")
Sounds about right. You prepare a commit and pull request? ;)
I guess this can be closed then?
Hello. I just installed the latest openEMS & Octave following the instructions here: https://openems.de/index.php/Compile_from_Source.html for Ubuntu 20.04 LTS.
After adding paths to Octave, I ran setup.m as instructed.
octave:7> setup setting up openEMS matlab/octave interface compiling oct files HDF5 library path found at: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so /usr/lib/x86_64-linux-gnu/hdf5/openmpi HDF5 include path found at: /usr/include/hdf5/serial/hdf5.h /usr/include/hdf5/openmpi h5readatt_octave.cc:3:10: fatal error: hdf5.h: No such file or directory 3 | #include "hdf5.h" | ^
~~~ compilation terminated. warning: mkoctfile: building exited with failure status
I found a fix here: https://github.com/thliebig/openEMS/issues/36, tmolteno commented on Jun 3, 2018
However, the changes were not included in my setup.m. Did they really get merged in 2018?
Yes they were. Did you install the latest version?
Hello, i have the same problem in Ubuntu 20.04 LTS and i have the latest version. Any ideas?
I had a similar issue on Ubuntu 21.10 - solved by adding a second '| head'
[res, fn_so] = unix('find /usr/lib -name libhdf5.so'); to [res, fn_so] = unix('find /usr/lib -name libhdf5.so | head -1');
Hi,
I'm getting the following error when I try the Patch_Antenna_Array tutorial file:
Which seems to be telling me it cannot find hdf5.h, and yet it then says it found it in the openmpi and serial directories.
Any suggestions to how to proceed? I'm assuming that this is happening in the nf2ff octave interface - how can I replicate this without re-running the whole simulation?
Thanks again,
Matt