[systemd-devel] How to build only udev

Simon McVittie smcv at collabora.com
Wed Jul 4 19:34:18 UTC 2018


On Wed, 04 Jul 2018 at 11:36:23 -0700, Kevin Greene wrote:
> 2018-07-03 18:18 GMT-07:00 Mike Gilbert <floppym at gentoo.org>:
>     Why not just install the libudev-dev package on a Ubuntu dev
>     system/chroot? That would be much simpler than building libudev from
>     scratch, and would ensure you build against the actual library Ubuntu
>     uses.
> 
> 
> I appreciate the suggestion. I would definitely much prefer to do that, but
> I'm cross-compiling, and there doesn't appear to be a way to install arm64
> libudev-dev on x86_64

You can add arm64 as a "foreign architecture" and install the arm64
libudev-dev that way, in a chroot/container that is based on the same
release of Ubuntu as your target platform, but amd64 (x86_64) instead
of arm64:

sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install libudev-dev:arm64

(Depending on the Ubuntu release of interest, you might also be able
to install an entire cross-toolchain by installing
crossbuild-essential-arm64 in the same chroot/container.)

See also
https://enricozini.org/blog/2017/debian/qt-cross-architecture-development-in-debian/
(that's Debian armhf not Ubuntu arm64, but the principle is the same).

    smcv


More information about the systemd-devel mailing list