[Nix-dev] Building portable linux binaries on NixOS

zimbatm zimbatm at zimbatm.com
Wed Oct 7 22:12:09 CEST 2015


@Luca: try this:
```
$ nix-env -i direnv
[snip]
$ ldd `which direnv`
    not a dynamic executable
```
The difference is that direnv is pure go and thus isn't compiled by gccgo.

@Kamil: if it's possible to remove all the C dependencies in your go
program I would recommend it. It just makes distribution much less painful
and you don't have to deal with patching your executable.




On Wed, 7 Oct 2015 at 19:48 Peter Simons <simons at cryp.to> wrote:

> Kamil Chmielewski writes:
>
>  > $ ldd go-app
>  > linux-vdso.so.1 (0x00007ffdeab70000)
>  > libpthread.so.0 =>
> nix/store/npfsi1d9ka8zwnxzn3sr08hbwvpapyk7-glibc-2.21/lib/libpthread.so.0
> (0x00007f9ae89e0000)
>  > libc.so.6 =>
> /nix/store/npfsi1d9ka8zwnxzn3sr08hbwvpapyk7-glibc-2.21/lib/libc.so.6
> (0x00007f9ae8640000)
>  >
> /nix/store/npfsi1d9ka8zwnxzn3sr08hbwvpapyk7-glibc-2.21/lib/ld-linux-x86-64.so.2
> (0x00007f9ae8bfd000)
>
> that last path to ld-linux-x86-64.so.2 represents your system linker,
> which is required to load this executable into memory. I suppose that
> path doesn't exist on the Ubuntu machine where you're trying to execute
> the program? That would be consistent with the error message you got.
>
> Best regards,
> Peter
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20151007/55d5eaa5/attachment.html 


More information about the nix-dev mailing list