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

MATTest example files doesn't work on last Openmodelica #46

Closed
ElMastro opened this issue May 9, 2023 · 6 comments
Closed

MATTest example files doesn't work on last Openmodelica #46

ElMastro opened this issue May 9, 2023 · 6 comments

Comments

@ElMastro
Copy link

ElMastro commented May 9, 2023

Dear Sir/Madam,
I shall report that running MATTest file from this library I can't get the simulation to work. The console writes:
/usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function Mat_H5ReadGroupInfoIterate':
ED_MATFile.c:(.text+0x303db): undefined reference to H5Oget_info_by_name' /usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function Mat_H5ReadGroupInfo':
ED_MATFile.c:(.text+0x30846): undefined reference to H5Oget_info_by_name' /usr/bin/ld: ED_MATFile.c:(.text+0x309f7): undefined reference to H5Oget_info_by_name'
/usr/bin/ld: ED_MATFile.c:(.text+0x30b28): undefined reference to H5Literate_by_name' /usr/bin/ld: ED_MATFile.c:(.text+0x30b99): undefined reference to H5Literate_by_name'
/usr/bin/ld: ED_MATFile.c:(.text+0x30e5e): undefined reference to H5Rdereference' /usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function Mat_H5ReadDatasetInfo':
ED_MATFile.c:(.text+0x314ee): undefined reference to H5Rdereference' /usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function Mat_VarReadNextInfoIterate':
ED_MATFile.c:(.text+0x3167e): undefined reference to H5Oget_info_by_name' /usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function Mat_VarRead73.part.43':
ED_MATFile.c:(.text+0x4c599): undefined reference to H5Rdereference' /usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function Mat_VarRead73':
ED_MATFile.c:(.text+0x4d179): undefined reference to H5Rdereference' /usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function Mat_VarReadNextInfo5':
ED_MATFile.c:(.text+0x8ddcb): undefined reference to H5Literate' /usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function readMatIO':
ED_MATFile.c:(.text+0x8e60d): undefined reference to H5Literate' /usr/bin/ld: ED_MATFile.c:(.text+0x8e763): undefined reference to H5Literate'
/usr/bin/ld: /home/fake_user/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/linux64/libED_MATFile.a(ED_MATFile.o): in function ED_getDoubleArray2DFromMAT': ED_MATFile.c:(.text+0x9430a): undefined reference to H5Rdereference'
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [MATTest.makefile:37: omc_main_target] Error 1
Compilation process failed. Exited with code 2.`

The models in the other libraries work fine, so please let me know if someone can confirm this.
Thank you in advance

@dietmarw
Copy link
Member

Just tested it with OMEdit 1.22.0~dev-91-gc254033 (nightly) in Linux and that works perfectly fine. Maybe you could try it with an updated version of OpenModelica?

@ElMastro
Copy link
Author

Thank you for your quick answer. I tried it on 1.21.0.dev.r356.g49374551d7-1 version (on linux), and had this confirmed from another person. I will update the package and see if this problem disappear

@ElMastro
Copy link
Author

Mr dietmarw,
I am sorry but I managed to build Openmodelica version 1.22.0.dev.r105.g997b5e0116-1. I also tried the other packaged version for Archlinux and it has the same error.
I would like to suggest, as I am the person that manages the installation scripts, could it be that the library 'ExternData' requires (inside Openmodelica) some dependencies that were dropped by?

For example, it seems that all the functions that give out errors are contained inside the 'hd5' package. Is there any way to check if it depends from something like this, please?

@dietmarw
Copy link
Member

I think you should not build OpenModelica yourself but rather check with the available installers for your distribution. I can not find ArchLinux there so this makes it really hard to debug.
The hd5 dependencies are provided as statically compiled libraries in ExternData itself (see https://github.com/modelica-3rdparty/ExternData/tree/master/ExternData/Resources/Library/linux64)

@ElMastro
Copy link
Author

I definitively agree with you. But, (I am sorry for the misunderstanding), there is no package for Openmodelica. There are two packages on Arch User Repository, one is at version 1.20 and the other one (openmodelica-git) is maintained by me. As far as I know, there is no other one (clean) possibility to have an Openmodelica package. As I racall Openmodelica has been updated during this last February, so I am not really 100% everything works (usually when something is wrong users posts on AUR or contact me).

@dietmarw
Copy link
Member

So I tested it again with 1.22.0~dev-110-gaeb4aca on Ubuntu Linux and it works fine. So my guess is that something is wrong with the way you compile OpenModelica. But that is then rather an OpenModelica issue than an issue of this library. The library developer (which I'm not) would have no way to fix this, since it does work (also confirmed by OpenModelica's library testing: https://libraries.openmodelica.org/branches/master/ExternData/ExternData.html) . So maybe you can try the OpenModelica discourse for some help from the devs there.

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

No branches or pull requests

2 participants