[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

thoughts on using multi-arch based cross-building

I've been attempting to use multi-arch for cross-building packages for raspbian (a debian derivative I am working on for armv6 hardfloat) and run into a few things which I thought i'd share and/or ask about.

Build-depends installation:
apt-get build-dep is fine if you are building an unmodified package from a repo but it's of no use if you have modified the build-dependencies to make them satisfiable.

dpkg-checkbuilddeps doesn't tell me what architecture the packages need to be for and i'm not sure it can (since to do so it would need to know whether packages that are not installed are multi-arch foreign or not).

Does a tool exist that can be told "install the build-depends needed to build the debianised source tree in directory x for architecture y"? if not IMO such a tool (or a new option in an existing tool) needs to be created.

A soloution needs to be found for this, so-far I have worked arround by hacking the package to be multi-arch foreign and then manually creating the symlink to the crosswrapper but there has to be a better soloution.

Packages that need a specific gcc version:
Sometimes packages need to be built using a non-default gcc version. We would rather they didn't but i'm sure there will always be such cases.

Conventionally in such cases I've added a build-depends on gcc-<version> version and then set CC to gcc-<version> but this obviously isn't suitable for cross-building.

Setting the CC environment variable is easy to fix (set it to <triplet>-gcc-<version> which afaict is fine for both native and cross building) but I can't think of a good and simple soloution to the build-dependency problem since the package name for the cross-compiler depends on the architecture.

Arch all development dependency packages:
In debian there are some development dependency packages, typically packages that depend on the latest version of a library. Since these packages don't contain anything that is actually architecture specific they are usually arch all. One example is tcl-dev.

The problem is that dpkg/apt always treat arch all packages the same as packages for the native architecture making these arch all packages useless for cross-building.

I see two possible soloutions to this
1: make those dependency packages arch any. This will take up a bit of archive space but since the packages in question are empty anyway it shouldn't be too bad.
2: introduce a concept of "effective architecture(s)" for arch all packages.

Reply to: