Re: [Nix-dev] Disabling patchelf on ARM

2015-12-29 Thread Joachim Schiele
On 26.12.2015 12:55, Jookia wrote:
> Hey there,
> 
> I've been working for a few months on getting a Novena port of NixOS running.
> The overall Nix infrastructure works, though I still have a ton of issues to
> solve before publishing any patches required on a git repository (they 
> probably
> won't be merged in to nixpkgs anyway.)

if they are good patches we will merge them!

> A problem I've been dealing with is mysterious segmentation faults affecting 
> the
> system along with bugs that aren't present in Debian on the same system.
> patchelf has been the culprit for quite a few of them and upstream doesn't 
> seem
> to be working on fixing this.

patchelf is used to deploy the initial bootstrap-tools. later one there
is only minimal use, as you already said, for binary only applications.

please provide an exaple, where patchelf is doing something wrong with
some paste from the shell.

thank you

___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Disabling patchelf on ARM

2015-12-29 Thread Lluís Batlle i Rossell
For what I remember, Patchelf is used in most stdenv.mkDerivation just to
shorten the number of dependencies (shrink-rpath).

In armv5tel, I remember that my binaries were broken if I run patchelf
*ONCE*. If I run patchelf *TWICE*, they worked fine. That's clearly an
jnsolved bug worked around. I think it was never fixed in patchelf,
because there was this work-around and noone looked at the problem
anymore.

I think that for arv6 or armv7 the double-patchelf was not required
anymore; I can't tell. I have not checked how does it work now with those
archs.

Jokia, it'd be great if you would gather details beyond "it breaks 
binaries", and even better if you could propose a fix. :)

Regards,
Lluís.

On Tue, Dec 29, 2015 at 12:24:33PM +0100, Joachim Schiele wrote:
> On 26.12.2015 12:55, Jookia wrote:
> > Hey there,
> > 
> > I've been working for a few months on getting a Novena port of NixOS 
> > running.
> > The overall Nix infrastructure works, though I still have a ton of issues to
> > solve before publishing any patches required on a git repository (they 
> > probably
> > won't be merged in to nixpkgs anyway.)
> 
> if they are good patches we will merge them!
> 
> > A problem I've been dealing with is mysterious segmentation faults 
> > affecting the
> > system along with bugs that aren't present in Debian on the same system.
> > patchelf has been the culprit for quite a few of them and upstream doesn't 
> > seem
> > to be working on fixing this.
> 
> patchelf is used to deploy the initial bootstrap-tools. later one there
> is only minimal use, as you already said, for binary only applications.
> 
> please provide an exaple, where patchelf is doing something wrong with
> some paste from the shell.
> 
> thank you
> 
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

-- 
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key D4831A8A - https://emailselfdefense.fsf.org/
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Disabling patchelf on ARM

2015-12-29 Thread Jookia
On Tue, Dec 29, 2015 at 12:32:35PM +0100, Lluís Batlle i Rossell wrote:
> For what I remember, Patchelf is used in most stdenv.mkDerivation just to
> shorten the number of dependencies (shrink-rpath).

Yeah- shrink-rpath is doing the damage.

> In armv5tel, I remember that my binaries were broken if I run patchelf
> *ONCE*. If I run patchelf *TWICE*, they worked fine. That's clearly an
> jnsolved bug worked around. I think it was never fixed in patchelf,
> because there was this work-around and noone looked at the problem
> anymore.

> I think that for arv6 or armv7 the double-patchelf was not required
> anymore; I can't tell. I have not checked how does it work now with those
> archs.

I may have to test that- but it's still definitely something that breaks on my
machine.

> Jokia, it'd be great if you would gather details beyond "it breaks
> binaries", and even better if you could propose a fix. :)

On an ARM system, install vim_configurable (doesn't matter which configuration)-
it'll segfault after being stripped by patchelf. I can't remember off the top of
my head any other examples, but I know that one certainly breaks.

The most I can find is https://github.com/NixOS/patchelf/issues/8 which may or
may not be related as it affects Fedora. My solution is to disable patchelf
since it's breaking things without good reason.

> Regards,
> Lluís.

Cheers,
Jookia.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] Disabling patchelf on ARM

2015-12-29 Thread Jookia
On Tue, Dec 29, 2015 at 12:24:33PM +0100, Joachim Schiele wrote:
> if they are good patches we will merge them!

I appreciate the enthusiasm. :)

Unfortunately the mailing list doesn't seem to do many patch reviews which
conflicts with my want to do things slowly. The only way I can see merging
happening is if I showered a ton of patches for review, some related to ARM,
some not but still required for the Novena, and hope people review them and
cherry pick them. I suppose I could always privately contact the maintainers of
wherever I'm patching, but that feels a little too opaque for my tastes.

Maintaining my own fork public nixpkgs is impossible given how long compile
times are when it comes to Nix. Rebasing could take a few days on my stripped
down install since I don't (nor does anyone seem to) have an ARM build farm, I
shudder to think if any Novena users want to run more than i3, it'd probably
take a magnitude longer considering some builds only work single-threaded, and
as we focus more on reproducible builds I imagine we'll be reverting back for
things like Haskell. At that point it may actually be impossible to build and
run NixOS using just an ARM machine and no binary caches.

Pessimism aside, an ARM build farm is a solvable, unrelated problem to my
patches. As long as I can get some review upstreaming shouldn't be a problem.

> patchelf is used to deploy the initial bootstrap-tools. later one there
> is only minimal use, as you already said, for binary only applications.
>
> please provide an exaple, where patchelf is doing something wrong with
> some paste from the shell.
>
> thank you

Installing vim_configurable on ARM seems to do the trick. I can't reproduce it
right now, mysterious. Perhaps I have a patched version, I'll check later.

Cheers,
Jookia.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] Disabling patchelf on ARM

2015-12-26 Thread Jookia
Hey there,

I've been working for a few months on getting a Novena port of NixOS running.
The overall Nix infrastructure works, though I still have a ton of issues to
solve before publishing any patches required on a git repository (they probably
won't be merged in to nixpkgs anyway.)

A problem I've been dealing with is mysterious segmentation faults affecting the
system along with bugs that aren't present in Debian on the same system.
patchelf has been the culprit for quite a few of them and upstream doesn't seem
to be working on fixing this.

I haven't looked at this too deeply, but I'm wondering: Is there a way to
disable patchelf to stop it corrupting my binaries? I'm not running any nonfree
software so I'm not too worried about working with unchangeable code.

Cheers,
Jookia.
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev