Opened 5 years ago
Last modified 3 years ago
#5632 new defect
Error creating an fmu with 'Modelica_DeviceDrivers' (1.7.1) block 'Blocks.Communication.UDPSend'
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | FMI | Version: | |
Keywords: | Modelica_DeviceDrivers, UDPSend, fmu | Cc: |
Description
Hi all,
I'm running into some issues compiling an fmu containing the block 'Modelica_DeviceDrivers.Blocks.Communication.UDPSend'
A Model which compiles with OM 1.12 and compiled with v1.14.0-dev-81-g38fd61a5f (64-bit) doesn't compile anymore using the latest nightly build. (also not with 1.13 release version)
Error is something like:
In file included from openmodelica_func.h:52:0,
from TestSerialPackager_UDP_FMU.c:10:
util/modelica_string.h:71:5: note: expected 'const char ' but argument is of type 'char '
int GC_vasprintf(const char strp, const char *fmt, va_list ap);
for testing you can duplicate the example 'TestSerialPackager_UDP' (you have to adapt ist as the 'addFloat' isn't recognized)
my own model (converting two floats to integer and storing them to a string, and sending the string to UDP) compiles without any warings with with Dymola v2018-FD01, thus I think the model is ok.
would be great if someone could find the root cause of the error and fix it.
thanks a lot!!
Gü
PS:
- installed OM 1.14 in C:\
- other models compile without any error
- below the messages when running the model in OM, and creating an fmu
_
compiler messages when running the model:
_
C:/OpenModelica1.14.0-dev-64bit//share/omc/scripts/Compile.bat TestSerialPackager_UDP gcc mingw64 parallel 8 0
PATH = "C:\OPENMO~1.0-D\tools\msys\mingw64\bin;C:\OPENMO~1.0-D\tools\msys\mingw64\bin\..\..\usr\bin;"
mingw32-make: Entering directory 'C:/Users/u12l96/AppData/Local/Temp/OPENMO~1/OMEdit/TESTSE~2'
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP.o TestSerialPackager_UDP.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_functions.o TestSerialPackager_UDP_functions.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_records.o TestSerialPackager_UDP_records.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_01exo.o TestSerialPackager_UDP_01exo.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_02nls.o TestSerialPackager_UDP_02nls.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_03lsy.o TestSerialPackager_UDP_03lsy.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_04set.o TestSerialPackager_UDP_04set.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_05evt.o TestSerialPackager_UDP_05evt.c
TestSerialPackager_UDP_functions.c: In function 'omc_ModelicaDeviceDrivers_Packaging_SerialPackager_addInteger':
TestSerialPackager_UDP_functions.c:219:42: warning: passing argument 2 of 'MDD_SerialPackagerAddInteger' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
MDD_SerialPackagerAddInteger(_pkg_ext, (const int*) _u_c89, size_of_dimension_base_array(_u, ((modelica_integer) 1)), _byteOrder_ext);
In file included from TestSerialPackager_UDP_includes.h:4:0,
from TestSerialPackager_UDP_functions.c:7:
C:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include/MDDSerialPackager.h:243:16: note: expected 'int *' but argument is of type 'const int *'
DllExport void MDD_SerialPackagerAddInteger(void* p_package, int * u, size_t n, int endian) {
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_06inz.o TestSerialPackager_UDP_06inz.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_07dly.o TestSerialPackager_UDP_07dly.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_08bnd.o TestSerialPackager_UDP_08bnd.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_09alg.o TestSerialPackager_UDP_09alg.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_10asr.o TestSerialPackager_UDP_10asr.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_11mix.o TestSerialPackager_UDP_11mix.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_12jac.o TestSerialPackager_UDP_12jac.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_13opt.o TestSerialPackager_UDP_13opt.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_14lnz.o TestSerialPackager_UDP_14lnz.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_15syn.o TestSerialPackager_UDP_15syn.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_16dae.o TestSerialPackager_UDP_16dae.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestSerialPackager_UDP_17inl.o TestSerialPackager_UDP_17inl.c
gcc -I. -o TestSerialPackager_UDP.exe TestSerialPackager_UDP.o TestSerialPackager_UDP_functions.o TestSerialPackager_UDP_records.o TestSerialPackager_UDP_01exo.o TestSerialPackager_UDP_02nls.o TestSerialPackager_UDP_03lsy.o TestSerialPackager_UDP_04set.o TestSerialPackager_UDP_05evt.o TestSerialPackager_UDP_06inz.o TestSerialPackager_UDP_07dly.o TestSerialPackager_UDP_08bnd.o TestSerialPackager_UDP_09alg.o TestSerialPackager_UDP_10asr.o TestSerialPackager_UDP_11mix.o TestSerialPackager_UDP_12jac.o TestSerialPackager_UDP_13opt.o TestSerialPackager_UDP_14lnz.o TestSerialPackager_UDP_15syn.o TestSerialPackager_UDP_16dae.o TestSerialPackager_UDP_17inl.o "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Users/u12l96/AppData/Local/Temp/OpenModelica/OMEdit/TestSerialPackager_UDP" -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -I"C:/OpenModelica1.14.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestSerialPackager_UDP -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/OpenModelica1.14.0-dev-64bit//lib//omc" -L"C:/OpenModelica1.14.0-dev-64bit//lib" -Wl,--stack,16777216,-rpath,"C:/OpenModelica1.14.0-dev-64bit//lib//omc" -Wl,-rpath,"C:/OpenModelica1.14.0-dev-64bit//lib" -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic -Wl,-Bstatic -lSimulationRuntimeC -Wl,-Bdynamic -Wl,-Bstatic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lumfpack -lklu -lcolamd -lbtf -lamd -lsundials_idas -lsundials_kinsol -lsundials_nvecserial -lipopt -lcoinmumps -lpthread -lm -lgfortranbegin -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lwsock32 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
mingw32-make: Leaving directory 'C:/Users/u12l96/AppData/Local/Temp/OPENMO~1/OMEdit/TESTSE~2'
Compilation process finished successfully.
_
messages when creating an fmu (cs)
_
[1] 21:52:29 Skripting Warnung
Requested package Modelica_Synchronous of version 0.92.2, but this package was already loaded with version 0.93.0. You might experience problems if these versions are incompatible.
[2] 21:52:29 Skripting Warnung
Requested package Modelica of version 3.2.2, but this package was already loaded with version 3.2.3. You might experience problems if these versions are incompatible.
[3] 21:52:29 Skripting Warnung
Requested package Modelica_DeviceDrivers of version 1.4.4, but this package was already loaded with version 1.7.1. You might experience problems if these versions are incompatible.
[4] 21:52:29 Übersetzung Warnung
Alias equations of external objects are not Modelica compliant as in:
addInteger.pkgIn.pkg = packager.pkgOut.pkg
addInteger.pkgOut[1].pkg = uDPSend.pkgIn.pkg
addInteger.pkgOut[1].pkg = addInteger.pkgIn.pkg
[5] 21:52:29 Übersetzung Meldung
pthreads library is already available. It is not linked from the external library resource directory.
[6] 21:52:29 Übersetzung Meldung
Ws2_32 library is not needed under Windows. It is not linked from the external library resource directory.
[7] 21:52:29 Übersetzung Fehler
Fehler beim Bauen des Simulators. Build log: gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP.o TestSerialPackager_UDP.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_functions.o TestSerialPackager_UDP_functions.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_records.o TestSerialPackager_UDP_records.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_01exo.o TestSerialPackager_UDP_01exo.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_02nls.o TestSerialPackager_UDP_02nls.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_03lsy.o TestSerialPackager_UDP_03lsy.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_04set.o TestSerialPackager_UDP_04set.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_05evt.o TestSerialPackager_UDP_05evt.c
TestSerialPackager_UDP_functions.c: In function 'omc_ModelicaDeviceDrivers_Packaging_SerialPackager_addInteger':
TestSerialPackager_UDP_functions.c:219:42: warning: passing argument 2 of 'MDD_SerialPackagerAddInteger' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
MDD_SerialPackagerAddInteger(_pkg_ext, (const int*) _u_c89, size_of_dimension_base_array(_u, ((modelica_integer) 1)), _byteOrder_ext);
In file included from TestSerialPackager_UDP_includes.h:4:0,
from TestSerialPackager_UDP_functions.c:7:
C:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include/MDDSerialPackager.h:243:16: note: expected 'int *' but argument is of type 'const int *'
DllExport void MDD_SerialPackagerAddInteger(void* p_package, int * u, size_t n, int endian) {
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_06inz.o TestSerialPackager_UDP_06inz.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_07dly.o TestSerialPackager_UDP_07dly.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_08bnd.o TestSerialPackager_UDP_08bnd.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_09alg.o TestSerialPackager_UDP_09alg.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_10asr.o TestSerialPackager_UDP_10asr.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_11mix.o TestSerialPackager_UDP_11mix.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_12jac.o TestSerialPackager_UDP_12jac.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_13opt.o TestSerialPackager_UDP_13opt.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_14lnz.o TestSerialPackager_UDP_14lnz.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_15syn.o TestSerialPackager_UDP_15syn.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_16dae.o TestSerialPackager_UDP_16dae.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_17inl.o TestSerialPackager_UDP_17inl.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_init_fmu.o TestSerialPackager_UDP_init_fmu.c
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -c -o TestSerialPackager_UDP_FMU.o TestSerialPackager_UDP_FMU.c
In file included from TestSerialPackager_UDP_FMU.c:54:0:
fmi-export/fmu2_model_interface.c.inc: In function 'omc_assert_fmi_common':
fmi-export/fmu2_model_interface.c.inc:162:16: warning: passing argument 1 of 'GC_vasprintf' from incompatible pointer type [-Wincompatible-pointer-types]
GC_vasprintf(&str, msg, args);
In file included from openmodelica_func.h:52:0,
from TestSerialPackager_UDP_FMU.c:10:
util/modelica_string.h:71:5: note: expected 'const char ' but argument is of type 'char '
int GC_vasprintf(const char strp, const char *fmt, va_list ap);
g++ -shared -I. -o TestSerialPackager_UDP.dll TestSerialPackager_UDP.o TestSerialPackager_UDP_functions.o TestSerialPackager_UDP_records.o TestSerialPackager_UDP_01exo.o TestSerialPackager_UDP_02nls.o TestSerialPackager_UDP_03lsy.o TestSerialPackager_UDP_04set.o TestSerialPackager_UDP_05evt.o TestSerialPackager_UDP_06inz.o TestSerialPackager_UDP_07dly.o TestSerialPackager_UDP_08bnd.o TestSerialPackager_UDP_09alg.o TestSerialPackager_UDP_10asr.o TestSerialPackager_UDP_11mix.o TestSerialPackager_UDP_12jac.o TestSerialPackager_UDP_13opt.o TestSerialPackager_UDP_14lnz.o TestSerialPackager_UDP_15syn.o TestSerialPackager_UDP_16dae.o TestSerialPackager_UDP_17inl.o TestSerialPackager_UDP_init_fmu.o TestSerialPackager_UDP_FMU.o -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica1.14.0-dev-64bit//include/omc/c/fmi "-IC:/OpenModelica1.14.0-dev-64bit/lib/omlibrary/Modelica_DeviceDrivers 1.7.1/Resources/Include" -L"C:/Users/u12l96/AppData/Local/Temp/OpenModelica/OMEdit/TestSerialPackager_UDP" -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -L"C:/OpenModelica1.14.0-dev-64bit//lib//omc" -Wl,-rpath,"C:/OpenModelica1.14.0-dev-64bit//lib//omc" -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic -lSimulationRuntimeFMI -Wl,-Bstatic -lregex -ltre -lintl -liconv -static-libgcc -lpthread -lm -lgfortranbegin -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -limagehlp -lopenblas -lhdf5 -lz -lszip -Wl,-Bdynamic -llis -Wl,--kill-at
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x42): undefined reference to `imp_WSAPoll'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x53): undefined reference to `imp_WSAGetLastError'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0xbe): undefined reference to `imp_recvfrom'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x166): undefined reference to `imp_WSAStartup'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x198): undefined reference to `imp_socket'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x1af): undefined reference to `imp_WSAGetLastError'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x1b7): undefined reference to `imp_WSACleanup'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x1f0): undefined reference to `imp_htons'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x21a): undefined reference to `imp_bind'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x228): undefined reference to `imp_closesocket'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x236): undefined reference to `imp_WSAGetLastError'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x240): undefined reference to `imp_WSACleanup'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x2d1): undefined reference to `imp_shutdown'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x2db): undefined reference to `imp_WSAGetLastError'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x2f3): undefined reference to `imp_closesocket'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x312): undefined reference to `imp_WSACleanup'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x372): undefined reference to `imp_shutdown'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x37c): undefined reference to `imp_WSAGetLastError'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x394): undefined reference to `imp_closesocket'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x40c): undefined reference to `imp_WSACleanup'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x441): undefined reference to `imp_htons'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x44f): undefined reference to `imp_inet_addr'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x478): undefined reference to `imp_sendto'
TestSerialPackager_UDP_functions.o:TestSerialPackager_UDP_functions.c:(.text+0x486): undefined reference to `imp_WSAGetLastError'
collect2.exe: error: ld returned 1 exit status
Makefile:31: recipe for target 'nozip' failed
make: * [nozip] Error 1
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
adding some more information: when checking Modelica_DeviceDrives on GitHub i realized that OpenModelica is only partly supported. Thus, I think the problems might be caused by some incompatibility in the Lib. Also, the problem with the memory violation is not proved as an error caused by OpenModelica, maybe the error message of the CoSimulation tool I've used is misleading. Thus, it might be okay to close this ticket, and forward it to the developers of the library. (I'll do - depending on your (the OM developers) assessment. Thanks and BR
comment:3 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:5 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
seems like changing Platform (Tools/Options/FMI) from "Static" to "Dynamic solves the compilation error.
problem is then that the fmu causes errors:
ERROR: The element '....' caused an unrecoverable error.
ERROR: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
ERROR: Shutting down.