Your message dated Mon, 18 Sep 2017 07:46:56 +0200
with message-id <[email protected]>
and subject line Re: Bug #857675: libidn2-0 FTCBFS: runs host arch code during 
build (gentr46map, help2man)
has caused the Debian Bug report #857675,
regarding libidn2-0 FTCBFS: runs host arch code during build (gentr46map, 
help2man)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
857675: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857675
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libidn2-0
Version: 0.16-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

cross building libidn2-0 is required for bootstrapping new architectures
as curl added it to its Build-Depends a while ago. Unfortunately, cross
building libidn2-0 currently fails. The immediate reason is failure to
execute gentr46map during build. It is not installed into any package
and should thus be compiled with the build architecture compiler, but
the build system opts for the host architecture compiler. After fixing
that, help2man fails running idn2. Fixing help2man calls doesn't have a
straight forward solution. One can choose among:
1. Stop using help2man and write proper documentation.
2. Skip rebuilding manual pages during cross builds.
3. Add a idn2:native <cross> to Build-Depends and run that.
4. Build libidn2-0 twice. Once native, then cross.
In the attached patch, I opted for option 2. Please consider applying
it.

Helmut
diff --minimal -Nru libidn2-0-0.16/debian/changelog 
libidn2-0-0.16/debian/changelog
--- libidn2-0-0.16/debian/changelog     2017-01-16 09:20:46.000000000 +0100
+++ libidn2-0-0.16/debian/changelog     2017-03-13 20:27:32.000000000 +0100
@@ -1,3 +1,13 @@
+libidn2-0 (0.16-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: cross.patch (Closes: #-1)
+    + Use CC_FOR_BUILD (and thus AX_CC_FOR_BUILD from autoconf-archive) to
+      build gentr46map, which thus requires libunistring-dev:native.
+    + Skip the help2man step and use the pre-build manual page during cross.
+
+ -- Helmut Grohne <[email protected]>  Mon, 13 Mar 2017 20:27:32 +0100
+
 libidn2-0 (0.16-1) unstable; urgency=low
 
   * New upstream release.
diff --minimal -Nru libidn2-0-0.16/debian/control libidn2-0-0.16/debian/control
--- libidn2-0-0.16/debian/control       2016-12-30 08:01:16.000000000 +0100
+++ libidn2-0-0.16/debian/control       2017-03-13 20:27:32.000000000 +0100
@@ -2,7 +2,7 @@
 Section: libs
 Maintainer: Debian Libidn team <[email protected]>
 Uploaders: Simon Josefsson <[email protected]>
-Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, texinfo, texlive, 
help2man, gengetopt, libunistring-dev
+Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, texinfo, texlive, 
help2man, gengetopt, libunistring-dev, libunistring-dev:native, autoconf-archive
 Standards-Version: 3.9.8
 Priority: extra
 Homepage: https://www.gnu.org/software/libidn/#libidn2
diff --minimal -Nru libidn2-0-0.16/debian/patches/cross.patch 
libidn2-0-0.16/debian/patches/cross.patch
--- libidn2-0-0.16/debian/patches/cross.patch   1970-01-01 01:00:00.000000000 
+0100
+++ libidn2-0-0.16/debian/patches/cross.patch   2017-03-13 20:27:32.000000000 
+0100
@@ -0,0 +1,72 @@
+From: Helmut Grohne <[email protected]>
+Subject: fix cross compilation
+
+ * Use the build architecture compiler fo building gentr46map as it is not
+   installed and executed during build.
+ * Use the prebuilt manual page idn2.1 during cross building, because running
+   help2man doesn't work.
+
+Index: libidn2-0-0.16/Makefile.am
+===================================================================
+--- libidn2-0-0.16.orig/Makefile.am
++++ libidn2-0-0.16/Makefile.am
+@@ -63,11 +63,11 @@
+       cat $(IDNA_TABLE) | $(srcdir)/gen-tables-from-iana.pl > [email protected]
+       mv [email protected] $@
+ 
+-noinst_PROGRAMS = gentr46map
+-gentr46map_LDADD = $(LTLIBUNISTRING)
++gentr46map$(BUILD_EXEEXT): gentr46map.c
++      $(CC_FOR_BUILD) $(AM_CPPFLAGS) $(CFLAGS_FOR_BUILD) -lunistring $< -o $@
+ 
+-tr46map_data.c: gentr46map.c gentr46map$(EXEEXT) $(TR46MAP) $(NFCQC)
+-      $(builddir)/gentr46map$(EXEEXT) > [email protected]
++tr46map_data.c: gentr46map.c gentr46map$(BUILD_EXEEXT) $(TR46MAP) $(NFCQC)
++      $(builddir)/gentr46map$(BUILD_EXEEXT) > [email protected]
+       mv [email protected] $@
+ 
+ $(IDNA_TABLE):
+Index: libidn2-0-0.16/configure.ac
+===================================================================
+--- libidn2-0-0.16.orig/configure.ac
++++ libidn2-0-0.16/configure.ac
+@@ -31,6 +31,8 @@
+ AC_CANONICAL_HOST
+ 
+ AC_PROG_CC
++AM_CONDITIONAL(cross_compiling,[test "$cross_compiling" = yes])
++AX_PROG_CC_FOR_BUILD
+ gl_EARLY
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+ LT_INIT([win32-dll])
+Index: libidn2-0-0.16/gentr46map.c
+===================================================================
+--- libidn2-0-0.16.orig/gentr46map.c
++++ libidn2-0-0.16/gentr46map.c
+@@ -26,8 +26,6 @@
+    not, see <http://www.gnu.org/licenses/>.
+ */
+ 
+-#include <config.h>
+-
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+Index: libidn2-0-0.16/doc/Makefile.am
+===================================================================
+--- libidn2-0-0.16.orig/doc/Makefile.am
++++ libidn2-0-0.16/doc/Makefile.am
+@@ -34,11 +34,13 @@
+ dist_man_MANS = idn2.1 $(gdoc_MANS)
+ CLEANFILES = $(dist_man_MANS) lookup.c register.c stamp-vti version.texi 
$(srcdir)/libidn2.info
+ 
++if !cross_compiling
+ idn2.1: $(top_srcdir)/src/idn2.c $(top_srcdir)/src/idn2.ggo 
$(top_srcdir)/configure.ac
+       $(HELP2MAN) \
+               --name="Libidn2 Internationalized Domain Names (IDNA2008/TR46) 
conversion" \
+               --output=$@ \
+               $(top_builddir)/src/idn2$(EXEEXT)
++endif
+ 
+ # GDOC
+ 
diff --minimal -Nru libidn2-0-0.16/debian/patches/series 
libidn2-0-0.16/debian/patches/series
--- libidn2-0-0.16/debian/patches/series        1970-01-01 01:00:00.000000000 
+0100
+++ libidn2-0-0.16/debian/patches/series        2017-03-13 20:24:19.000000000 
+0100
@@ -0,0 +1 @@
+cross.patch

--- End Message ---
--- Begin Message ---
Version: 2.0.2-1

On Mon, Sep 18, 2017 at 05:34:07AM +0000, Ond??ej Surý wrote:
> as unstable now has libidn2 2.0.x, could you please recheck whether this
> bug is still relevant?

This one is applied, but #872567 is very annoying now.

Helmut

--- End Message ---
_______________________________________________
Help-libidn mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-libidn

Reply via email to