交叉编译libxml2
wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz./configure CC=aarch64-linux-gnu-gcc --host=arm-linux --prefix=/home/book/tool/libxml2-2.7.2/build_out --with-python=no --without-zlibmakemake instal
·
wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz
./configure CC=aarch64-linux-gnu-gcc --host=arm-linux --prefix=/home/book/tool/libxml2-2.7.2/build_out --with-python=no --without-zlib
make
make install
问题:
–without-zlib选项很重要,如果不加此选项,make的时候会提示如下错误:
./.libs/libxml2.so: undefined reference to `gzopen'
./.libs/libxml2.so: undefined reference to `gzclose'
./.libs/libxml2.so: undefined reference to `deflate'
./.libs/libxml2.so: undefined reference to `gzrewind'
./.libs/libxml2.so: undefined reference to `gzwrite'
./.libs/libxml2.so: undefined reference to `crc32'
./.libs/libxml2.so: undefined reference to `deflateEnd'
./.libs/libxml2.so: undefined reference to `gzdopen'
./.libs/libxml2.so: undefined reference to `deflateInit2_'
./.libs/libxml2.so: undefined reference to `gzread'
collect2: ld returned 1 exit status

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)