Compilation error: Udev support requested but libudev not installed

Source: Internet
Author: User

1. This problem often occurs when cross-compiling libusb or needing to rely on Udev's library.

2. The solution is as follows:

1> Download Udev source code, or Eudev source code

Udev:http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html

Eudev:https://github.com/gentoo/eudev

2> the cross-compilation Eudev under Linux, note the path:

For example, I am like this:

./autogen.sh

CC=/OPT/EMBEDDED/TOOLS/LINARO-TOOLCHAINS/ARM-CORTEXA8-LINUX-GNUEABIHF/BIN/ARM-CORTEXA8-LINUX-GNUEABIHF-GCC./ Configure--prefix=/opt/embedded/libudev--HOST=ARM-CORTEXA8-LINUX-GNUEABIHF

Make

Make install

3> cross-compiling the target library such as Libux, note the reference path:

cc=/opt/embedded/tools/linaro-toolchains/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf-gcc Cflags=-i/opt/embedded/libudev/include ldflags=-l/opt/embedded/libudev/lib./configure--prefix=/opt/embedded/ Libux--HOST=ARM-CORTEXA8-LINUX-GNUEABIHF

Make

Make install


Note: The red part is the key

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.