【问题标题】:How to cross compile the modules using jhbuild?如何使用 jhbuild 交叉编译模块?
【发布时间】:2013-10-14 13:58:30
【问题描述】:

我有一个下面的jhbuild.modules xml文件,其实我想交叉编译它。

我知道将 --host 参数添加到 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'.

【问题讨论】:

    标签: makefile cross-compiling autotools jhbuild


    【解决方案1】:

    autogenargs = '--host' 添加到您的~/.jhbuildrc 配置文件中。

    【讨论】:

    • 有些库如 fontconfig 也需要 --with-arch= 参数,但其他库不需要。 module_autogenargs['fontconfig']="--with-cpu=ppc" 可以吗?
    • 我想你可能不得不说module_autogenargs['fontconfig']='--host --with-cpu=ppc'
    • 感谢您的回答!
    猜你喜欢
    • 2017-12-15
    • 2016-12-26
    • 2011-03-28
    • 1970-01-01
    • 2014-10-23
    • 2014-01-25
    • 2015-09-27
    • 2013-07-19
    • 2014-05-01
    相关资源
    最近更新 更多