[buildd-tools-devel] Statically-linked Schroot

Roger Leigh rleigh at codelibre.net
Fri Oct 21 23:32:16 UTC 2011


On Thu, Oct 20, 2011 at 03:46:10PM -0400, Daniel Thau wrote:
> 1. Are there any other possible problems with statically-linked
> compiling schroot which I may have overlooked?

schroot uses PAM for authentication/authorisation, which depends upon
dlopening security modules from /lib.  dlopen requires a dynamic libc.
This may be circumvented by building without PAM support
(--disable-pam).  However, this will make the authentication simpler
and stricter in some cases.  It's also much less widely tested.

> 2. Irrelevant of such problems, how would I go about compiling schroot
> statically-linked?

You can ensure schroot (internally) is static with
--enable-static --disable-shared
but for the libraries it links with, you'll need to ensure that you
have static copies of them, and possibly hack the configure script
or generated Makefiles to use e.g. /usr/lib/libfoo.a in place of
"-lfoo".

Note that I'm unaware of this being done before--it's not directly
supported, and not really recommended.  I can't give any specific
advice for point 2 since I don't know myself offhand what needs
adjusting; I would suggest googling for general guidance for
static builds to start with.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.



More information about the Buildd-tools-devel mailing list