分类: 嵌入式
2010-10-18 10:20:30
作者:帅得不敢出门 C++哈哈堂 31843264 转载请保留此信息
LIB_PARENT_PATH为e2fsprogs交叉编译后的安装目录 ARCH=arm-linux PREFIX则是自行指定的xapian的安装目录
首先得先交叉编译e2fsprogs,这步省略
tar -xvf xapian-core-1.2.3.tar.gz
cd xapian-core-1.2.3/
PKG_CONFIG_PATH=$LIB_PARENT_PATH/lib/pkgconfig CC=$ARCH-gcc ./configure --prefix=$PREFIX --host=$ARCH
checking for uuid/uuid.h... no
checking for uuid.h... no
configure: error: Neither uuid/uuid.h nor uuid.h found - required for
brass, chert and flint (you may need to install the uuid-dev,
libuuid-devel or e2fsprogs-devel package)
找不到头,是因为未指定搜索路径
PKG_CONFIG_PATH=$LIB_PARENT_PATH/lib/pkgconfig CC=$ARCH-gcc CXXFLAGS=-I$LIB_PARENT_PATH/include LDFLAGS=-L$LIB_PARENT_PATH/lib ./configure --prefix=$PREFIX --host=$ARCH
注意上面是CXXFLAGS 而不能是CFLAGS,否则uuid.h无法找到的。
make
sudo make install