8

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.

3 Answers 3

7

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.

2

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

/.
/usr
/usr/include
/usr/include/libmount
/usr/include/libmount/libmount.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libmount.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/mount.pc
/usr/share
/usr/share/doc
/usr/share/doc/libmount-dev
/usr/share/doc/libmount-dev/copyright
/usr/lib/x86_64-linux-gnu/libmount.so
/usr/share/doc/libmount-dev/changelog.Debian.gz
0

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

5
  • 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, 2016 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, 2016 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, 2016 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, 2017 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, 2021 at 13:47

You must log in to answer this question.

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