[systemd-devel] Cross-building systemd?

Henrik Grindal Bakken hgb at ifi.uio.no
Mon Oct 7 00:52:35 PDT 2013


Warpme <warpme at o2.pl> writes:

> Hi,
> I want to build sytemd in cross-build environment.  One from many
> needed dependencies is libcap which is really old and isn't
> cross-build friendly.  It looks like libcap-ng is kind of successor
> and I can build this lib in my cross-build environment.  Is there
> any way to build systemd with libcap-ng ?  Or maybe there is
> possibility to build systemd without libcap?  Thx in advance!

We cross-compile libcap and systemd, and it works fine.  My rules for
building libcap are:

make CC=<cross-cc> BUILD_CC=gcc LIBATTR=no PAM_CAP=no
make CC=<cross-cc> BUILD_CC=gcc LIBATTR=no PAM_CAP=no DESTDIR=<somewhere> prefix= install

We also set quite a few variables (CROSS_COMPILE, LD, AR, CFLAGS,
whatever) in our build system, so you might need some of those.  They
are all set in a pretty standard way.

We build libcap from the latest in git (056ffb0bd2).

-- 
Henrik Grindal Bakken <hgb at ifi.uio.no>
PGP ID: 8D436E52
Fingerprint: 131D 9590 F0CF 47EF 7963  02AF 9236 D25A 8D43 6E52



More information about the systemd-devel mailing list