Can't build on mac os anymore #1118
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
7 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1118
Loading…
Add table
Add a link
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?
Describe the bug
I've started getting the following error whenever I try to build/switch
I am not sure whether this is a lix or a nix issue, searching for the strings in either project give no results except for:
github.com/NixOS/nix@6d6cbf78cc/src/libstore/unix/build/darwin-derivation-builder.cc (L199)and
https://git.lix.systems/lix-project/lix/src/branch/main/lix/libexec/launch-builder-darwin.cc#L49
Steps To Reproduce
I have a make file that runs the following:
and then commits the result
this has stopped working few days ago, my last commit has me bumping the version to
2e0cc67ec829754184dcbebff8078726debd13f7but looks like I am runningf09ed729b5dcacbbff5e1ae6f85bc93933ecf2f1Expected behavior
A clear and concise description of what you expected to happen.
nix --versionoutputAdditional context
nix.conf
can you run the build with
-j1 --debugand check forGenerated sandbox profilelines? those should not be empty.@lix-project/macos we can't find anything obviously wrong with the code since the same kind of string conveyance to the launcher works fine on linux, can y'all have a look?
actually, on a wild guess: can you rebuild your system from
git+https://gerrit.lix.systems/lix?ref=refs/changes/75/5075/1and see if that helps?there is no
--debugfor darwin-rebuild, but none of the verbose log options caused anything withGenerated sandbox profileto be printed.here are the available options
I first had to rollback to
2.95.0-pre20260130-dev_2e0cc67I could then build and switch to
2.95.0-pre20260203-dev_8b73cbbwhich then resulted in the following error:and seems to keep happening
darwin-rebuild build --flake .is equivalent tonix build .#darwinConfigurations.$HOSTNAME.config.system.build.toplevel, so you can pass--debugto that@imran-iq https://gerrit.lix.systems/c/lix/+/5076 has changes to ensure that we always report stderr of the build child if setup fails for any reason, is it does in your case. the
iovTotalnumber suggests that the sandbox profile is transmitted correctly, at leastSo using version
2.95.0-pre20260202-dev_f09ed72with -j1 --debug all i get pertaining to the sandbox is
using version
2.95.0-pre20260203-dev_8b73cbbI went ahead and switched to the latest on main:
2.95.0-pre20260204-dev_ba4f4f9and can build now (switched to a smaller package to build)If y'all are interested I could try bisecting to figure out which commit had the issue, but for now am good
great that it works again! bisecting probably won't be necessary, but we'd really like to get to the bottom of the writev error since we think it's related. can you retry building the derivation that reproduced that error to begin with? which derivation was it, do you know?
I'm also getting the
writeverror when building my nix-darwin configuration (although I also get that when using cppnix so I don't know if it's a Lix issue). This is the output it gives me when using the latest commit (2.95.0-pre20260204-dev_ba4f4f9):https://gerrit.lix.systems/c/lix/+/5080 has improved the error messages further. we really wish to get to the bottom of this, because quite frankly we can't imagine why things are breaking like this
So my timeline of events was:
I started on this version (i'll call this version 1)
2e0cc67ec8I then built and switched to this (I'll call this version 2):
f09ed729b5when switching to version 2 I ended up getting those sandbox error messages when trying to build anything
I then opened this ticket
I built (version 3) from this comment and that git url: git+https://gerrit.lix.systems/lix?ref=refs/changes/75/5075/1
version 3 is what gives me that
error: ::writevstuffI am now back on the main branch at
ba4f4f917aand (for me) have stopped seeing the
error ::writevstuffI will try building and switching to the new commit and see what happens
I may have spoken too soon, I getting this now building the new change with
ba4f4f917a5989205443b581917e046b5da2ba12@imran-iq can you try with
684aba046a? We missed the actual error reporting. This time, this should be good.using
684aba046awithnix build .#darwinConfigurations.HOST.config.system.build.toplevel -j1 --debug --rebuildThis issue was mentioned on Gerrit on the following CLs:
This is still broken for me unfortunately. I updated to the latest commit (2.95.0-pre20260209-dev_95ac829) and using the command
nix build .#darwinConfigurations.<hostname>.config.system.build.toplevel -j1 --debugin my system configuration flake still gives me the following output:@toodeluna Can you confirm that the daemon you are using is using the latest Lix version with the patch? (using launchd to examine the paths and verify it's the right one, etc.)
specifically: nix-darwin rewrites the launchd service on each rebuild to make sure you're always running the daemon version associated with the whole darwin profile, so if you're not taking steps to run the right daemon yourself, it's likely you'll need to
launchctl bootout org.nixos.nix-daemonto stop the previous daemon, and then run the daemon from your up-to-date build tree (e.g. withsudo nix run --daemonin the build tree) and then run darwin-rebuild@raito @ktemkin Seems like this was the issue indeed! Had to manually kill the nix-daemon and re-run it since I was unable to rebuild. Didn't work for me with
launchctl bootout org.nixos.nix-daemonthough so I didps aux | grep nix-daemonto find the PID of the nix-daemon and then killed that and ransudo nix daemonafter which I was able to rebuild again. Thanks for suggesting this, I would've probably been stuck for a long time otherwise!Closing this as it seems fixed; but feel free to poke if anything else goes wrong. ^^