please add a target to create a static proot executable

48 views
Skip to first unread message

Johannes Schauer

unread,
Jan 9, 2015, 12:17:57 PM1/9/15
to proo...@googlegroups.com
Hi,

since you already supply precompiled static proot binaries, I probably don't
have to convince you anymore that static proot binaries are useful :)

To convince downstream distributions to also supply a static binary alongside
their dynamically compiled ones, it would be great if your makefile could
provide a target which statically links the proot binary.

What do you think?

cheers, josch
signature.asc

Christophe Guillon

unread,
Jan 10, 2015, 8:50:05 AM1/10/15
to proo...@googlegroups.com
+1 for this

Christophe
--

---
You received this message because you are subscribed to the Google Groups "PRoot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proot_me+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ced...@reproducible.io

unread,
Jan 19, 2015, 3:51:27 AM1/19/15
to j.sc...@email.de, Christophe Guillon, proo...@googlegroups.com
Hello Josh and Christophe,

Josh wrote:
> since you already supply precompiled static proot binaries, I
> probably don't have to convince you anymore that static proot
> binaries are useful :)
>
> To convince downstream distributions to also
> supply a static binary alongside their dynamically compiled ones, it
> would be great if your makefile could provide a target which
> statically links the proot binary. What do you think?

I assume you want static linking to get of portable binary. In that
case, static linking is not enough; you also have to use libraries
that don't rely on kernel features that are not too recent, otherwise
users might get the error "FATAL: kernel too old" from the startup
code embedded in your binary.

This is reason why the static versions of proot I provide are
statically linked against a C library that assumes a 2.6.0 Linux
kernel:

https://github.com/cedric-vincent/proot-static-build/blob/master/GNUmakefile#L58

Please note that this C library is not that old, it just ensures it
doesn't use features that were not available in Linux 2.6.0.

Cédric.

Johannes Schauer

unread,
Jan 19, 2015, 4:09:33 AM1/19/15
to ced...@reproducible.io, Christophe Guillon, proo...@googlegroups.com
Hi Cédric,

Quoting ced...@reproducible.io (2015-01-19 09:51:00)
> I assume you want static linking to get of portable binary. In that case,
> static linking is not enough; you also have to use libraries that don't rely
> on kernel features that are not too recent, otherwise users might get the
> error "FATAL: kernel too old" from the startup code embedded in your binary.

thanks, I indeed did not think of this.

> This is reason why the static versions of proot I provide are statically
> linked against a C library that assumes a 2.6.0 Linux kernel:
>
> https://github.com/cedric-vincent/proot-static-build/blob/master/GNUmakefile#L58

Interesting. Would it maybe make sense to link to this git repository from
somewhere more public like the proot readme or website?

Thanks!

cheers, josch
signature.asc

ced...@reproducible.io

unread,
Jan 27, 2015, 4:47:24 AM1/27/15
to Johannes Schauer, Christophe Guillon, proo...@googlegroups.com
Hello josch,

Sorry for the delay.

On Mon, Jan 19, 2015 at 10:09:25AM +0100, Johannes Schauer wrote:
> Would it maybe make sense to link to this git repository from
> somewhere more public like the proot readme or website?

It's a good suggestion indeed. I propose to add the following
paragraph to the manual (which is also used to generate the website).
Let me know if that's OK with you:

Such binaries are created using the following build-system:
https://github.com/cedric-vincent/proot-static-build. It makes
sure that they can run on any distros powered by the Linux kernel
version 2.6.0 or later, nothing more. Ultimately these binaries
can even run on Linux systems where no libraries are installed.

Regards,
Cédric.

Johannes Schauer

unread,
Jan 27, 2015, 4:49:31 AM1/27/15
to ced...@reproducible.io, Christophe Guillon, proo...@googlegroups.com
Hi Cédric,

Quoting ced...@reproducible.io (2015-01-27 10:47:17)
> Sorry for the delay.

no worries :)

> I propose to add the following paragraph to the manual (which is also used to
> generate the website). Let me know if that's OK with you:
>
> Such binaries are created using the following build-system:
> https://github.com/cedric-vincent/proot-static-build. It makes
> sure that they can run on any distros powered by the Linux kernel
> version 2.6.0 or later, nothing more. Ultimately these binaries
> can even run on Linux systems where no libraries are installed.

totally okay! Thank you!

cheers, josch
signature.asc
Reply all
Reply to author
Forward
0 new messages