<div dir="ltr">Thanks Aycan. The LD_PRELOAD solution did indeed work. I didn't know about that facility before, so I'm pleasantly surprised.<div><br></div><div>One gotcha though: I had to add the "fake-library" into the runtime as well; with a command that looked like this:</div><div><br></div><div>    ar q libHsrts_thr.a ghcFakeLib.o</div><div><br></div><div>where the libHsrts_thr.a comes from the binary distro, and the ghcFakeLib.o is the object file I got by defining those pthread_setname_np and pthread_getname_np. (They do nothing but return 0.)</div><div><br></div><div>Thanks,</div><div><br></div><div>-Levent.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 30, 2015 at 12:37 AM, Aycan İrican <span dir="ltr"><<a href="mailto:iricanaycan@gmail.com" target="_blank">iricanaycan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Levent,<div><br></div><div>For a quick fix, you may want to create a wrapper script which uses LD_PRELOAD to inject `set_threadname_np` to your runtime. An example is given in this blog page:</div><div><br></div><div><a href="http://hackerboss.com/overriding-system-functions-for-fun-and-profit/" target="_blank">http://hackerboss.com/overriding-system-functions-for-fun-and-profit/</a></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-aycan</div></font></span><div>  <br><div><blockquote type="cite"><div><div class="h5"><div>On 30 Aug 2015, at 03:02, Levent Erkok <<a href="mailto:erkokl@gmail.com" target="_blank">erkokl@gmail.com</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr"><div>I really like the idea of nix. Alas, generating native binaries that can run on SuSE without being in the nix environment is a requirement that's hard to let go. (Everyone in my group would have to start using nix, a tall order.)</div><div><br></div><div>Thanks for the advice however, it can indeed come handy for one-off trials if needed. In the meantime, I'm still looking for a binary-linux-distro that doesn't require the set_threadname_np functionality, if anyone can point me in that direction.</div><div><br></div><div>Thanks,</div><div><br></div><div>-Levent.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 29, 2015 at 3:23 PM, Kosyrev Serge <span dir="ltr"><<a href="mailto:_deepfire@feelingofgreen.ru" target="_blank">_deepfire@feelingofgreen.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Levent Erkok <<a href="mailto:erkokl@gmail.com" target="_blank">erkokl@gmail.com</a>> writes:<br>
> Hello all,<br>
><br>
> I've been having a lot of trouble installing the binary-distro's on a<br>
> SuSE machine. Unfortunately, I don't have root privileges and thus my<br>
> options are rather limited.<br>
><br>
> The problem seem to boil down to the use of the function<br>
> pthread_setname_np. It appears the problem was noted before, and Simon<br>
> Marlow added a corresponding configure check for platforms that do not<br>
> have this function. See here:<br>
> <a href="https://mail.haskell.org/pipermail/ghc-devs/2014-October/006707.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipermail/ghc-devs/2014-October/006707.html</a><br>
><br>
> Alas, none of the binary distributions listed on<br>
> <a href="https://www.haskell.org/ghc/download_ghc_7_10_2#binaries" rel="noreferrer" target="_blank">https://www.haskell.org/ghc/download_ghc_7_10_2#binaries</a> seem to be<br>
> built against a system that does not have this function. So, I was<br>
> unable to install 7.10.2 successfully.<br>
><br>
> Essentially, I'm looking for a binary distro on SuSE, or with a libc<br>
> that doesn't have the GNU extensions such as pthread_setname_np; if<br>
> anyone would be kind enough to put out such a binary distro, that'd<br>
> really be appreciated.<br>
><br>
> (Yes, I tried building from the source; but in the corporate<br>
> environment with so many things controlled, that did not go very far.)<br>
<br>
</span>You could try the Nix route, which, conceptually, would boil down to:<br>
<br>
1. Installing the Nix package manager into your $HOME on the SuSE system<br>
2. Use Nix to install GHC<br>
<br>
Which expands to:<br>
<br>
1. Following the instructions at:<br>
<br>
  <a href="https://nixos.org/wiki/How_to_install_nix_in_home_%28on_another_distribution%29#PRoot_Installation" rel="noreferrer" target="_blank">https://nixos.org/wiki/How_to_install_nix_in_home_%28on_another_distribution%29#PRoot_Installation</a><br>
<br>
2. Invoking:<br>
<br>
  nix-env -iA haskellPackages.ghc<br>
<br>
This would require only HTTP access, which, I presume, should be<br>
available within the corporate environment.<br>
<br>
All the packages from Hackage can be had precompiled from Nixpkgs,<br>
but that's slightly more involved and requires some reading:<br>
<br>
  <a href="http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure" rel="noreferrer" target="_blank">http://nixos.org/nixpkgs/manual/#users-guide-to-the-haskell-infrastructure</a><br>
<br>
Should you meet trouble, you can always seek help either at<br>
<a href="mailto:nix-dev@lists.science.uu.nl" target="_blank">nix-dev@lists.science.uu.nl</a>, or on the #nixos/<a href="http://irc.freenode.net/" rel="noreferrer" target="_blank">irc.freenode.net</a> IRC<br>
channel -- both have a vibrant nightlife^W Haskell community.<br>
<span><font color="#888888"><br>
--<br>
с уважениeм / respectfully,<br>
Косырев Серёга<br>
--<br>
“And those who were seen dancing were thought to be insane<br>
 by those who could not hear the music.”<br>
 – Friedrich Wilhelm Nietzsche<br>
</font></span></blockquote></div><br></div></div></div><span class="">
_______________________________________________<br>ghc-devs mailing list<br><a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br></span></div></blockquote></div><br></div></div></blockquote></div><br></div>