Discussion:
Bug#1061247: libgsf FTCBFS: hard codes the build architecture pkg-config
Add Reply
Helmut Grohne
2024-01-21 14:30:02 UTC
Reply
Permalink
Package: libgsf
Version: 1.14.51-2
User: debian-***@lists.debian.org
Usertags: ftcbfs

libgsf fails to cross build from source, because the upstream
configure.ac detects pkg-config using AC_PATH_PROG and thus detects the
build architecture pkg-config which fails to find tons of packages. This
is easily fixed by using the recommended upstream macro
PKG_PROG_PKG_CONFIG instead. I'm attaching a patch for this.

Then libgsf goes a lot further, but fails building its documentation due
to the use of gtk-doc. We do not currently have any solution for gtk-doc
and hence libgsf will not be cross buildable. Would you consider
splitting the documentation from the -dev package into a dedicated -doc
package? Usually, such a -doc package would be Architecture: all and
therefore not participate in cross building. The arch-only build would
no longer build documentation and that would probably make libgsf cross
buildable. It would also fix #814502.

Either way, this bug is only about the pkg-config aspect, so please
close it once fixing that.

Helmut
Simon McVittie
2025-01-29 11:40:01 UTC
Reply
Permalink
Post by Helmut Grohne
libgsf fails to cross build from source, because the upstream
configure.ac detects pkg-config using AC_PATH_PROG and thus detects the
build architecture pkg-config which fails to find tons of packages. This
is easily fixed by using the recommended upstream macro
PKG_PROG_PKG_CONFIG instead. I'm attaching a patch for this.
I included this patch in
<https://salsa.debian.org/debian/libgsf/-/merge_requests/5>.
Post by Helmut Grohne
Then libgsf goes a lot further, but fails building its documentation due
to the use of gtk-doc. We do not currently have any solution for gtk-doc
and hence libgsf will not be cross buildable.
One way to mitigate this is to avoid running gtk-doc under the nodoc
build option, and then do the cross-build with that option.

With the changes proposed in
<https://salsa.debian.org/debian/libgsf/-/merge_requests/5>, gtk-doc is
not run when the nodoc build option is active, and I've confirmed that
in combination with the other changes in the MR, that's enough to be able
to cross-compile libgsf for a foreign architecture (I tried s390x).
Post by Helmut Grohne
Would you consider
splitting the documentation from the -dev package into a dedicated -doc
package?
That would be the ideal solution to cross-building this package, but is
not included in my MR. It would require a trip through NEW.

smcv

Loading...