I'm trying to cross-compile glib for gstreamer but encountered the following error in Ubuntu 16.04 terminal:

checking for LIBMOUNT... no
checking libmount/libmount.h usability... no
checking libmount/libmount.h presence... no
checking for libmount/libmount.h... no
configure: error: *** Could not find libmount

Greatly appreciate any advice from the community.


I would've preferred to add this as a comment, but unless you actually need libmount for something it's much easier to simply disable it by passing --enable-libmount=no to configure.


you need the library with headers ... package names ending in -dev contain headers

apt-get install libmount-dev

this will give you the missing headers ... to verify issue

dpkg -L libmount-dev

#  ... output


You need to cross-compile libmount and make it available to the cross-compiler (and presumably cross-pkg-config).

  • so basically i'd need to cross-compile every dependencies to fit my embedded target architecture right? that said i'm not able to find libmount package to cross-compile. do you've any recommended link to download the libmount source?
    – rainfrost
    Dec 1 '16 at 1:49
  • 2
    Yes, you need to cross-compile every dependency (or use a toolchain which includes them, if such a thing exists for your target). libmount is part of util-linux. Dec 1 '16 at 5:09
  • just another question, if I install e.g. apt-get install libmount, it only installs the sources, when i'm cross-compiling, does the cross-compiler knows to grab the libmount source and cross-compile for my target?
    – rainfrost
    Dec 1 '16 at 6:33
  • @emddev sorry, I didn't see a notification for your further question. apt-get install doesn't install sources, and the cross-compiler doesn't know to grab the source and cross-compile automatically; you need to explicitly cross-compile all the required libraries. If your target matches an Ubuntu architecture, you could use multi-arch instead. (apt-get source will download the source code, but it won't install it in a pre-defined location, it just extracts it in the current directory.) Feb 25 '17 at 11:02
  • @StephenKitt thanks for the mentioning of util-linux, I have searched for hours before I saw your comment
    – Felix Xu
    Apr 26 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.