Build the deb and rpm packages with CMake - #68
Merged
Merged
Conversation
The Autoconf build is on its way out, so `debian/rules` and the RPM spec now configure, build and install with CMake. The binary packages and their names are unchanged; what moved between them is forced by the CMake install layout. `debian/rules` also loses the cross-compile bootstrap -- Jenkins builds armhf and arm64 natively on arm docker nodes, and CMake has no equivalent of `--with-omc` -- and passes `DEB_HOST_MULTIARCH` to `dh_shlibdeps`, which is what CMake names the libdir after. Two things the packaging has to do for CMake. It writes `OMVERSION.txt` from `REVISION`, because the source tarball carries no git and the packages would otherwise be built as version 0.1.1 and never upgrade. And it runs `libraries/install-index.mos` itself, because the `omlibrary` target downloads with `<prefix>/bin/omc`, which during a `DESTDIR` build is not the `omc` just staged. `OM_RUST_RESULT_READERS`, `OM_RUST_RESULT_WRITERS` and `OM_ENABLE_RUST_SIM_RUNTIME` are on. The build-deps images install a stable Rust toolchain with rustup, so there is nothing to add to `Build-Depends` or `BuildRequires`. Contents that moved: | Package | Change | | ------------------ | ----------------------------------- | | `omc-common` | + gc headers, + `share/omc/sources` | | `libomcsimulation` | + `libomc_result`, - opcua, - ryu | | `omedit` | + the bundled language server | | `libomplot` | + `Depends: libomcsimulation` | | `libomc-dev` | dropped, no files left to ship | | `libomplot-dev` | dropped, no files left to ship | The gc headers are the one that would have broken every model build: generated code includes `<gc.h>`, and CMake installs it in `include/omc` rather than `include/omc/c`. `libomc_result` and `libSimulationRuntimeRust` are new, and OMPlotLib links the former, hence the `libomplot` dependency. OPC-UA and ryu are not installed by the CMake build at all; `opc/` is commented out of SimulationRuntime. Dead targets removed while here: i386, of which `libomccpp` held the last reference, and the EL6/EL7 blocks in the spec, including cmake3 and devtoolset-11. The RPM targets are el8, el9, el10, fc43 and fc44. Assisted-by: Claude Opus 5 (1M context)
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.
The Autoconf build is on its way out, so
debian/rulesand the RPM spec now configure, build and install with CMake. The binary packages and their names are unchanged; what moved between them is forced by the CMake install layout.debian/rulesalso loses the cross-compile bootstrap -- Jenkins builds armhf and arm64 natively on arm docker nodes, and CMake has no equivalent of--with-omc-- and passesDEB_HOST_MULTIARCHtodh_shlibdeps, which is what CMake names the libdir after.Two things the packaging has to do for CMake. It writes
OMVERSION.txtfromREVISION, because the source tarball carries no git and the packages would otherwise be built as version 0.1.1 and never upgrade. And it runslibraries/install-index.mositself, because theomlibrarytarget downloads with<prefix>/bin/omc, which during aDESTDIRbuild is not theomcjust staged.OM_RUST_RESULT_READERS,OM_RUST_RESULT_WRITERSandOM_ENABLE_RUST_SIM_RUNTIMEare on. The build-deps images install a stable Rust toolchain with rustup, so there is nothing to add toBuild-DependsorBuildRequires.Contents that moved:
omc-commonshare/omc/sourceslibomcsimulationlibomc_result, - opcua, - ryuomeditlibomplotDepends: libomcsimulationlibomc-devlibomplot-devThe gc headers are the one that would have broken every model build: generated code includes
<gc.h>, and CMake installs it ininclude/omcrather thaninclude/omc/c.libomc_resultandlibSimulationRuntimeRustare new, and OMPlotLib links the former, hence thelibomplotdependency. OPC-UA and ryu are not installed by the CMake build at all;opc/is commented out of SimulationRuntime.Dead targets removed while here: i386, of which
libomccppheld the last reference, and the EL6/EL7 blocks in the spec, including cmake3 and devtoolset-11. The RPM targets are el8, el9, el10, fc43 and fc44.Assisted-by: Claude Opus 5 (1M context)