我有一个 jhbuild.modules xml文件,实际上我想交叉编译它。
我知道将 - host param添加到autogenargs会有效,但我想在不触及下面的 jhbuild.modules 文件的情况下这样做。
<?xml version="1.0"?>
<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
<moduleset>
<metamodule id="test">
<dependencies>
<dep package="cairo"/>
</dependencies>
</metamodule>
<repository type="tarball" name="cairographics.org"
href="http://cairographics.org"/>
<repository type="tarball" name="freedesktop.org"
href="http://www.freedesktop.org"/>
<autotools id="cairo" autogen-sh="configure">
<dependencies>
<dep package="fontconfig"/>
<dep package="pixman"/>
</dependencies>
<branch module="releases/cairo-1.12.8.tar.xz" version="1.12.8"
repo="cairographics.org"
hash="sha256:8fbb6fc66117ab4100bad830cb4479497e53c6f3facb98bf05c8d298554ebdd9"/>
</autotools>
<autotools id="fontconfig" autogen-sh="configure">
<dependencies>
<dep package="freetype6"/>
</dependencies>
<branch module="software/fontconfig/release/fontconfig-2.8.0.tar.gz" version="2.8.0"
repo="freedesktop.org"
hash="sha256:fa2a1c6eea654d9fce7a4b1220f10c99cdec848dccaf1625c01f076b31382335"/>
</autotools>
<autotools id="pixman" autogen-sh="configure"
autogenargs="--enable-gtk=no">
<branch module="snapshots/pixman-0.29.2.tar.gz" version="0.29.2"
repo="cairographics.org"
hash="sha256:4c4e92143a4557a4617b80caf0a58ccb012d8293741e75389037cd5133b335db"/>
</autotools>
</moduleset>
我尝试设置 CC,CXX环境变量,但我收到的错误如下,
checking whether we are cross compiling... configure: error: in `/builds/unix':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
答案 0 :(得分:1)
将autogenargs = '--host'
添加到~/.jhbuildrc
配置文件中。