Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3948 closed defect (fixed)

Compiling C++ FMU runtime and FMUs with -D_GLIBCXX_USE_CXX11_ABI=0 does not work on Windows

Reported by: Adrian Pop Owned by: Rüdiger Franke
Priority: high Milestone: Future
Component: FMI Version:
Keywords: Cc: Rüdiger Franke, Niklas Worschech, Volker Waurich

Description

We get linker errors if we compiled the C++ FMU runtime and FMU code with
-D_GLIBCXX_USE_CXX11_ABI=0
https://test.openmodelica.org/hudson/job/OM_Win/lastCompletedBuild/testReport/openmodelica_cppruntime_fmu_modelExchange_1/0/Crane_FMU1_CPP_mos/

If we remove the flag compilation of FMUs works fine.
The problem is that this is used for cross-compilation of Windows on Linux so the question is how could we disable this flag only on msys2 mingw on Windows and not in Linux. Looks like a configure problem.

Change History (8)

comment:1 by Adrian Pop, 8 years ago

Cc: Rüdiger Franke added
Owner: changed from Adeel Asghar to Adrian Pop
Status: newaccepted

comment:2 by Adrian Pop, 8 years ago

Cc: Niklas Worschech added

comment:3 by Rüdiger Franke, 8 years ago

Owner: changed from Adrian Pop to Rüdiger Franke
Status: acceptedassigned

comment:4 by Rüdiger Franke, 8 years ago

It was me who tweaked the ABI recently. I wanted to wait for the new Windows version being available and then fix FMU compilation and packaging under Windows at once. The available nightly still dates back to June 2:

https://build.openmodelica.org/omc/builds/windows/nightly-builds/32bit/

Shall I fix it upfront and hoping it would work?

comment:5 by Rüdiger Franke, 8 years ago

Cc: Volker Waurich added

comment:6 by Rüdiger Franke, 8 years ago

Have a look at 0a6dd266cc0d5e80548e9fa7702d55f92e55af69/OMCompiler. I had only tested gcc4.9 with static full runtime and cross compiled runtime -- which worked because gcc4.9 uses the old ABI anyway. My gcc5.3 test only covered a cross compiled runtime which also uses the old ABI -- under Windows we seem to have a static full runtime with new ABI.

comment:7 by Volker Waurich, 8 years ago

Resolution: fixed
Status: assignedclosed

That fixes the issue. Thank you for the quick response.

comment:8 by Adrian Pop, 8 years ago

I can also confirm this as fixed, the models no longer fail in the windows testing.

Note: See TracTickets for help on using tickets.