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

Re: [Request for review] smalt



Hi Nilesh,

On Fri, Mar 12, 2021 at 08:11:54PM +0530, Nilesh Patra wrote:
> I was trying to make smalt cross-buildable. First off, it tries to
> install test/sequenceReverseComplement_test which is generated only when
> tests are run. This breaks nocheck profile so I went ahead and filed a
> bug #985071 with severity:important

Thanks. Please tag such bugs with the ftbfs tag.

> Now, the python3 B-D is used only for tests, so I simply annotated it
> with <!nocheck> -- otherwise this causes cross-satisfiability issues. Next, it was using build compiler for compilation, so
> I forced the build system in d/rules to not do that.

I'm not entirely sure whether you can keep the <!nocheck> after fixing
#985071. It might depend on the fix.

Forcing the compiler like that is usually a bad idea unless the version
of autotools is very old and regenerating the configure script is
infeasible (which usually also is an rc bug due to missing sources). The
way to tell autoconf that we are cross building is passing the options
--build=${DEB_BUILD_GNU_TYPE} and --host=${DEB_HOST_GNU_TYPE}.
Sometimes, we avoid dh_auto_configure, because configure does not grok
--runstatedir. Passing CC should be a method of last resort.

> It cross builds in my chroot at the moment, but I'm not sure if it is optimal. Reason being
> "./configure" is still hardcoded in d/rules. Since this uses a very
> hacky way to pass some options, I'm not sure of a way to replace it by
> dh_auto_configure.

The environment and option passing can be easily wrapped in
dh_auto_configure. What cannot be wrapped that easily is overriding the
shell used to execute it. When using dh_auto_configure, changing the
shell likely involves patching the configure script.

So I recommend deferring this issue and waiting for a fix of #985071
first. Then fixing autoreconf for smalt likely would make it "just
work" - not just for Debian.

Sometimes fixing a cross build failure involves a little patience. For
src:libvirt, I've sent no less than nine distinct bugs and a tenth one
will be necessary. Fortunately, there is lots of cross build issues to
choose from.

Helmut


Reply to: