编译Android的bzip2?

问题描述 投票:0回答:1

我想从ubuntu 18.04交叉编译Kenlm for Android。要做到这一点,我需要先编译它的所有依赖程序。我成功地编译了boost for android,但我没有找到如何用bzip2来编译。

当我用cmake交叉编译kenlm时,用这个toolchain.cmake

set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 26)
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)
set(CMAKE_ANDROID_NDK "/home/marie/Android/Sdk/ndk/16.1.4479499")
set(ZLIB_LIBRARIES "/home/marie/Android/Sdk/ndk/16.1.4479499/platforms/android-26/arch-arm64/usr/lib")
set(BOOST_LIBRARYDIR "/home/marie/Documents/Boost-for-Android/boost_1_73_0/stage/lib")
set(BOOST_INCLUDEDIR "/home/marie/Documents/Boost-for-Android/boost_1_73_0")
set(LIBLZMA_LIBRARY "/home/marie/Downloads/liblzma.a")
set(LIBLZMA_HAS_AUTO_DECODER TRUE)
set(LIBLZMA_HAS_EASY_ENCODER TRUE)
set(LIBLZMA_HAS_LZMA_PRESET TRUE)

我可以看到这一点。

Found BZip2: /usr/local/lib/libbz2.a (found version "1.0.6") 
Looking for BZ2_bzCompressInit
Looking for BZ2_bzCompressInit - not found

我试着从github编译。https:/github.comenthoughtbzip2-1.0.6, 但我不知道如何为另一个目标编译一个Makefile。这个repo的readme说

HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc.

It's difficult for me to support compilation on all these platforms.
My approach is to collect binaries for these platforms, and put them
on the master web site (http://www.bzip.org).

Bzip.org链接到sourceforge,但只有一个文件可以下载,是tar.gz。

谢谢你的时间。

android c++ cross-compiling bzip2 kenlm
1个回答
0
投票

也许吧 这个 可以帮助(以编译bzip2为例)。

© www.soinside.com 2019 - 2024. All rights reserved.