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

Re: Need advice for cross building gammu

Hash: SHA512

On Thu, 2021-10-21 at 07:18 +0200, Helmut Grohne wrote:
> Those ideas are good in principle. Often times a missing dependency
> indicates work elsewhere, yes. And sometimes, annotating dependencies
> with :any can help though note that the relevant packages need to be
> marked "Multi-Arch: alllowed" for :any to work. An alternative to
> annotating :any is the :native annotation which is not permitted in
> runtime Depends and only allowed in Build-Depends. It's sort of a
> measure of last resort though. And then you mentioned
> Build-Depends-Indep. I think this last idea is the way to go for this
> problem as you already have a gammu-doc package. A proper indep split is
> the most common solution to sphinx breaking cross compilation. Are you
> sure that the build fails "in the same way"? I tried doing it myself and
> it just worked for me. I think there are two aspects that are not
> entirely obvious:
>  * The sphinx dh addon must be conditionalized and the easiest way of
>    doing so is turning it into a dependency on dh-sequence-sphinxdoc at
>    which point it can be moved to B-D-I.
>  * The manual build needs to be conditionalized as well. One option for
>    doing so is "ifneq (,$(filter gammu-doc,$(shell dh_listpackages)))".
> I'm attaching a patch with what I have.

Thanks for the suggestions! I had already partially done part of the suggested
changes, now I have merged the rest. The result is the same (as before touching
that, also after touching it, and now with your patch):


Maybe I am missing something obvious, all my changes are in the repo above.

> > 2) When some day the above are resolved, the build will fail on the test
> > step
> > unless cmake is clever and skips it or dh detects nocheck and skips the
> > step as
> > a whole:
> Cross builds should automatically pass nocheck in DEB_BUILD_OPTIONS by
> default.  dh_auto_test should automatically honour this option. I don't
> quite see how this failed for you. How did you perform the build? Both
> sbuild and pbuilder automatically add nocheck when you ask for a cross
> build.
> > So my question - is it proper to make this conditional, e.g.:
> > 
> > override_dh_auto_test:
> >   dh_auto_test --no-parallel
> > else
> >   true
> > endif
> > 
> > or there is a better way to handle that?
> Please don't do this. If you perform a cross build from e.g. amd64 to
> i386, you can run tests and you can build without nocheck. In that case,
> tests should be run. Whether tests should be run is a question the
> builder needs to specify and the way to do that is adding nocheck to

Got it. Just my speculation, because I haven't seen it reach that step.

With best regards,



Reply to: