Skip to content

Workaround for older Buildings versions - #321

Merged
sjoelund merged 1 commit into
masterfrom
buildings-impl-fn-decl
Aug 21, 2026
Merged

Workaround for older Buildings versions#321
sjoelund merged 1 commit into
masterfrom
buildings-impl-fn-decl

Conversation

@sjoelund

Copy link
Copy Markdown
Member

Newer clang complains about implicit function declarations

Newer clang complains about implicit function declarations
@sjoelund
sjoelund enabled auto-merge (squash) August 21, 2026 13:38
@adrpo

adrpo commented Aug 21, 2026

Copy link
Copy Markdown
Member

Confirming from the published logs that this is the terminating error, and flagging two
things it does not cover.

The Buildings Python_3_8 models die here on every Ubuntu 24.04 node:

Resources/C-Sources/pythonWrapper.c:35:3: error: call to undeclared function
'pythonExchangeValuesNoModelica'; ISO C99 and later do not support implicit function
declarations [-Wimplicit-function-declaration]
make: *** [...Exchange_functions.o] Error 1

and not at all on the 22.04 node, which is the whole of why they flip between master
runs. So the flag is the right fix and the scope is right too: Buildings master uses
Python_3_12 and does not hit this, only maint 11.x and 12.x do.

1. The nodes are not equivalent, and one of them has a second problem. Grepping the
Exchange log of each branch's last run for the two independent signals:

branch node Could not find library python3.8 implicit-fn error
master 22.04 no no
v1.27 22.04 no no
newInst-newBackend ryzen-5950x-2, 24.04 no yes
cvode ryzen-9950x, 24.04 yes (3x) yes
gbode ryzen-9950x, 24.04 yes (3x) yes

ryzen-5950x-2 has libpython3.8, so this PR alone should be enough there — and since
master alternates between ryzen-5950x-1 and ryzen-5950x-2, that fixes the flapping.
But ryzen-9950x does not have libpython3.8, so on the branches that run there the models
should go from failing to compile to failing to link. Worth watching the next cvode or
cpp run rather than assuming it is done.

2. The cpp branch needs something else. There the same line is compiled by clang++,
where it is not a warning that can be downgraded:

Resources/C-Sources/pythonWrapper.c:35:3: error: use of undeclared identifier
'pythonExchangeValuesNoModelica'

-Wno-error=implicit-function-declaration has no effect on that, and setCFlags would not
reach CXXFLAGS anyway.

Nit: both added lines are indented with a tab; the rest of conf.json uses four spaces.

Context for why this surfaced now: OpenModelica/OpenModelica#16376ExternalMedia and
these Python models have been flipping in exact anti-phase on master for ten consecutive
run pairs, because the run alternates between a 22.04 and a 24.04 node. This PR fixes the
Python half. The other half is ExternalMedia not loading on 22.04, and #295's Docker task
is what stops the pair of them recurring.


generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants