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

Re: What is the status of cross pkg-configs?



Hi!

[ Jussi, you might also want to use the debian-cross mailing list in
  the future, which I've CCed now. :) ]

On Mon, 2019-08-26 at 14:21:54 +0100, Simon McVittie wrote:
> On Mon, 26 Aug 2019 at 15:50:52 +0300, Jussi Pakkanen wrote:
> > On Mon, Aug 26, 2019 at 1:06 PM Simon McVittie <smcv@debian.org> wrote:
> >·
> > > They are meant to be created by a dpkg trigger (as symlinks to
> > > /usr/share/pkg-config-crosswrapper) when you add the armhf architecture:
> > >
> > > You usually need to add the foreign architecture to dpkg for
> > > cross-compilation anyway, to get packages like libc6-dev:armhf.
> >
> > Meson has tests that do cross compilation to armhf. What is the
> > correct way to set that up in official package builds?
> 
> The infrastructure that would be necessary to do that as a build-time
> test is not available (and perhaps never will be, because it would make
> the dependency graph a lot more complicated), so you will need to skip
> them at build-time.  Official Debian buildds only have packages of their
> own architecture available.

Not necessarily. Depending on what you need to cross-compile and its
dependencies, you might already almost have everything you need. We do
have cross-compilers available now in sid. We also have the mangled
dpkg-cross'ed packages for the base toolchain (including libc), so you
should be able to cross-build code that does not have "external"
dependencies.

This of course relies on the major and gross dpkg-cross hack, which
violates the entire packaging system to provide what should have been
provided by now by multiarch, but we are still dragging on with this
half-assed deployment… :/

> If you want better test coverage, you can run
> them as an autopkgtest (as-installed test) instead: see
> <https://salsa.debian.org/ci-team/autopkgtest/blob/master/doc/README.package-tests.rst>.
> In the case of Meson, an appropriate as-installed test would be to build
> one (or all) of the test/example projects from Meson's source tree,
> but using /usr/bin/meson instead of the meson script and mesonbuild
> library from the source package.

While this is obviously not bad advice, it might not preclude running
the cross-building side of the test suite at build time too.

> > Calling add-architecture directly?
> 
> You cannot do that when building the package, because at that point you
> don't have root privileges available.

This is entirely correct, but for the pkg-config specific case, you
could simply replicate the logic by providing local tripled-qualified
symlinks to the cross-wrapper, and adding that local directory to the
PATH for the test suite.

Thanks,
Guillem


Reply to: