meson build system #41
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use the Meson build system.
@qyriad has been working on this: https://git.lix.systems/qyriad/lix/src/branch/maint/meson
I've been chipping away at the different components of Lix, converting them to Meson; I have each of
src/lib*
building so far. It has been pretty straightforward, but I expect that the Perl bindings, docs, and tests will be where the real complexity will behttps://gerrit.lix.systems/c/lix/+/580 is pushed to Gerrit, which implements building and installing binaries and headers with Meson. Tests and docs incoming.
Update: the Meson build on macOS specifically is ending up with references to Boost in the closure, which is something we don't want (we explicitly copy the boost libs we need into
$out/lib
to avoid this), and is also a significant enough difference from the old build results that it needs investigation, so that's what we're working on debugging now.Update: the Boost rpath references in
$out/lib
were apparently "normal" — at least in the sense that the libs were not built differently than they should have been.The old build system makes the interesting move to, at install-time, re-link libraries using
$out/lib
as the new library search path.Meson doesn't have any notion of "making link targets that depend on install targets to then be installed", and since getting Boost out of the rpath is something we specifically want for the derivation that builds Lix, we opted to just patch the Mach-O instead, something that the derivation was already doing for libnixutil.dylib anyway.
So anyway. Building and installing were successfully added in
b4d07656ff
.We're almost done with running the test suites in Meson too 🎉
Exciting!! Very nice work
@qyriad I just did some local tests and for some reason if I run
.#hydraJobs.mesonBuild.x86_64-linux
on my local machine, it actually starts building the existing Makefile based system instead; if I remove theoverrideAttrs
bit that appends the original Nix invocation'sbuildInputs
it actually uses Meson. This does not happen on my MacWhat the fuck
@lunaphied your local machine is x86_64-linux, yes?
Just git pulled
a536438da..007e6b580
and now seeing this o.oThe one I'm encountering this on is. I should also note that I encountered an inconsistency on aarch64-drawin, where when I added a Meson target identical to the existing hydraJob definitions but using the
gccStdenv
it used Clang anyway somehow, which does not happen with the equivalent for the Makefile based systemReverting
ad8a4b380e
(cc @raito ) fixes this…Somehow.
What.
... what
that's because linearizing the meson tests means that mesonBuild depends on build, and mesonBuildClang depens on mesonBuild. that's expected and only temporary to make ci not explode. you can remove the overrideAttrs in the meson hydra jobs for local tests.
Right that would do that thank you
I don't think that's the issue since reverting an unrelated PR fixed it. Also this have just the same issue in CI no? or is it bypassed because of the way
nix-eval-jobs
works?@lunaphied it does build with Meson, it just builds with Meson after it builds with Make
Ah okay. Very cursed. So the linked commit is unrelated?
Yep
if you revert that commit and the source set before the revert is cached the dep needs not be built. ci doesn't run into this because it builds a dag and doesn't even start the meson build before the non-meson build has finished.
Yep, exactly. Thank you @pennae and sorry for the confusion
With the merge of https://gerrit.lix.systems/c/lix/+/836, I…think the buildsystem itself is done? Now we just need to verify that meson outputs everything correctly, update development documentation to include meson instructions, and flip the
buildWithMeson ? false
totrue
switch inpackage.nix
?@pennae @jade that sound about right?
sounds good. we made an attempt to verify that the meson binaries can be made bit-identical to the autoconf binaries with just some flag juggling, but that didn't lead anywhere. if anyfew with more patience for such nonsense wants to attempt we'd be very happy, otherwise we'll have to find the fuckups by testing :<
As of
b913a939b0
, Meson is now the default buildsystem for Lix 🎉!All that is left now is to remove the old buildsystem. I'm going to open a new issue for that.