Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3455 closed defect (fixed)

Undefined references after back end changes

Reported by: Lennart Ochel Owned by: Lennart Ochel
Priority: high Milestone: 1.9.4
Component: Code Generation Version:
Keywords: Cc:

Description

There are some undefined references in the generated c code after the latest back end changes (#3452):

simulation/libraries/3rdParty/ThermoPower/Bug2537.mos

Error messages:

ThermoPower.Examples.CISE.CISESim120501_02nls.o: In function `ThermoPower_Examples_CISE_CISESim120501_eqFunction_193':
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x269e): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x26ab): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_dewDensity'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x26df): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x26ec): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_bubbleDensity'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x272e): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x273b): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_bubbleDensity'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x2770): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x2785): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_dewDensity'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x27b0): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x27be): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_bubbleDensity'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x2832): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x284c): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_dewDensity'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x2885): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x2899): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_dewDensity'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x28d2): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_setSat( *)'
ThermoPower.Examples.CISE.CISESim120501_02nls.c:(.text+0x28e6): undefined reference to `omc_ThermoPower_Water_Drum$Plant$Drum_Medium_bubbleDensity'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Change History (8)

comment:1 by Vitalij Ruge, 9 years ago

The problem is "removeUnusedFunctions".
I guess the handling of function tree is wrong.. no merge?

same issue for:

openmodelica/cruntime/optimization/benchmark/runExReduceDrumBoiler.mos
openmodelica/cruntime/optimization/benchmark/runReduceDrumBoiler.mos

Note: after disable "removeUnusedFunctions" runReduceDrumBoiler.mos work.

Last edited 9 years ago by Vitalij Ruge (previous) (diff)

comment:2 by Lennart Ochel, 9 years ago

Yes, that is true. I am already working on that issue.

comment:3 by Lennart Ochel, 9 years ago

Status: newaccepted

comment:4 by Lennart Ochel, 9 years ago

I fixed the function tree for the three tests mentioned above. Hopefully code generation will not slow down.

comment:6 by Lennart Ochel, 9 years ago

Resolution: fixed
Status: acceptedclosed

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.