Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5318 closed defect (fixed)

Dynamic linking fails while building FMU

Reported by: dariomangoni@… Owned by: Adrian Pop
Priority: normal Milestone: Future
Component: FMI Version: v1.14.0-dev-nightly
Keywords: Cc: Per Östlund

Description

I'm on Win10:

I get this two errors when I link dynamically, with static no errors occur:

In file included from VehicleMacP_FMU.c:54:0:
include/fmi2/fmu2_model_interface.c: In function 'omc_assert_fmi_common':
include/fmi2/fmu2_model_interface.c: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 include/openmodelica_func.h:52:0,
                 from VehicleMacP_FMU.c:10:
include/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);
     ^

and a lot of undefined references similar to this:

C:/OpenModelica//lib//omc\libSimulationRuntimeC.a(kinsolSolver.o):kinsolSolver.c:(.text+_____): undefined reference to <symbol>
C:/OpenModelica//lib//omc\libSimulationRuntimeC.a(radau.o):radau.c:(.text+_____): undefined reference to <symbol>
C:/OpenModelica//lib//omc\libSimulationRuntimeC.a(ida_solver.o):ida_solver.c:(.text+_____): undefined reference to <symbol>

Attachments (1)

log.txt (36.0 KB ) - added by dariomangoni@… 6 years ago.
buildModelFMU log

Download all attachments as: .zip

Change History (12)

by dariomangoni@…, 6 years ago

Attachment: log.txt added

buildModelFMU log

comment:1 by dariomangoni@…, 6 years ago

In the attachment the log of the build. I cannot share the source code, but it is using the Modelica.MultiBody library

comment:2 by Adrian Pop, 6 years ago

Something seems wrong with your installation. Which version of OM do you have?
I suggest restart (to make sure no OpenModelica processes linger) uninstall and install again.
See ticket #5306.

comment:3 by dariomangoni@…, 6 years ago

Yes, it is the same problem. I hit the problem with the FMU, but the same happens with normal compilation.

I have recently-installed OMEdit v1.14.0-dev-38-g8db5bf7e (64-bit).
I uninstalled the previous nightly, but probably something got corrupted.

I'll report back.

comment:4 by dariomangoni@…, 6 years ago

I re-made a clean install. I usually install in C:\OpenModelica and the folder is completely deleted. The problem persists.

In the user folder, under AppData, there are only files that refer to OMEdit and OMnoteboook.
Are there any other folder that I should look into?

comment:5 by Adrian Pop, 6 years ago

Strange. What version have you installed?
Could it be that is one that does not have the fixes I made?
Ok, I see is hash 8db5bf7e, I will check.

May I suggest to try the latest nightly?
https://build.openmodelica.org/omc/builds/windows/nightly-builds/64bit/

What do you have as OPENMODELICAHOME environment variable?

comment:6 by dariomangoni@…, 6 years ago

Wait, I already have the latest one! Just downloaded today at noon.
I have this:
OMEdit v1.14.0-dev-38-g8db5bf7e (64-bit)
Connected to v1.14.0-dev-98-ge13c41a26 (64-bit)

My OPENMODELICAHOME is pointing to C:\OpenModelica\ that is where my (only) OpenModelica installation resides.
My compiler version is v1.14.0-dev-98-ge13c41a26 (64-bit).

comment:7 by Adrian Pop, 6 years ago

Ok. Is time to check this again. I will install the latest nightly and see how things are.

comment:8 by Adrian Pop, 6 years ago

No need, seem somebody broke it again as we can see from the Windows failures.
https://test.openmodelica.org/hudson/job/OM_Win/

comment:9 by Adrian Pop, 6 years ago

Cc: Per Östlund added
Owner: changed from Lennart Ochel to Adrian Pop
Status: newaccepted

Seems Per reverted my changes to 3rdParty and that reintroduced the problem:
https://github.com/OpenModelica/OMCompiler/commit/8017c67f8c4bbe1046fb01d116a339f766eb9345

comment:10 by Adrian Pop, 6 years ago

Resolution: fixed
Status: acceptedclosed

This should fix it so the nightly from tomorrow should work fine:
https://github.com/OpenModelica/OMCompiler/commit/5c4124cc240f7e251bd7a74acf1c15c1cabb2ffc

comment:11 by Adrian Pop, 6 years ago

You can take the nighties from Feb 4 or Feb 5 and they should be fine also:
https://build.openmodelica.org/omc/builds/windows/nightly-builds/64bit/older/

Note: See TracTickets for help on using tickets.