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

Re: Need advice for cross building gammu



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Thu, 2021-10-21 at 07:18 +0200, Helmut Grohne wrote:
..cut..
> 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):

https://salsa.debian.org/debian/gammu/-/jobs/2104555

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:
> > ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
> >   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
> DEB_BUILD_OPTIONS.

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

With best regards,
b.

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEumC8IPN+WURNbSUAE2VyCRPS8i0FAmFxtxAACgkQE2VyCRPS
8i28ag/+MbomCd8CTw0dtUOf4N06Hxcs4OsYpeOMe8vZ0LfoopfuN8kUjuEMrLsM
lN+4ZcwYUkx5PTMY2/9r9H39cUXLtJywW/6R1aLv1F80xXwKsxklYuEAyeiD1jq/
iJzrBvf6qCaY/NWDZo0Bhaz8AX2Y61Xg8tStEjdVCSntEdLqcFiVLQnLZySPgF/f
2LcUgMKPCFZk+PDeUyaXoce0Lp+nCV9BrPVfVbOtOUmMMZlkdlbltO/aJVPvCsYe
J6yWhk2QlrttNu39PRqAhk2ZBKOz7kAkFArrk1VnusxCZTWM7txFQotY8pmZx13c
nQSgRB7mk6A/pIm6nlmin5GuQfqI+uPUIyMVsdT7X48KxyhcmmtReC57cFcxgUsw
vFMxy7XxSmy68zS2L/tMMMrcl4fM1DdQzwcR7vtqTyudxoAlDAlc1JV87SUJh617
arwfqz18SV/kL/p4Co/IDt9/ToQfc6fDBG3EfCfLxXLoPIhkYt1eDNPDcaAG8cIZ
YWND13sQvLHDXIJUqYfgeaKSHJ8qgcyIEFoI/bSTMEGJdxZOxFO5dYmq9VYKNa8K
60YUu/xfhXKdaNWv4cq6dcZMB1OHOF/0fs712D8+rHI0Ssh/rCcObY3OWrud6NNH
LOt2N+/MKH0M3i+eKELm7n3rDtkUD9treM7K2GpuajW5I/rDRnc=
=aQcx
-----END PGP SIGNATURE-----


Reply to: