Building a statically linked dbus-daemon

Thiago Macieira thiago at kde.org
Wed Feb 5 18:46:12 PST 2014


Em qua 05 fev 2014, às 16:02:11, Jonathan Nichols escreveu:
> All,
> 
>     We would like to build a version of the dbus-daemon binary that is
> 100% statically linked.  All of our efforts to do this have failed.
> We have tried ./configure --enable-static, ./configure LDFLAGS=-static
> and a lot of other permutations but we always ended up with a
> dynamically linked binary.
> 
>     Does anyone have any advice on how to do this?

Hello Jonathan

Please paste a link to the build log. In specific, we're looking for the 
command-line that make passed to the compiler when trying to link the binary 
when you configured with the LDFLAGS=-static flag.

Note that --enable-static is usually about libraries, not about programs. For 
those, you need the necessary static libraries from your system (libc.a, 
libexpat.a, libpthread.a, etc.)

Also note that fully statically linked executables are ill-supported these 
days with glibc. There's a lot of functionality that cannot be accomplished in 
a static binary because glibc requires plugins. We completely disclaim 
responsibility there: if something breaks in the daemon, you get to keep all 
the pieces.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358



More information about the dbus mailing list