Opened 6 years ago
Closed 6 years ago
#5293 closed defect (fixed)
buildModelFMU does not copy DLL libraries in binaries folder
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.13.2 |
Component: | FMI | Version: | v1.14.0-dev-nightly |
Keywords: | Cc: |
Description
buildFMU does not copy required additional DLL libraries (e.g. sundials) while packaging the FMU, even thought the output DLL does require them.
The generated Makefile found in source
does not have any cp
command in it.
Log file is clear.
Attachments (2)
Change History (14)
by , 6 years ago
comment:1 by , 6 years ago
Summary: | buildFMU does not copy DLL libraries in binaries folder → buildModelFMU does not copy DLL libraries in binaries folder |
---|
comment:2 by , 6 years ago
Milestone: | Future → 1.13.2 |
---|---|
Owner: | changed from | to
Priority: | critical → blocker |
Status: | new → accepted |
I thought we linked everything statically but *strangely* it seems we don't do it for these.
From the Makefile:
-Wl,-Bdynamic -lsundials_idas -lsundials_kinsol -lsundials_nvecserial -Wl,-Bstatic
I only need to change these to:
-Wl,-Bstatic -lsundials_idas -lsundials_kinsol -lsundials_nvecserial -Wl,-Bdynamic
and we should be good to go as we do have .a libs for these.
Is good that we have 1.13.2 coming up with more fixes early next week, we can fix this in that one.
comment:4 by , 6 years ago
Yes, it is a very very simple one (just a Modelica.Mechanics.Rotational.Sources.ConstantTorque + .Components.Inertia)
I'll add the attachment.
comment:5 by , 6 years ago
Should be fixed with PR: https://github.com/OpenModelica/OMCompiler/pull/2892
comment:7 by , 6 years ago
Before:
adrpo33@ida-0030 MINGW64 /c/Users/adrpo33/Downloads/test/binaries/win64 $ /c/OMDev/bin/ntldd/mingw64/ntldd.exe test.dll libsundials_idas.dll => not found libsundials_kinsol.dll => not found libsundials_nvecserial.dll => not found ADVAPI32.dll => C:\WINDOWS\SYSTEM32\ADVAPI32.dll (0x00000000032c0000) imagehlp.dll => C:\WINDOWS\SYSTEM32\imagehlp.dll (0x00000000001d0000) KERNEL32.dll => C:\WINDOWS\SYSTEM32\KERNEL32.dll (0x0000000003360000) msvcrt.dll => C:\WINDOWS\SYSTEM32\msvcrt.dll (0x0000000003360000) USER32.dll => C:\WINDOWS\SYSTEM32\USER32.dll (0x0000000003610000) WS2_32.dll => C:\WINDOWS\SYSTEM32\WS2_32.dll (0x00000000034f0000)
After:
adrpo33@ida-0030 MINGW64 /tmp/OpenModelica/OMEdit/test/test/binaries/win64 $ /c/OMDev/bin/ntldd/mingw64/ntldd.exe test.dll KERNEL32.dll => C:\WINDOWS\SYSTEM32\KERNEL32.dll (0x0000000000660000) msvcrt.dll => C:\WINDOWS\SYSTEM32\msvcrt.dll (0x0000000000660000) USER32.dll => C:\WINDOWS\SYSTEM32\USER32.dll (0x00000000010b0000)
follow-up: 11 comment:8 by , 6 years ago
@dario: can you check what happens if you change in OMEdit: Tools->Options->FMI->Platforms from Dynamic to Static? Do you still get these linking dependencies?
comment:9 by , 6 years ago
Ouch, this doesn't work as if you choose Dynamic in the FMI settings you get linker errors because libSimulationRuntimeC.a is compiled to link with the sundials dlls, not the .a libs.
I'll see what I can do for the dynamic case.
comment:10 by , 6 years ago
These PRs allows static linking of sundials on mingw and should fix the final problem:
https://github.com/OpenModelica/OMCompiler/pull/2894
https://github.com/OpenModelica/OMCompiler-3rdParty/pull/33
comment:11 by , 6 years ago
Replying to adrpo:
@dario: can you check what happens if you change in OMEdit: Tools->Options->FMI->Platforms from Dynamic to Static? Do you still get these linking dependencies?
I do not know if it is still useful for you or you already solved. In any case here are my dependencies (on Win, as you can see :-) )
Static linking
KERNEL32.dll msvcrt.dll USER32.dll
Dynamic linking
libsundials_idas.dll libsundials_kinsol.dll libsundials_nvecserial.dll ADVAPI32.dll imagehlp.dll KERNEL32.dll msvcrt.dll USER32.dll WS2_32.dll
comment:12 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Ported all the needed commits to maintenance/v1.13 to be in 1.13.2 next week.
test_fmu