Source: groff
Version: 1.23.0-10
Tags: ftbfs patch upstream
User: [email protected]
Usertags: rebootstrap

There is a nother reason for groff to fail to build from source. There
is a configure check that determines whether it is using glibc >= 2.1
but it really also accepts uclibc. When no such libc is detected, it
installs a charset.alias file. This seems to be related to gnulib,
because I have also seen this for guile and libunistring earlier. In any
case, the generated charset.alias for musl (and many other C libraries)
ends up being empty (apart from comments) and provides no real gain.
What ends up failing the build is dh_missing as that file exists without
being installed. Since gnulib tries to share this file between packages,
installing it would be bad.

I'm proposing a relatively simple 90% solution. If the file is empty
(apart from comments), it evidently is not needed and does not have to
be installed. We may then skip installing it. This actually is the
common case.

The other angle here is arguing that any architecture where gnulib deems
it necessary is responsible for providing the file in essential somehow.
Then, we may just add charset.alias to debian/not-installed.

What do you think?

Helmut
--- a/src/libs/libgroff/libgroff.am
+++ b/src/libs/libgroff/libgroff.am
@@ -150,7 +150,7 @@
 	    $(DESTDIR)$(libdir)/charset.alias; \
 	  rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
 	else \
-	  if test $(GLIBC21) = no; then \
+	  if test $(GLIBC21) = no && grep -q '^[^#]' charset.alias; then \
 	    sed -f ref-add.sed charset.alias \
 	      > $(DESTDIR)$(libdir)/t-charset.alias; \
 	    $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias \

Reply via email to