Question

I have a below jhbuild.modules xml file, actually I want to cross compile it.

I know that adding --host param to autogenargs will do work, but I wanted to do that without touching the below jhbuild.modules file.

<?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>

I tried setting CC,CXX environmental variables, but I'm getting below errors like,

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'.
Was it helpful?

Solution

Add autogenargs = '--host' to your ~/.jhbuildrc configuration file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top