[FMIL] System expat, minizip, zlib, libz - #240
Merged
Merged
Conversation
AnHeuermann
force-pushed
the
system-expat
branch
from
September 24, 2026 12:23
c410db9 to
0fe14dc
Compare
The bundled expat, minizip and zlib are static libraries, so libOpenModelicaCompiler.so, OMEdit, libSimulationRuntimeC.so and libModelicaMatIO.so each carried a copy of them. Debian's lintian reports that as embedded-library. Adds OM_USE_SYSTEM_EXPAT and OM_USE_SYSTEM_MINIZIP. They default to ON for native Linux builds and OFF elsewhere (Windows, macOS, cross builds). OM_USE_SYSTEM_ZLIB now uses the same default and links the shared libz instead of libz.a. - expat: FMIL is built with FMILIB_SYSTEM_EXPAT, and fmilib links EXPAT::EXPAT, which omc::3rd::FMIL::expat aliases. The bundled Expat is neither built nor installed. - minizip: FMIL is built with FMILIB_SYSTEM_MINIZIP, and fmilib links the system libminizip, which omc::3rd::FMIL::minizip aliases. When the option is OFF, the bundled minizip target exports its header directory so om_unzip.c can include <unzip.h>. - zlib: the bundled zlib is still always built and installed. Generated simulation code links it as -lzlib (Library="zlib" annotations), and FMIL reuses its target instead of building a copy of its own. The system zlib gets its own target, omc_system_zlib, which omc::3rd::zlib aliases. find_package(ZLIB) is avoided because OMSimulator defines its own ZLIB::ZLIB. - fmilib links omc::3rd::zlib only with the bundled minizip, the only part of libfmilib.a that calls zlib. A system libminizip.so brings in libz itself. Bumps fmi-library to 83a7965 on om/3.0.4, which fixes the build against minizip-ng's compat headers. They do not include zlib.h. CI installs the system expat, minizip and zlib. A new AlmaLinux 10 job builds against expat, minizip-ng-compat and zlib-ng-compat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnHeuermann
force-pushed
the
system-expat
branch
from
September 24, 2026 14:16
0fe14dc to
f409c1d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Needed for OpenModelica/OpenModelica#16849.
FMIL is built with its bundled
expatandminizip. ItsFMILIB_SYSTEM_EXPAT,FMILIB_SYSTEM_MINIZIPandFMILIB_SYSTEM_ZLIBoptions already exist, but nothing turns them on.Purpose
expatandminizipzlibApproach
OM_USE_SYSTEM_EXPATandOM_USE_SYSTEM_MINIZIP. Default toONon Linuxzlibwhen systemzlibis used.