My compile line is:

$GCC -O0 -o ONVIFTargetServiceDiscovery ONVIFTargetServiceDiscovery.o Utilities.o Logger.o Socket.o -luuid -lpthread 

Where: GCC="arm-linux-gnueabi-g++"

When executed, this results in

/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: canot find -luuid"

And, in fact, the library does not exist in /usr/lib/gcc-cross/arm-linux-gnueabi/4.7. I have been unsuccessful at locating packages containing libuuid for cross-compiling on Ubuntu targeting the ARM processor that will install.

I am relatively new to Linux development.

1 Answer 1


You can install the development package for the armhf version of libuuid, like so:

$: sudo dpkg --add-architecture armhf
$: sudo apt-get update
$: sudo apt-get install libuuid-dev:armhf

This should result in the necessary binaries for the armhf build of libuuid being installed to the appropriate location for cross-compiling.

  • I got subsequent errors on the apt-get update due to dependencies, but the suggested solution using dpkg switch solved the stated problem. Thanks. Mar 13, 2015 at 19:34
  • 1
    libuuid-dev is now uuid-dev. The solution doesn't work anymore. It now wants to uninstall all the other packages of the system (Ubuntu Xenial). What to do now?!
    – TJJ
    Feb 5, 2017 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .