直接上配置:
./configure --host=arm-cortex_a9-linux-gnueabi --prefix=/linux/tools/python-2.7.3/install PKG_CONFIG_PATH=/usr/local/bluez5/lib/pkgconfig CC="arm-cortex_a9-linux-gnueabi-gcc -I/usr/local/bluez5/include/dbus-1.0 -I/usr/local/bluez5/lib/dbus-1.0/include -L/usr/local/bluez5/include -L/usr/local/bluez5/lib -I/usr/local/bluez5/include/glib-2.0 -I/usr/local/bluez5/lib/glib-2.0/include"
路径根据自己的情况读者自行修改。
以为万事大吉,可是就是编译出错,如下所示:
/bin/sed: can't read /opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18/arm-cortex_a9-linux-gnueabi/sysroot/usr/lib/libffi.la: No such file or directory
libtool: error: '/opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18/arm-cortex_a9-linux-gnueabi/sysroot/usr/lib/libffi.la' is not a valid libtool archive
make[3]: *** [libdbus-glib-1.la] 错误 1
研究了半天以为是配置有问题,一直在配置上找,最后发现是libdbus-glib-1.la和libdbus-gtool.la这两个文件种的路径有问题,不知道为什么配置的时候没有更新。主要是下面这个路径:
/opt/crosstools/arm-cortex_a9-eabi-4.7-eglibc-2.18/arm-cortex_a9-linux-gnueabi/sysroot/usr/lib/libffi.la
修改为编译好的正常路径即可,或者直接删除。