在CentOS6.9 x86下编译libusb-1.0.22遇到的两个问题

OS版本:CentOS 6.9 x86,内核版本2.6.32

问题一:configure.ac:36: error: Autoconf version 2.69 or higher is required

autogen.sh执行的时候,要求使用2.69或更高版本的Autoconf,CentOS 6.9自带的Autoconf版本是2.63,也不清楚libusb为何要求2.69那么高的版本,于是就把configure.ac第36的版本定义修改为2.63,再执行autogen.sh就成功了。

问题二:undefined reference to `clock_gettime'

执行make时候报错,未定义的引用,是examples和tests目录里的Makefile有问题,打开这两个Makefile,找到LIBS宏定义,结尾处增加-lrt,再执行make就通过了。

最后再简单说下libusb的编译安装过程:

# ./autogen.sh
# make
# make install

libusb的github地址为https://github.com/libusb/libusb,官网地址为https://libusb.info/

猜你喜欢

转载自www.cnblogs.com/cner/p/9187105.html
今日推荐