Skip to content

Fix BuildSysPro's external "C" include directory - #319

Merged
sjoelund merged 1 commit into
masterfrom
buildsyspro-c-sources
Aug 20, 2026
Merged

Fix BuildSysPro's external "C" include directory#319
sjoelund merged 1 commit into
masterfrom
buildsyspro-c-sources

Conversation

@sjoelund

Copy link
Copy Markdown
Member

Its IncludeDirectory annotations name
modelica://BuildSysPro/Resources/C-Sources, which the library does not have — the IBPSA C sources are in IBPSA/Resources/C-Sources, and in a stale copy under Resources/IBPSA/C-Sources in 3.5.0 and older. omc therefore emitted no -I for them and every model reaching one failed to compile. Add both directories with setCFlags, plus the -include flags a few of those sources need: they call str*/malloc/ModelicaError without including the header, and only compile for the C target because the surrounding translation unit happens to have it.

With --nobuildmodel, translating and building share one simulate() call and only the record's messages says either failed. Tell them apart by the translation clocks, so a wasm-jit build failure — the JIT compile, or building the model's Include C sources — is reported as Compile rather than as SimCode or Simulate.

Assisted-by: Claude Opus 5

Its IncludeDirectory annotations name
modelica://BuildSysPro/Resources/C-Sources, which the library does not
have — the IBPSA C sources are in IBPSA/Resources/C-Sources, and in a
stale copy under Resources/IBPSA/C-Sources in 3.5.0 and older. omc
therefore emitted no -I for them and every model reaching one failed to
compile. Add both directories with setCFlags, plus the -include flags a
few of those sources need: they call str*/malloc/ModelicaError without
including the header, and only compile for the C target because the
surrounding translation unit happens to have it.

With --nobuildmodel, translating and building share one simulate() call
and only the record's messages says either failed. Tell them apart by
the translation clocks, so a wasm-jit build failure — the JIT compile,
or building the model's Include C sources — is reported as Compile
rather than as SimCode or Simulate.

Assisted-by: Claude Opus 5
@sjoelund
sjoelund enabled auto-merge (squash) August 20, 2026 08:02
@sjoelund
sjoelund merged commit 26ba4cf into master Aug 20, 2026
7 checks passed
@sjoelund
sjoelund deleted the buildsyspro-c-sources branch August 20, 2026 08:21
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.

1 participant