Skip to content
Advertisement

How to compile *only* uuid from linux utils

I have the linux utils code (can be found here: https://www.kernel.org/pub/linux/utils/util-linux/) and I only need libuuid, nothing else. I’ve tried setting many ‘–disable-‘ flags but it still seems to be compiling things I don’t need.

Here’s my actual configure command:

JavaScript

and here’s my output:

JavaScript

Is there any way to only build libuuid?

Advertisement

Answer

The easiest approach would be to pull the latest linux-utils tarball from the link you provided, extract it’s contents, and then modify the root-level Makefile.am. Look for the section that looks like this:


JavaScript

And modify it to look like so (leave only the libuuid entry uncommented):

JavaScript

Finally, from the root directory (of the archive you extracted), execute the following:

JavaScript

You may need to run automake --add-missing instead of automake, and autoreconf --force --install instead of autoconf, depending on the version of autotools installed on your system.

Now, just find your built library via find . -iname "*libuuid.so*".

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement