交叉编译ghostscript for android,我应该使用什么主机?

 2023-01-19    378  

问题描述

嗨,我正在使用 构建Ghostscript-9.19的教程,能够在我的Android应用程序中使用将EPS文档转换为PDF.配置时它会失败.这是日志

checking whether to enable maintainer-specific portions of Makefiles...
no
checking for gcc... arm-linux-androideabi-gcc -- 
sysroot=/<path>/android-ndk-   
r11c/platforms/android-17/arch-arm/
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in    
`/<path>/ghostscript-9.19/tiff-config':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
configure: error: libtiff configure script failed

这是我正在运行的构建文件

交叉编译ghostscript for android,我应该使用什么主机?

#!/bin/sh
# Compiles ghostscript for Android
# Make sure you have NDK_ROOT defined in .bashrc or .bash_profile

INSTALL_DIR="`pwd`/app/jni/gs"
SRC_DIR="`pwd`/../ghostscript-9.19"

cd $SRC_DIR

export
PATH="/<path>/android-ndk-r11c/toolchains/arm-        
linux-androideabi-4.9/prebuilt/darwin-x86_64/bin:$PATH"
export SYS_ROOT="/<path>/Android/android-ndk-
r11c/platforms/android-17/arch-arm/"
export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
export LD="arm-linux-androideabi-ld"
export AR="arm-linux-androideabi-ar"
export RANLIB="arm-linux-androideabi-ranlib"
export STRIP="arm-linux-androideabi-strip"

mkdir -p $INSTALL_DIR
./configure --host=arm-linux-androideabi --build=x86_64-apple-darwin
--prefix=$INSTALL_DIR LIBS="-lc -lgcc"

make PREFIX=$INSTALL_DIR
make install DESTDIR=$INSTALL_DIR

exit 0

我正在使用-host = Arm-linux-androideabi.我应该使用什么主机?我需要更改Ghostscript项目以成功地进行编译?
任何帮助将受到高度赞赏.

推荐答案

交叉编译的幽灵记录非常参与,部分是因为Ghostscript构建依赖于构建和运行临时工具(Genarch,Genconf,Mkromfs和Echogs),显然必须与本机编译器一起构建,而不是十字架.编译器.

我认为您看到的问题是因为对Libtiff配置的调用不会传递所需的选项.

您可能会更好地抓取抓取,并从此提交中调整两个文件(一个makefile和a标题):

并对其进行调整以符合您的要求.

有一个基本指南,该指南在此页面的底部有什么要做的交叉编译:
GhostScript FAQ

我有一个”项目”来改善对交叉编译的支持,但目前正在缓慢.

以上所述是小编给大家介绍的交叉编译ghostscript for android,我应该使用什么主机?,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对77isp云服务器技术网的支持!

原文链接:https://77isp.com/post/25795.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。