[debhelper-devel] Bug#794396: CMake cross compilation support

YunQiang Su wzssyqa at gmail.com
Tue Aug 18 12:13:32 UTC 2015


On Sun, 2 Aug 2015 17:27:39 +0200 Helmut Grohne <helmut at subdivi.de> wrote:
> Package: debhelper
> Version: 9.20150628
> Severity: wishlist
> Tags: patch
> User: helmutg at debian.org
> Usertags: rebootstrap
>
> I tried to cross build src:libical. It fails, because cmake selects "cc"
> as its compiler. I saw very similar failures for src:attica,
> src:automoc, src:charls, src:clucene-core, src:cutecom, src:ebook-tools,
> src:game-music-emu, src:garmindev, src:gflags, src:grantlee,
> src:graphite2, src:libbluedevil, src:libgooglepinyin, src:libmsn,
> src:librabbitmq, src:libsoxr, src:lucene++, src:mppenc,
> src:mysql-connector-c++, src:nmapsi4, src:pkg-kde-tools, src:prison,
> src:q4wine, src:qimageblitz, src:qjson, src:qzion, src:read-edid,
> src:rtl-sdr, src:smokegen, src:taglib, src:taglib-extras, src:thinkfan,
> src:tinyxml2, src:v42lucp, src:wbxml2, src:wildmidi, src:x265, src:yagf,
> src:yaml-cpp, and src:yaml-cpp0.3. So instead of fixing all of these
> packages (and more), I'd like to fix this in debhelper.
>
> I took src:libical as my example and developed a patch that makes it
> cross build. The patch is attached and it basically adds lots of flags
> to CMake. The flags one should set are explained at
> http://www.cmake.org/Wiki/CMake_Cross_Compiling. The good thing is that
> this patch actually makes src:libical build.
>
> So I worked from this patch and tried to implement the same approach
> into debhelper itself. The result is the other attached patch. Like the
> autoconf.pm counterpart, it is only active when the build architecture
> and the host architecture differ, so I do note expect any regressions
> for native compilation. Yet, cross compilation never worked with CMake,
> so I think it is safe to change the behaviour of the build system.
>

Ubuntu add a patch for cmake to detect host-gcc if no complier
splificated  by CC.
We may should add patch for both debhelper and cmake.


> What do you think about the approach?
>
> Helmut



More information about the debhelper-devel mailing list