-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lua: fix on darwin by using makeBinaryWrapper #172749
Conversation
This cannot be considered complete yet but it appears to work for
cc: @alerque in case he knows the cause of the above. |
Another issue I'm working through is this one:
It appears to be unrelated to my change specifically and is perhaps due the compat version being incompatible with the lua version. |
Running
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an unrelated cargo-feature commit here.
Whoops sorry about that cargo-feature commit. I'll remove it. I think a rebase went wrong on my end. |
The only other package I can find with lua as a dependency that is also marked broken on darwin is pdns but it is marked broken on darwin anyway since it requires systemd. |
The only remaining issue I have to work through is the libtexpdf problem when the |
Quoting from #172341 :
@alerque I see now that As for the diff --git c/pkgs/tools/typesetting/sile/default.nix i/pkgs/tools/typesetting/sile/default.nix
index 4bff8ab3ae3..5e83cdd766f 100644
--- c/pkgs/tools/typesetting/sile/default.nix
+++ i/pkgs/tools/typesetting/sile/default.nix
@@ -18,7 +18,6 @@ let
luaEnv = lua.withPackages(ps: with ps; [
cassowary
cosmo
- compat53
linenoise
lpeg
lua-zlib
@@ -33,6 +32,8 @@ let
penlight
stdlib
vstruct
+ ] ++ lib.optionals (lib.versionOlder lua.luaversion "5.3") [
+ compat53
]);
in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff looks pretty good, besides the libtexpdf
issue and the doCheck
now disabled on sile. cc @teto for a 2nd eye
9728b75
to
eeb8082
Compare
I keep getting bogged down in figuring out the libtexpdf and compat53 stuff. I'm going to exclude them from this change for now. I can workaround the libtexpdf thing with a doCheck override for the moment and the compat53 thing should be excluded from this change anyway I think. |
ff6b011
to
c3ce148
Compare
I've made the changes to leave the |
Lua stuff now got very broken on aarch64-darwin, apparently. And this commit is the main suspect chosen from the range where it started. Log: https://hydra.nixos.org/build/177341824 PR: #173605. |
That log doesn't give much to go on. Is it just timing out or is something else going on? |
I don't know, I don't have any compatible machine. I at least forced Hydra to retry a few times, but it always failed. |
I have a compatible machine. I'll try to figure it out but it will be a
couple days before I can get to it. I understand if this has to be reverted
in the meantime.
…On Sun, May 22, 2022 at 3:12 AM Vladimír Čunát ***@***.***> wrote:
I don't know, I don't have any compatible machine. I at least forced Hydra
to retry a few times, but it always failed.
—
Reply to this email directly, view it on GitHub
<#172749 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAJ5NYGQ5LVHCY3YS3MV73VLHM4XANCNFSM5VZKWAZQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Jeremy Wall
http://jeremy.marzhillstudios.com
***@***.***
|
This reverts commit 92f4c6e. On aarch64-darwin this completely broke lua instead of improving it; let's revert at least until that's resolved. #172749 (comment)
I was not able to replicate this on my my fix branch but I was able to replicate on staging. If it is this change then it's an interaction between this change and the other changes on staging. I may not be able to dig in any more till next week sometime though. |
I noticed in the meantime that also some |
Digging in a little more it would appear that the lua binary is what is getting killed with prejudice. It's not clear why to me yet. Nor why it works in my branch but not staging. At a first guess perhaps something changed with the |
Here is why lua is getting killed. It looks like a codesigning issue with the
|
If there's a culprit in that PR it's most certainly |
It seems to one of those things that is only showing up when both this, and that change both landed. Lua wasn't using the binaryWrapper until this was merged in. I don't know if the Coq tests referenced above are also related or not. |
Seems like |
@ncfavier, I'll give it a try tomorrow. |
I see what's happening now: stripping binaries invalidates the signature (see #105026 (comment)). This is supposed to be avoided by having a wrapped version of Indeed, in a previous build of
whereas in the current build, it's
I am now convinced that #174038 fixes this. |
This reverts commit 9f4060c. After the previous merge commit this should work now.
OK, looks good on Hydra: https://hydra.nixos.org/eval/1763210#tabs-now-succeed |
* origin/staging-next: (62 commits) Re-Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)" openldap: fix cross-compilation makeBinaryWrapper: fix codesign on aarch64-darwin python3Packages.ldap: fix linking with openldap 2.5+ Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)" wine: enable parallel build again pkgsi686Linux.gdb: fix formatting for 32-bit systems gtk4: Fix incorrect merge nixos/openldap: use upstream unit defaults openldap: update maintainers openldap: 2.4.58 -> 2.6.2 Revert "Add mingwW64-llvm cross-system." lua: fix on darwin by using makeBinaryWrapper (#172749) python310Packages.python-mimeparse: execute tests pandas: fix darwin build gtk3: 3.24.33 -> 3.24.33-2022-03-11 gtk4: patch fixing g-c-c crashes e2fsprogs: patch for CVE-2022-1304 firefox-unwrapped: fix cross compilation rustc: expose correct llvmPackages for cross compile ...
@vcunat, @teto, @ncfavier, @doronbehar, and @alerque , Thanks for the quick action on these. As a nix user on darwin I really appreciate the patience for my first contribution to nixpkgs. |
Darwin execve has issues with shebang lines that point to other scripts
with shebang lines. A new makeBinaryWrapper hook was added to workaround
the issue on darwin. See #171473 and #23018 for more information. This
uses that binary wrapper to fix packages like sile.
I'm not sure this can be considered complete but it appears to work for
sile at least.
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notescc: @alerque