./configure --prefix=$PREFIX --build=i686-linux --host=mipsel-linux
第一次执行提示:
checking for format to printf and scanf a guint64... configure: error: cannot run test program while cross compiling
交叉编译时无法运行测试程序,编辑cachefile,把要检测的变量填进去:
echo libIDL_cv_long_long_format=ll > mips.cache
重新config:
./configure --prefix=$PREFIX --build=i686-linux --host=mipsel-linux --cache-file=mips.cache
生成makefile后,执行make,提示:
mips-linux-gnu-gcc: 0.8.5": No such file or directory
mips-linux-gnu-gcc: unrecognized option '-E"'
<command-line>: warning: missing terminating " character
<command-line>: warning: missing terminating " character
打开Makefile看到:
DEFS = -DPACKAGE_NAME=\"libIDL\" -DPACKAGE_TARNAME=\"libIDL\" -DPACKAGE_VERSION=\"0.8.5\" -DPACKAGE_STRING=\"libIDL\ 0.8.5\" -DPACKA
GE_BUGREPORT=\"http://bugzilla.gnome.org/enter_bug.cgi\?product=libIDL\" -DLIBIDL_VERSION=\"0.8.5\" -DHAVE_CPP_PIPE_STDIN=1 -DCPP_NO
STDINC=\"-I-\" -DCPP_PROGRAM=\"mipsel-linux-gcc\ -E\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -D
HAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC
_HEADERS=1 -DHAVE_STDDEF_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DHAVE_POPEN=1 -DHAVE_SYMLINK=1 -DHAVE_ACCESS=1 -DSIZEOF_LONG_LONG=8
这个里面的PACKAGE_STRING,以及CPP_PROGRAM=\"mipsel-linux-gcc\ -E\"两个宏的定义里面包含空格,使用x86下的gcc,这两个宏可以正常定义,但是mipsel-linux-gcc处理不了空格转义,直接导致传给 mipsel-linux-gcc的参数乱套。删除这两个宏在Makefile中的定义,单独放到config.h中,修改需要宏定义的c文件,#include <config.h>,编译通过。
分享到:
相关推荐
官方离线安装包,亲测可用
rpm安装包
官方离线安装包,亲测可用
官方离线安装包,亲测可用
官方离线安装包,亲测可用
离线安装包,亲测可用
官方离线安装包,亲测可用
官方离线安装包,亲测可用
官方离线安装包,亲测可用
官方离线安装包,亲测可用
官方离线安装包,亲测可用
libIDL-0.8.13-2.1.el6.x86_64.rpm ORBit2-2.14.17-3.1.el6.x86_64.rpm GConf2-2.28.0-6.el6.x86_64.rpm libbonobo-2.24.2-4.el6.x86_64.rpm gtk2-engines-2.18.4-5.el6.x86_64.rpm shared-mime-info-0.70-4.el6.x86...
Delphi 7.1 Update Release Notes=======================================================This file contains important supplemental and late-breakinginformation that may not appear in the main ...