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

Compilation fails, linker cannot find ED_JSONFile [linux/macos] #45

Open
alexliebenau opened this issue Apr 6, 2023 · 5 comments
Open

Comments

@alexliebenau
Copy link

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:

installPackage(Modelica);
installPackage(Complex);
installPackage(ModelicaServices);
installPackage(ExternData);

Now, I want to build my FMU with the following script (executed in the package folder):

loadModel(Modelica);getErrorString();
loadModel(ExternData);getErrorString();
loadFile("package.mo");getErrorString();
setCommandLineOptions("--fmiFlags=s:cvode --linkType=static --fmuRuntimeDepends=all");getErrorString();
cd("/home/Modelica/res");getErrorString();  // (note: the folder exists)
buildModelFMU(PVexample.Houseexample, version="2.0", fmuType="cs", fileNamePrefix="Houseexample");getErrorString();

When running the script on macOS, this is the resulting error:

[...]
mkdir -p ../binaries/aarch64-darwin
clang -shared -o Houseexample.dylib Houseexample.o Houseexample_functions.o Houseexample_records.o Houseexample_01exo.o Houseexample_02nls.o Houseexample_03lsy.o Houseexample_04set.o Houseexample_05evt.o Houseexample_06inz.o Houseexample_07dly.o Houseexample_08bnd.o Houseexample_09alg.o Houseexample_10asr.o Houseexample_11mix.o Houseexample_12jac.o Houseexample_13opt.o Houseexample_14lnz.o Houseexample_15syn.o Houseexample_16dae.o Houseexample_17inl.o Houseexample_18spd.o Houseexample_init_fmu.o Houseexample_FMU.o  simulation/solver/cvode_solver.o simulation/solver/sundials_error.o -L\"/Users/alex/Diplomarbeit/Modelica/packages/PVexample\"   \"-L/opt/homebrew/Cellar/openmodelica/1.18.0_6/lib/aarch64-darwin21.6.0/omc\" \"-L/opt/homebrew/Cellar/openmodelica/1.18.0_6/lib/\" \"-L/Users/alex/.openmodelica/binaries/PVexample\" \"-L/Users/alex/Diplomarbeit/Modelica/packages/PVexample/Resources/Library/aarch64-darwin\" \"-L/Users/alex/Diplomarbeit/Modelica/packages/PVexample/Resources/Library\" -lED_JSONFile -lparson \"-L/Users/alex/.openmodelica/binaries/Modelica\" \"-L/Users/alex/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/aarch64-darwin\" \"-L/Users/alex/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library\" -lModelicaExternalC -lModelicaStandardTables -lModelicaIO -lModelicaMatIO -lzlib \"-L/Users/alex/.openmodelica/binaries/ExternData\" \"-L/Users/alex/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/aarch64-darwin\" \"-L/Users/alex/.openmodelica/libraries/ExternData 3.0.3/Resources/Library\"  -L'/opt/homebrew/Cellar/openmodelica/1.18.0_6/lib/aarch64-darwin21.6.0/omc' -Wl,-rpath,'/opt/homebrew/Cellar/openmodelica/1.18.0_6/lib/aarch64-darwin21.6.0/omc'   -lSimulationRuntimeFMI  -lopenblas -lm  -lsundials_cvode -lsundials_nvecserial
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/binaries/PVexample'
ld: warning: directory not found for option '-L/Users/alex/Diplomarbeit/Modelica/packages/PVexample/Resources/Library/aarch64-darwin'
ld: warning: directory not found for option '-L/Users/alex/Diplomarbeit/Modelica/packages/PVexample/Resources/Library'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/binaries/Modelica'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/aarch64-darwin'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/binaries/ExternData'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/aarch64-darwin'
ld: library not found for -lED_JSONFile
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nozip] Error 1

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:

