You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bash shebang length limitation in bootstrap wrapper for gcc #219
the gcc wrapper fails to run because of a shebang length limitation (apparently it is 80). Not sure it is possible, but maybe we could relax that constraint for bash.
If it was 80, we might hit this even with standard nix prefix -- our lengths are 44 chars + -name-version just for the root of any package. However, in our linuxHeaders I see 128 as the limit.
I do not have the error now, but it said something like: 'invalid command /home/pprins/opt/nix/my-very-long-path-which-we-patch-later/store/gzcj4', i.e. truncated at 72. Other Nix paths can be longer, as long as they don't call the location of a long shebang, the way the bootstrap scripts do. To me it looks like the shebang does have a limitation of 80 on the CentOS kernel underneath.
Otherwise I would have not had the problem. It got fixed by using a shorter path.
Having interpreters from nix store in shebangs is unavoidable, otherwise there can be problems like NixOS/nixpkgs#1870. The only chance might be if the limit is only per-line and backslash-joining of lines work, but I don't even know if this is the case, and it seems quite complicated anyway.
Activity
shlevy commentedon Mar 9, 2014
This is almost certainly a kernel limitation, not a bash one. The kernel is the one that parses shebangs
pjotrp commentedon Mar 9, 2014
I'll make do with shorter paths then ;). Thanks.
vcunat commentedon Mar 9, 2014
If it was 80, we might hit this even with standard nix prefix -- our lengths are 44 chars +
-name-versionjust for the root of any package. However, in ourlinuxHeadersI see 128 as the limit.http://stackoverflow.com/questions/10813538/shebang-line-limit-in-bash-and-linux-kernel
pjotrp commentedon Mar 11, 2014
I do not have the error now, but it said something like: 'invalid command /home/pprins/opt/nix/my-very-long-path-which-we-patch-later/store/gzcj4', i.e. truncated at 72. Other Nix paths can be longer, as long as they don't call the location of a long shebang, the way the bootstrap scripts do. To me it looks like the shebang does have a limitation of 80 on the CentOS kernel underneath.
Otherwise I would have not had the problem. It got fixed by using a shorter path.
vcunat commentedon Mar 11, 2014
Having interpreters from nix store in shebangs is unavoidable, otherwise there can be problems like NixOS/nixpkgs#1870. The only chance might be if the limit is only per-line and backslash-joining of lines work, but I don't even know if this is the case, and it seems quite complicated anyway.
Merge pull request NixOS#219 from kolloch/update-cachix-action
Merge pull request NixOS#219 from DeterminateSystems/fixup-fakessh-check
doc/inventory: add NixOS#219 — post-build hook timeout silently dropped
doc/inventory: update Branch lines and counts after post-cleanup polish
doc/inventory: scope candidate bodies to post-Batch-G review verdicts
doc/inventory: STATUS — record batch H (six candidates, four shards)