#3640 closed defect (worksforme)
Compilation errors for Modelica.Math.FastFourierTransform.Examples.RealFFT1
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Build Environment | Version: | |
Keywords: | Cc: | Martin.Otter@… |
Description
There are the following compilation errors with OpenModelica 1.9.4 dev 663 (last nightly build for Windows) for model Modelica.Math.FastFourierTransform.Examples.RealFFT1 (Modelica trunk; 3.2.2 Beta.1):
Modelica.Math.FastFourierTransform.Examples.RealFFT1_05evt.o Modelica.Math.FastFourierTransform.Examples.RealFFT1_05evt.c Modelica.Math.FastFourierTransform.Examples.RealFFT1_functions.c: In function 'omc_Modelica_Math_FastFourierTransform_Internal_rawRealFFT': Modelica.Math.FastFourierTransform.Examples.RealFFT1_functions.c:51: error: '_work' undeclared (first use in this function) Modelica.Math.FastFourierTransform.Examples.RealFFT1_functions.c:51: error: (Each undeclared identifier is reported only once Modelica.Math.FastFourierTransform.Examples.RealFFT1_functions.c:51: error: for each function it appears in.)
In Modelica.Math.FastFourierTransform.Internal.rawRealFFT the external C-Code of the FFT is called and a work array is used for this:
protected Real work[3*size(u,1) + 2*(div(size(u,1),2)+1)]; external "C" info = ModelicaFFT_kiss_fftr(u, size(u,1), work, size(work,1), amplitudes, phases)
It seems that array "work" is "somehow" not included in the generated C-Code
Note, this FFT function is now used in the Modelica_Requirements library for several requirement blocks and in examples.
Change History (11)
comment:1 by , 9 years ago
Component: | Backend → Code Generation |
---|---|
Owner: | changed from | to
Status: | new → accepted |
comment:2 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:3 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Compilation of Modelica.Math.FastFourierTransform.Examples.RealFFT1 (Modelica from trunk) with OpenModelica v1.9.4-dev-751-g675b7d6 (nightly build from today) results in the following linker error message:
Modelica/Resources/Library/win32/libModelicaMatIO.a(ModelicaMatIO.o):ModelicaMatIO.c:(.text+0x38ab): undefined reference to `__chkstk_ms' Modelica/Resources/Library/win32/libModelicaMatIO.a(ModelicaMatIO.o):ModelicaMatIO.c:(.text+0x41fb): undefined reference to `__chkstk_ms' Modelica/Resources/Library/win32/libModelicaMatIO.a(ModelicaMatIO.o):ModelicaMatIO.c:(.text+0x2756b): undefined reference to `__chkstk_ms' collect2: ld returned 1 exit status OpenModelica1.9.4-dev\MinGW\bin\mingw32-make: *** [omc_main_target] Error 1 Compilation process failed. Exited with code 2.
Obviously, some symbols are not resolved in libModelicaMatIO.a. This library is used in MSL 3.2.2 (on trunk) but not in MSL 3.2.1 shipped with OpenModelica. So, one can understand that something goes wrong. Can this be fixed on your side, or what do I have to do in order to get the "right" object library.
comment:4 by , 9 years ago
Component: | Code Generation → Build Environment |
---|---|
Owner: | changed from | to
Status: | reopened → assigned |
It seems to be some MinGW issue on Windows, it works fine for me in Linux.
comment:5 by , 9 years ago
Adrian: Can you check if this works with the MSL shipped with OpenModelica? From the directory structure, it seems Martin (O.) used the MSL from modelica.org trunk which is probably pre-compiled with an incompatible version of MinGW. (This is why I really dislike having pre-compiled libraries in SVN, and why OpenModelica removes all pre-compiled binaries from MSL before shipping it).
comment:8 by , 9 years ago
the Modelica_Requirements library
martin.otter: btw, can you say what the status of this library is? It sounds interesting, and I found a couple of papers/posts which said that it's open-source, but I can't find a trace of it online...
comment:9 by , 9 years ago
Milestone: | 1.10.0 → 1.9.4 |
---|---|
Resolution: | → worksforme |
Status: | assigned → closed |
This worked with the MSL trunk shipped with OpenModelica
Fixed in f105a55.