-
Notifications
You must be signed in to change notification settings - Fork 30
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
Compilation fails, linker cannot find ED_JSONFile [linux/macos] #45
Comments
Checking the origin of the run-time error message ExternData/ExternData/Resources/C-Sources/modelica/ModelicaIO.c Lines 1000 to 1003 in d4f4724
when reading HouseholdProfiles.csv, it seems you are reading the CSV file not as CSV file, but as MOS text file via a regular block of the Modelica Standard Tables (as provided by the MSL). This is not yet supported as of MSL 4.0.0, but can already be achieved today by using the Modelica Table Additions from https://github.com/tbeu/ModelicaTableAdditions instead. As for the linker issue with OMC: I have no idea why /home/Modelica/ExternData/Resources/Library/linux64/libED_JSONFile.a and /home/Modelica/ExternData/Resources/Library/linux64/libparson.a are not found, given they are available there. Ususally it is not a good idea to copy library parts, but rather use the package manager of OMC for Modelica library dependency resolution. |
Hi, thanks for the reply! This is the line of code that calls the .csv:
It works using Windows though with MSL and ExternData, so I expected it to also work on Unix systems. I installed the ModelicaTableAdditions as you recommended using the package manager in OMEdit in my Ubuntu VM and by using omc in CLI for macOS and the docker image. I then modified the line in the .mo-file to use the CombiTimeTable from the Table Additions instead. Sadly this did not make too much of a difference, the errors are very similar. Ubuntu-VM with OMEdit:
macOS using the omc CLI:
Docker Container using omc CLI:
Using Python in Docker Container:
Edit: Running the test from the ModelicaTableAdditions library failed as well, giving the same linker error as above. So does the CSVTest, giving a similar error:
However, the JSON test and XML test from ExternData finish successefully.
|
This is expected to fail with MSL 4.0.0 as there is no CSV support for CombiTimeTable. |
There is a lot going on in your descriptions. Can you please get the examples from ExternData.Examples running first. They should work in Dymola, OMC and SimulationX. |
I am now using a Windows 10 Remote Desktop, because interestingly the model is kind working here. When building an FMU though, I get the same linker warning concerning ED_JSON and parlon library as when using UNIX systems, however the process will finish successfully:
Actually, using Windows the compiler will run successfully using the MSL 4.0.0 with the above code.
I really don't know what I'm doing wrong. If been experiencing this on completely different computers with 3 different operating systems and two different architectures. I install OpenModelica 1.20.0 from the website, and then either I use the
Do you have any recommendations what to do when the ExternData examples fail? |
Hi all,
I'm trying to build an FMU from a Modelica model. Some of the parameters are read in Modelica from a .json-file, others from a .csv file.
This happens on various systems. My host system is a M1 Mac running macOS Ventura 13.2
I installed OpenModelica using brew.
omc --version
prints:OMCompiler v1.18.0
Afterwards I ran this script to install the Modelica and ExternData libraries:
Now, I want to build my FMU with the following script (executed in the package folder):
When running the script on macOS, this is the resulting error:
I checked if there were any missing files, but ExternData folder inside .openmodelica/libraries is identical to what I see here on GitHub.
So next I tried the amd64 docker container (openmodelica/openmodelica:v1.20.0-gui).
I installed the libraries with the same script as above, then ran the same script.
It finished and produced an FMU. I could not load this though because in the modelDescription.xml, every parameter that should have been read from the .json or .csv is missing the start value, therefore it cannot be initialized.
While compiling, I get this output several times:
When running the executable in the terminal, I get the following:
The same output is generated when using OMPython to start a simulation. When I call convertMo2Fmu(), I can see that files are being generated, but no .fmu file. The return in the console is just ' '.
I tried the same on an Ubuntu 22.04 VM using OMEdit. The results were - unsurprisingly - the same.
When I ran the package in OMEdit on a Windows machine, it worked perfectly fine. All I did was copying the package to a unix system (and I even ran dos2unix on the .csv files).
Please do not tell me that using Windows is the only way to go...
Where is my mistake here? Any help is gladly appreciated!
Thanks in advance
The text was updated successfully, but these errors were encountered: