-
Notifications
You must be signed in to change notification settings - Fork 822
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
Unable to install Nix package manage #743
Comments
I hope this will eventually resolved soon. Many packages in nix are more updated and close to upstream version.... |
I've run into something very similar with the Linuxbrew package manager. Initial installation goes OK, but every ELF binary linked in
|
Sorry for the delay in looking at this thread, I dug into this a bit and it looks like our ELF parsing logic is assuming that interpreter paths must be less than 64 characters long, which is incorrect. When I bumped that number up to 128 the Nix binaries are running. I'm going to look through the ELF format documentation to determine what the correct max size is (maybe it's just PATH_MAX). Unfortunately shortly after the Nix binaries use the PR_SET_PDEATHSIG option of the prctl system call for which I've filed a task to implement. |
@benhillis I think it indeed should be PATH_MAX. I can't recall any limitations in the ELF specification, only that interpreter path is referenced by specifying offset for path string and its integer length. |
@wizardist That seems to be the case. I have a fix in code review that will resolve this. |
The PR_SET_PDEATHSIG fix should be out to insider builds soon, and I confirmed |
Any update on this issue? Does this mean that Linuxbrew executables modified by |
Following... Thanks! |
@sjackman thanks for the follow-up. I read through the information in this post and #471, but I'm not seeing how they are related. Can you please clarify? For this post, the two issues where with 1.) elf parsing logic for interpreter path length was wrong and 2.) PR_SET_PDEATHSIG support. For #471, it looks like the issue there was the "cannot enable executable stack" failure which has a workaround. |
The precompiled executables are patched with To reproduce the issue, install Linuxbrew (instructions at http://linuxbrew.sh) and run brew install hello
hello |
Thanks for providing the additional details. I went through all of the steps, but the last one ( :~$ hello
Is there a different command I need to run? Sorry I'm not familiar with brew, but maybe |
You can use either PATH="$HOME/.linuxbrew/bin:$PATH"
hello |
Thanks for the detailed steps. I just tried locally, and it is failing in execv for /home/.linuxbrew/Cellar/hello/2.10/bin/hello. Since this failure isn't related to this post, let's continue the discussion over in #471. |
For reference: Issue for PR_SET_PDEATHSIG In which version of Windows should the path parsing problem be fixed? |
@stehufntdev can you do
and it works? |
@domenkozar, I went through those steps and was able to launch python and didn't see any obvious failures in the install spew. Please let us know if you hit any issues on the most recent insider build. |
I think this can be closed. I've installed Nix, did a normal build of GNU Hello and executed it. I then did a cross-compile from WSL to an (import <nixpkgs> {
crossSystem = {
config = "x86_64-w64-mingw32";
libc = "msvcrt";
};
}).hello.crossDrv And the brilliant thing is that an |
Great, thanks for confirming! |
I don't know what is running wrong, because is no useful information. WSL just complaint
cannot execute binary file: Exec format error
, usingfile
command on this file I getcloud@DESKTOP-DSHEB2Q:/nix/store/4z8srway6dl128dxzn5r0wwdvglz3m61-nix-1.11.2/bin$ file nix-store nix-store: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped
To reproduce this error, simply run
curl https://nixos.org/nix/install | sh
or just follow the instruction on http://nixos.org/nix/. This will install a standalone package manager independent from the host. It heavily used link.The text was updated successfully, but these errors were encountered: