Hi Samuel,

On Tue, Sep 26, 2017 at 01:09:19AM -0300, Samuel Henrique wrote:
> Thanks for the bugreport and patch, but did you realized that there's a
> FTBFS on linux when this patch is applied?

Thanks for considering. I didn't see that coming, but a closer at
configure.in explains that behaviour.

> It results in configure being called with the "--with-diskstats" flag twice.

The flag is only passed once in fact. The disk input method is appended
to input methods and then it figures that since it isn't cross compiling
it checks for /proc/diskstats and adds it again.

I think this is a defect in the upstream build system: It has the
variable DISK_INPUT_FOUND to figure whether it already checked. Yet, it
doesn't check the variable and goes ahead anyway adding the input method
twice.

> I'll look further into these changes on the next days (i'll have to check
> if there's a doubled flag on kfreebsd with this patch too).

It very likely makes kfreebsd-any fail in the same way.

I see two (maybe three) ways forward:

 a)  Fix configure.in. It should be checking DISK_INPUT_FOUND and others
     to avoid adding input methods twice.

 a2) In theory it should also stop special casing $cross_compiling.
     AC_CHECK_FILE(/proc/diskstats) is perfectly fine during cross
     compilation. The check will fail, but the cross builder will
     supply the right cache variable to make it succeed.

 b)  Acknowledge that configure.in is weird and only pass these flags
     for cross compilation. Make them conditional to
     "ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))".

Do you have a preference?

Helmut

Reply via email to