Hi Micha,

On Sat, Sep 09, 2023 at 11:10:08AM +0200, Micha Lenk wrote:
> I've also commited the suggested changes to the Debian package. This allows
> us to see how the cross build is doing in the Salsa CI builds.

Thank you.

> Unfortunately the package seems to still fail to cross build from source:
> https://salsa.debian.org/aqbanking-team/pkg-libgwenhywfar/-/jobs/4677663
> 
> Would you mind to take a more elaborate look and suggest anything that could
> help fixing the cross build?
> Or is this an issue of the Salsa CI pipeline that is okay to ignore for now?

Sure. The failure is checking for the existence of /proc/self/maps. When
you use AC_CHECK_FILE, it is to be understood as a check of the host
machine, but we're on the build machine, so the check cannot determine
the correct result. Sometimes, people use it to discover headers. That's
wrong and they should use test -e instead. In this case, the check is
totally right. A cross builder needs to pass the correct result into the
build. We don't currently have a good mechanism for doing so. In my
local builds, I export ac_cv_file__proc_self_maps=yes when building for
linux and then it works. If you want cross builds to just work, you may
consider adding the following to debian/rules:

ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
ifeq ($(DEB_HOST_ARCH_OS),linux)
export ac_cv_file__proc_self_maps=yes
endif
endif

In principle, I think such code should not be part of packages, but
that's what we do in a number of packages already. Some check results
are also part of cross-config, but that's not in a good shape nor
maintained.

Helmut

Reply via email to