Re: [Nix-dev] --ftls-model=global-dynamic for every lib?

2016-02-28 Thread stewart mackenzie
Globin deserves a rather large amount of beers from me!

Such fantastic work globin, looking forward to this PR landing!

Thanks for the link Domen! I'll sleep like a well tonight.

/sjm

On 28 Feb 2016 18:33, "Domen Kožar"  wrote:
>
> See
https://github.com/NixOS/nixpkgs/pull/12895/files#diff-8ac87a75c3dd650a7f760fa3b2d041bfR239
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] --ftls-model=global-dynamic for every lib?

2016-02-28 Thread Adrien Devresse
Thx Domen, this is exactly what I was looking for.




Le 28/02/2016 11:33, Domen Kožar a écrit :
> See 
> https://github.com/NixOS/nixpkgs/pull/12895/files#diff-8ac87a75c3dd650a7f760fa3b2d041bfR239
>
> On Sun, Feb 28, 2016 at 10:31 AM, Adrien Devresse  > wrote:
>
> To generalize a bit on this.
>
> Most of the Linux distributions have a mandatory default set of flags
> for all libraries / binaries that are enforced through "configure /
> cmake" macros ( -fPIC is part of them ). They do this for very good
> reasons: security, protability, compatibility.
>
> It would be good to have a bit of documentation on how to handle
> this in
> NixOS.
>
>
> Adev~~
>
> Le 28/02/2016 01:31, stewart mackenzie a écrit :
> > Just to clarify the correct argument passed to gcc or clang
> should be -fpic .
> > ___
> > nix-dev mailing list
> > nix-dev@lists.science.uu.nl 
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
>
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl 
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>



signature.asc
Description: OpenPGP digital signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] --ftls-model=global-dynamic for every lib?

2016-02-28 Thread Vladimír Čunát
On 02/28/2016 11:31 AM, Adrien Devresse wrote:
> Most of the Linux distributions have a mandatory default set of flags
> for all libraries / binaries that are enforced through "configure /
> cmake" macros ( -fPIC is part of them ).

The security flags are WIP here: https://github.com/NixOS/nixpkgs/pull/12895




smime.p7s
Description: S/MIME Cryptographic Signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] --ftls-model=global-dynamic for every lib?

2016-02-28 Thread Domen Kožar
See
https://github.com/NixOS/nixpkgs/pull/12895/files#diff-8ac87a75c3dd650a7f760fa3b2d041bfR239

On Sun, Feb 28, 2016 at 10:31 AM, Adrien Devresse  wrote:

> To generalize a bit on this.
>
> Most of the Linux distributions have a mandatory default set of flags
> for all libraries / binaries that are enforced through "configure /
> cmake" macros ( -fPIC is part of them ). They do this for very good
> reasons: security, protability, compatibility.
>
> It would be good to have a bit of documentation on how to handle this in
> NixOS.
>
>
> Adev~~
>
> Le 28/02/2016 01:31, stewart mackenzie a écrit :
> > Just to clarify the correct argument passed to gcc or clang should be
> -fpic .
> > ___
> > nix-dev mailing list
> > nix-dev@lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
>
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] --ftls-model=global-dynamic for every lib?

2016-02-28 Thread Adrien Devresse
To generalize a bit on this.

Most of the Linux distributions have a mandatory default set of flags
for all libraries / binaries that are enforced through "configure /
cmake" macros ( -fPIC is part of them ). They do this for very good
reasons: security, protability, compatibility.

It would be good to have a bit of documentation on how to handle this in
NixOS.


Adev~~

Le 28/02/2016 01:31, stewart mackenzie a écrit :
> Just to clarify the correct argument passed to gcc or clang should be -fpic .
> ___
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev




signature.asc
Description: OpenPGP digital signature
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


Re: [Nix-dev] --ftls-model=global-dynamic for every lib?

2016-02-27 Thread stewart mackenzie
Just to clarify the correct argument passed to gcc or clang should be -fpic .
___
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[Nix-dev] --ftls-model=global-dynamic for every lib?

2016-02-27 Thread stewart mackenzie
Hello,

Seems libraries in nix are not compiled with
--ftls-model=global-dynamic which means in the use case of fractadie
we quickly run out of TLS variables.

Fractalide is a Flow-based programming programming platform tha has a
thread per component, a component is a shared object and could be
dependent on 3rd party software like openssl. Include enough 3rd party
libraries compiled with static TLS (initial-exec) and the system blows
up complaining about running out of TLS variables.

This is an example of the error thrown:

thread '' panicked at 'called `Result::unwrap()` on an `Err`
value: "SDL error: Failed loading libGL.so.1: dlopen: cannot load any
more object with static TLS"', src/libcore/result.rs:688

See https://users.rust-lang.org/t/initial-exec-tls-variables/4783/5

Does this mean fractalide programmers would need to override
libraries' configureFlags by adding --ftls-model=global-dynamic. This
does not feel like a long term solution especially since it means end
users will not be able to make use of Nix's Hydra binaries.

What would be the best solution to this be?

gah!

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