[/root/.openmodelica/libraries/ExternData 3.0.3/package.mo:112:23-112:178:writable] Warning: Could not find library ED_JSONFile in either of:
  /usr/bin/../lib/x86_64-linux-gnu/omc/libED_JSONFile.a
  /usr/lib/x86_64-linux-gnu/libED_JSONFile.a
  /lib/x86_64-linux-gnu/libED_JSONFile.a
  /usr/lib//libED_JSONFile.a
  /lib//libED_JSONFile.a
  /usr/bin/../lib/x86_64-linux-gnu/omc/libED_JSONFile.a
  /usr/bin/../lib//libED_JSONFile.a
  /root/.openmodelica/binaries/PVexample/libED_JSONFile.a
  /home/Modelica/PVexample/Resources/Library/x86_64-linux/libED_JSONFile.a
  /home/Modelica/PVexample/Resources/Library/linux64/libED_JSONFile.a
  /home/Modelica/PVexample/Resources/Library/libED_JSONFile.a
  /usr/bin/../lib/x86_64-linux-gnu/omc/libED_JSONFile.so
  /usr/lib/x86_64-linux-gnu/libED_JSONFile.so
  /lib/x86_64-linux-gnu/libED_JSONFile.so
  /usr/lib//libED_JSONFile.so
  /lib//libED_JSONFile.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/libED_JSONFile.so
  /usr/bin/../lib//libED_JSONFile.so
  /root/.openmodelica/binaries/PVexample/libED_JSONFile.so
  /home/Modelica/PVexample/Resources/Library/x86_64-linux/libED_JSONFile.so
  /home/Modelica/PVexample/Resources/Library/linux64/libED_JSONFile.so
  /home/Modelica/PVexample/Resources/Library/libED_JSONFile.so
[/root/.openmodelica/libraries/ExternData 3.0.3/package.mo:112:23-112:178:writable] Warning: Could not find library parson in either of:
  /usr/bin/../lib/x86_64-linux-gnu/omc/libparson.a
  /usr/lib/x86_64-linux-gnu/libparson.a
  /lib/x86_64-linux-gnu/libparson.a
  /usr/lib//libparson.a
  /lib//libparson.a
  /usr/bin/../lib/x86_64-linux-gnu/omc/libparson.a
  /usr/bin/../lib//libparson.a
  /root/.openmodelica/binaries/PVexample/libparson.a
  /home/Modelica/PVexample/Resources/Library/x86_64-linux/libparson.a
  /home/Modelica/PVexample/Resources/Library/linux64/libparson.a
  /home/Modelica/PVexample/Resources/Library/libparson.a
  /usr/bin/../lib/x86_64-linux-gnu/omc/libparson.so
  /usr/lib/x86_64-linux-gnu/libparson.so
  /lib/x86_64-linux-gnu/libparson.so
  /usr/lib//libparson.so
  /lib//libparson.so
  /usr/bin/../lib/x86_64-linux-gnu/omc/libparson.so
  /usr/bin/../lib//libparson.so
  /root/.openmodelica/binaries/PVexample/libparson.so
  /home/Modelica/PVexample/Resources/Library/x86_64-linux/libparson.so
  /home/Modelica/PVexample/Resources/Library/linux64/libparson.so
  /home/Modelica/PVexample/Resources/Library/libparson.so
Warning: Could not resolve URI (uri) at compile-time; copying all loaded packages into the FMU
"

When running the executable in the terminal, I get the following:

stdout            | info    | ... loading "/home/dev/Modelica/packages/PVexample/Data/CH4.json"
stdout            | info    | ... loading "/home/dev/Modelica/packages/PVexample/Data/ExhaustGas.json"
stdout            | info    | ... loading "/home/dev/Modelica/packages/PVexample/Data/Air.json"
stdout            | info    | ... loading "/home/dev/Modelica/packages/PVexample/Data/ExhaustGas.json"
stdout            | info    | ... loading "/home/dev/Modelica/packages/PVexample/Data/CH4.json"
stdout            | info    | ... loading "table" from "/home/dev/Modelica/packages/PVexample/Data/HouseholdProfiles.csv"
assert            | debug   | Error in line 1 when reading numeric data of matrix "table(8762,5)" from file "/home/dev/Modelica/packages/PVexample/Data/HouseholdProfiles.csv"
assert            | info    | simulation terminated by an assertion at initialization

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

@beutlich
Copy link
Contributor

beutlich commented Apr 10, 2023

Checking the origin of the run-time error message

ModelicaFormatError(
"Error in line %lu when reading numeric data of matrix "
"\"%s(%lu,%lu)\" from file \"%s\"\n", lineNo, tableName,
nRow, nCol, fileName);

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.

@alexliebenau
Copy link
Author

alexliebenau commented Apr 11, 2023

Hi, thanks for the reply!

This is the line of code that calls the .csv:

Modelica.Blocks.Sources.CombiTimeTable combiTimeTable2(columns = {2,3,5}, fileName = Modelica.Utilities.Files.loadResource(DataPath + csvFileName), tableName="table", tableOnFile = true) ;

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:

/usr/bin/ld: cannot find -lModelicaTableAdditions: No such file or directory
/usr/bin/ld: cannot find -lModelicaIOAdditions: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Houseexample.makefile:37: omc_main_target] Error 1
Compilation process failed. Exited with code 2.

macOS using the omc CLI:

ld: warning: directory not found for option '-L/Users/alex/.openmodelica/binaries/PVexample'
ld: warning: directory not found for option '-L/Users/alex/Diplomarbeit/Modelica/packages/PVexample/Resources/Library/aarch64-darwin'
ld: warning: directory not found for option '-L/Users/alex/Diplomarbeit/Modelica/packages/PVexample/Resources/Library'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/binaries/ModelicaTableAdditions'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library/aarch64-darwin'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/libraries/Modelica 4.0.0+maint.om/Resources/Library'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/libraries/ModelicaTableAdditions 2.2.2/Resources/Library/aarch64-darwin'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/binaries/Modelica'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/binaries/ExternData'
ld: warning: directory not found for option '-L/Users/alex/.openmodelica/libraries/ExternData 3.0.3/Resources/Library/aarch64-darwin'
ld: library not found for -lED_JSONFile
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [nozip] Error 1
"

Docker Container using omc CLI:

/usr/bin/ld: /home/dev/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/linux64/libparson.a(parson.o): warning: relocation against `json_value_init_string_with_len' in read-only section `.text'
/usr/bin/ld: /home/dev/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/linux64/libModelicaTableAdditions.a(ModelicaTableAdditions.o): relocation R_X86_64_PC32 against symbol `ModelicaTableAdditions_CombiTimeTable_close' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:65: nozip] Error 1

Using Python in Docker Container:

assert            | debug   | Error in line 1 when reading numeric data of matrix "Values(8762,5)" from file "/home/dev/Modelica/packages/PVexample/Data/HouseholdProfiles.csv"
assert            | info    | simulation terminated by an assertion at initialization

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:

/usr/bin/ld: cannot find -lED_CSVFile: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [CSVTest.makefile:37: omc_main_target] Error 1
Compilation process failed. Exited with code 2.

However, the JSON test and XML test from ExternData finish successefully.
The MAT Test is throwing linker errors again:

/usr/bin/ld: cannot find -lhdf5: No such file or directory
clang: 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.

@beutlich
Copy link
Contributor

This is the line of code that calls the .csv:

Modelica.Blocks.Sources.CombiTimeTable combiTimeTable2(columns = {2,3,5}, fileName = Modelica.Utilities.Files.loadResource(DataPath + csvFileName), tableName="table", tableOnFile = true) ;

It works using Windows though with MSL and ExternData, so I expected it to also work on Unix systems.

This is expected to fail with MSL 4.0.0 as there is no CSV support for CombiTimeTable.

@beutlich
Copy link
Contributor

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.

@alexliebenau
Copy link
Author

I am now using a Windows 10 Remote Desktop, because interestingly the model is kind working here.
It's a completely different machine as the MacBook I was using before, I am trying to rule out as much as possible influence from my 'unusual' hardware.

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:

[50] 12:07:47 Translation Warning
[ExternData: 112:23-112:178]: Could not find library ED_JSONFile in either of:
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/ED_JSONFile.dll
  /usr/lib//ED_JSONFile.dll
  /lib//ED_JSONFile.dll
  /usr/lib//ED_JSONFile.dll
  /lib//ED_JSONFile.dll
  C:/Program Files/OpenModelica1.20.0-64bit/bin//ED_JSONFile.dll
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/ED_JSONFile.dll
  C:/Program Files/OpenModelica1.20.0-64bit/lib//ED_JSONFile.dll
  C:/Users/Administrator/AppData/Roaming/.openmodelica/binaries/PVexample/ED_JSONFile.dll
  //tsclient/Modelica/packages/PVexample/Resources/Library/mingw64/ED_JSONFile.dll
  //tsclient/Modelica/packages/PVexample/Resources/Library/win64/ED_JSONFile.dll
  //tsclient/Modelica/packages/PVexample/Resources/Library/ED_JSONFile.dll
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libED_JSONFile.a
  /usr/lib//libED_JSONFile.a
  /lib//libED_JSONFile.a
  /usr/lib//libED_JSONFile.a
  /lib//libED_JSONFile.a
  C:/Program Files/OpenModelica1.20.0-64bit/bin//libED_JSONFile.a
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libED_JSONFile.a
  C:/Program Files/OpenModelica1.20.0-64bit/lib//libED_JSONFile.a
  C:/Users/Administrator/AppData/Roaming/.openmodelica/binaries/PVexample/libED_JSONFile.a
  //tsclient/Modelica/packages/PVexample/Resources/Library/mingw64/libED_JSONFile.a
  //tsclient/Modelica/packages/PVexample/Resources/Library/win64/libED_JSONFile.a
  //tsclient/Modelica/packages/PVexample/Resources/Library/libED_JSONFile.a
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libED_JSONFile.lib
  /usr/lib//libED_JSONFile.lib
  /lib//libED_JSONFile.lib
  /usr/lib//libED_JSONFile.lib
  /lib//libED_JSONFile.lib
  C:/Program Files/OpenModelica1.20.0-64bit/bin//libED_JSONFile.lib
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libED_JSONFile.lib
  C:/Program Files/OpenModelica1.20.0-64bit/lib//libED_JSONFile.lib
  C:/Users/Administrator/AppData/Roaming/.openmodelica/binaries/PVexample/libED_JSONFile.lib
  //tsclient/Modelica/packages/PVexample/Resources/Library/mingw64/libED_JSONFile.lib
  //tsclient/Modelica/packages/PVexample/Resources/Library/win64/libED_JSONFile.lib
  //tsclient/Modelica/packages/PVexample/Resources/Library/libED_JSONFile.lib

[51] 12:07:47 Translation Warning
[ExternData: 112:23-112:178]: Could not find library parson in either of:
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/parson.dll
  /usr/lib//parson.dll
  /lib//parson.dll
  /usr/lib//parson.dll
  /lib//parson.dll
  C:/Program Files/OpenModelica1.20.0-64bit/bin//parson.dll
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/parson.dll
  C:/Program Files/OpenModelica1.20.0-64bit/lib//parson.dll
  C:/Users/Administrator/AppData/Roaming/.openmodelica/binaries/PVexample/parson.dll
  //tsclient/Modelica/packages/PVexample/Resources/Library/mingw64/parson.dll
  //tsclient/Modelica/packages/PVexample/Resources/Library/win64/parson.dll
  //tsclient/Modelica/packages/PVexample/Resources/Library/parson.dll
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libparson.a
  /usr/lib//libparson.a
  /lib//libparson.a
  /usr/lib//libparson.a
  /lib//libparson.a
  C:/Program Files/OpenModelica1.20.0-64bit/bin//libparson.a
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libparson.a
  C:/Program Files/OpenModelica1.20.0-64bit/lib//libparson.a
  C:/Users/Administrator/AppData/Roaming/.openmodelica/binaries/PVexample/libparson.a
  //tsclient/Modelica/packages/PVexample/Resources/Library/mingw64/libparson.a
  //tsclient/Modelica/packages/PVexample/Resources/Library/win64/libparson.a
  //tsclient/Modelica/packages/PVexample/Resources/Library/libparson.a
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libparson.lib
  /usr/lib//libparson.lib
  /lib//libparson.lib
  /usr/lib//libparson.lib
  /lib//libparson.lib
  C:/Program Files/OpenModelica1.20.0-64bit/bin//libparson.lib
  C:/Program Files/OpenModelica1.20.0-64bit/lib//omc/libparson.lib
  C:/Program Files/OpenModelica1.20.0-64bit/lib//libparson.lib
  C:/Users/Administrator/AppData/Roaming/.openmodelica/binaries/PVexample/libparson.lib
  //tsclient/Modelica/packages/PVexample/Resources/Library/mingw64/libparson.lib
  //tsclient/Modelica/packages/PVexample/Resources/Library/win64/libparson.lib
  //tsclient/Modelica/packages/PVexample/Resources/Library/libparson.lib

[52] 12:07:47 Translation Warning
Could not resolve URI (uri) at compile-time; copying all loaded packages into the FMU

[53] 12:07:47 Scripting Error
Failed to remove PVexample_Houseexample.fmutmp/resources/C/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ExternData 3.0.3/Resources/BuildProjects/VisualStudio2010/bsxml-json.vcxproj

[54] 12:07:47 Scripting Notification
The FMU is generated at C:/Users/Administrator/AppData/Local/Temp/2/OpenModelica/OMEdit/PVexample.Houseexample/PVexample.Houseexample.fmu.

This is the line of code that calls the .csv:
Modelica.Blocks.Sources.CombiTimeTable combiTimeTable2(columns = {2,3,5}, fileName = Modelica.Utilities.Files.loadResource(DataPath + csvFileName), tableName="table", tableOnFile = true) ;
It works using Windows though with MSL and ExternData, so I expected it to also work on Unix systems.

This is expected to fail with MSL 4.0.0 as there is no CSV support for CombiTimeTable.

Actually, using Windows the compiler will run successfully using the MSL 4.0.0 with the above code.
I tried using ModelicaTableAdditions 2.2.3, but clang will not compile successfully then. It also throws linker errors:

[...] Warning: corrupt .directive at end of dev file
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialization_size]+0xa): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialization_size]+0x3c): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialization_size]+0x57): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.xdata[$unwind$json_serialization_size]+0x8): undefined reference to `__GSHandlerCheck'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_buffer]+0x15): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_buffer]+0x80): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.xdata[$unwind$json_serialize_to_buffer]+0x10): undefined reference to `__GSHandlerCheck'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_string]+0x10): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_string]+0xc1): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.xdata[$unwind$json_serialize_to_string]+0xc): undefined reference to `__GSHandlerCheck'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialization_size_pretty]+0xa): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialization_size_pretty]+0x3f): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialization_size_pretty]+0x5a): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.xdata[$unwind$json_serialization_size_pretty]+0x8): undefined reference to `__GSHandlerCheck'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_buffer_pretty]+0x15): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_buffer_pretty]+0x84): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.xdata[$unwind$json_serialize_to_buffer_pretty]+0x10): undefined reference to `__GSHandlerCheck'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_string_pretty]+0x10): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.text[json_serialize_to_string_pretty]+0xce): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/parson.lib(./x64/LIB Release/parson.obj):(.xdata[$unwind$json_serialize_to_string_pretty]+0xc): undefined reference to `__GSHandlerCheck'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/ModelicaIOAdditions.lib(./x64/LIB Release/ModelicaIOAdditions.obj):(.text[readMatIO]+0x11): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/ModelicaIOAdditions.lib(./x64/LIB Release/ModelicaIOAdditions.obj):(.text[readMatIO]+0x38f): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/ModelicaIOAdditions.lib(./x64/LIB Release/ModelicaIOAdditions.obj):(.xdata[$unwind$readMatIO]+0x10): undefined reference to `__GSHandlerCheck'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/ModelicaIOAdditions.lib(./x64/LIB Release/ModelicaIOAdditions.obj):(.text[readCsvTable]+0x17): undefined reference to `__security_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/ModelicaIOAdditions.lib(./x64/LIB Release/ModelicaIOAdditions.obj):(.text[readCsvTable]+0x29e): undefined reference to `__security_check_cookie'
C:\PROGRA~1\OPENMO~1.0-6\tools\msys\mingw64\bin\ld: C:/Users/Administrator/AppData/Roaming/.openmodelica/libraries/ModelicaTableAdditions 2.2.3/Resources/Library/win64/ModelicaIOAdditions.lib(./x64/LIB Release/ModelicaIOAdditions.obj):(.xdata[$unwind$readCsvTable]+0x18): undefined reference to `__GSHandlerCheck'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mingw32-make: *** [Houseexample.makefile:37: omc_main_target] Error 1
mingw32-make: Leaving directory 'C:/Users/ADMINI~1/AppData/Local/Temp/2/OPENMO~1/OMEdit/PVEXAM~1.HOU'
Compilation process failed. Exited with code 0x00000002.

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 omc CLI with a script to install the ExternData and ModelicaTableAdditions libraries or I install them from OMEdit (which I thought does the same in the background).

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.

Do you have any recommendations what to do when the ExternData examples fail?
Using windows, only the MAT and XMLTestReadDim will fail. On UNIX, CSV and JSON would fail a well. I have no idea what to do.
I know I am including a lot of text, I'm just trying to include the error messages so it is possible to see what is happening.

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