Bug#1066396: lftp: FTBFS: ./config.h:2540:11: fatal error: trio.h: No such file or directory

2024-04-09 Thread Benjamin Drung
On Wed, 13 Mar 2024 13:03:20 +0100 Lucas Nussbaum 
wrote:
> Source: lftp
> Version: 4.9.2-2
> Severity: serious
> Justification: FTBFS
> Tags: trixie sid ftbfs
> User: lu...@debian.org
> Usertags: ftbfs-20240313 ftbfs-trixie
> 
> Hi,
> 
> During a rebuild of all packages in sid, your package failed to build
> on amd64.
> 
> 
> Relevant part (hopefully):
> > /bin/bash ../libtool --silent  --tag=CC   --mode=compile gcc -
DHAVE_CONFIG_H -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -
Werror=implicit-function-declaration -ffile-prefix-
map=/<>=. -fstack-protector-strong -fstack-clash-protection
-Wformat -Werror=format-security -fcf-protection -g -Wall -Wall -MT
argmatch.lo -MD -MP -MF $depbase.Tpo -c -o argmatch.lo argmatch.c &&\
> > mv -f $depbase.Tpo $depbase.Plo
> > In file included from argmatch.c:22:
> > ./config.h:2540:11: fatal error: trio.h: No such file or directory
> >  2540 | # include "trio.h"
> >   |   ^~~~
> > compilation terminated.
> > make[5]: *** [Makefile:2321: argmatch.lo] Error 1
> 
> 
> The full build log is available from:
> http://qa-logs.debian.net/2024/03/13/lftp_4.9.2-2_unstable.log
> 
> All bugs filed during this archive rebuild are listed at:
>
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org
> or:
>
https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=1#results
> 
> A list of current common problems and possible solutions is available
at
> http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to
contribute!
> 
> If you reassign this bug to another package, please mark it as
'affects'-ing
> this package. See https://www.debian.org/Bugs/server-control#affects
> 
> If you fail to reproduce this, please provide a build log and diff it
with mine
> so that we can identify if something relevant changed in the meantime.

We applied following changes in Ubuntu to fix the build failure (patch
attached):

  * Fix C99 compatibility issue (patch taken from upstream)
  * configure.ac: Bump gettext version to 0.21
  * d/rules: Switch to dh to regenerate the configure script
  * Replace obsolete pkg-config build dependency by pkgconf
  * Drop obsolete debian/menu (would be installed by dh)

-- 
Benjamin Drung
Debian & Ubuntu Developer
diff --git a/debian/control b/debian/control
index cea175a..0346640 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Ubuntu Developers 
 XSBC-Original-Maintainer: Noël Köthe 
 Standards-Version: 4.6.1
-Build-Depends: debhelper-compat (= 13), debhelper (>> 13.0.0), libncurses-dev, libreadline-dev, gettext, gawk, bison, libgnutls28-dev, pkg-config, libidn2-dev, zlib1g-dev
+Build-Depends: debhelper-compat (= 13), debhelper (>> 13.0.0), libncurses-dev, libreadline-dev, gettext, gawk, bison, libgnutls28-dev, pkgconf, libidn2-dev, zlib1g-dev
 Homepage: https://lftp.yar.ru
 Rules-Requires-Root: no
 
diff --git a/debian/menu b/debian/menu
deleted file mode 100644
index b0fee43..000
--- a/debian/menu
+++ /dev/null
@@ -1,4 +0,0 @@
-?package(lftp):needs="text" section="Apps/Net" \
-title="Lftp" command="/usr/bin/lftp" \
-hints="FTP" \
-description="Reliable, easy and powerful ftp command-line client"
diff --git a/debian/patches/Fix-C99-compatibility-issue.patch b/debian/patches/Fix-C99-compatibility-issue.patch
new file mode 100644
index 000..745a448
--- /dev/null
+++ b/debian/patches/Fix-C99-compatibility-issue.patch
@@ -0,0 +1,27 @@
+From: DJ Delorie 
+Date: Wed, 8 Feb 2023 23:37:37 -0500
+Subject: Fix C99 compatibility issue
+
+Related to:
+
+  
+  
+
+Closes: #1066396
+Origin: upstream, https://github.com/lavv17/lftp/commit/8af97cc255c3d2488adb107515bd1047dbedadfe
+---
+ m4/needtrio.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/m4/needtrio.m4 b/m4/needtrio.m4
+index 45478f9..8b350a8 100644
+--- a/m4/needtrio.m4
 b/m4/needtrio.m4
+@@ -9,6 +9,7 @@ AC_DEFUN([LFTP_NEED_TRIO],[
+   else
+ 
+   AC_RUN_IFELSE([AC_LANG_SOURCE([[
++	 #include 
+ 	 int main()
+ 	 {
+ 	unsigned long long x=0,x1;
diff --git a/debian/patches/configure.ac-Bump-gettext-version-to-0.21.patch b/debian/patches/configure.ac-Bump-gettext-version-to-0.21.patch
new file mode 100644
index 000..406de03
--- /dev/null
+++ b/debian/patches/configure.ac-Bump-gettext-version-to-0.21.patch
@@ -0,0 +1,44 @@
+From: Benjamin Drung 
+Date: Tue, 9 Apr 2024 15:08:22 +0200
+Subject: configure.ac: Bump gettext version to 0.21
+
+After running autoreconf and configure on Ubuntu 24.04 (noble), the
+generated `po/Makefile` will fail to run `make install`:
+
+```
+$ make install DESTDIR=debian/lftp
+[...]
+Making install in po
+make[4]: Entering directory 'po'
+debian/lftp/usr/share
+make[4]: debian/lftp/usr/share: Permission denied
+```
+
+This failure is caused by `mkdir_p` pointing to `MKDIR_P` but `MKDIR_P`
+not being defined in 

Bug#1066396: lftp: FTBFS: ./config.h:2540:11: fatal error: trio.h: No such file or directory

2024-04-08 Thread Chris Hofstaedtler
On Sun, Mar 24, 2024 at 03:42:18PM +0500, Andrey Rakhmatullin wrote:
> On Wed, Mar 13, 2024 at 01:03:20PM +0100, Lucas Nussbaum wrote:
> > > ./config.h:2540:11: fatal error: trio.h: No such file or directory
> > >  2540 | # include "trio.h"
> > >   |   ^~~~
> (this suggests that using trio is not actually supported but that's
> irrelevant)
> This is caused by the stdio detection failing and should be fixed by
> adding #include  to the test case code in m4/needtrio.m4 but this
> package doesn't run autoreconf so fixing d/rules to at least do that is
> also needed.

I gave the following a try, but it makes `make install` fail with an error
suggesting a variable was left empty.

Making install in po
make[3]: Entering directory '/<>/po'
/<>/debian/lftp/usr/share
make[3]: /<>/debian/lftp/usr/share: Permission denied
make[3]: *** [Makefile:304: install-data-yes] Error 127
make[3]: Leaving directory '/<>/po'
...


diff -Nru lftp-4.9.2/debian/rules lftp-4.9.2/debian/rules
--- lftp-4.9.2/debian/rules 2018-09-17 09:33:33.0 +0200
+++ lftp-4.9.2/debian/rules 2024-04-08 16:46:06.0 +0200
@@ -20,6 +20,8 @@
 #configure: configure-stamp
 configure-stamp:
dh_testdir
+   dh_update_autotools_config
+   dh_autoreconf
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" 
LDFLAGS="$(LDFLAGS)" ./configure \
--prefix=/usr \
@@ -56,6 +58,7 @@
[ ! -f Makefile ] || $(MAKE) distclean
rm -f doc/lftp.inf*

+   dh_autoreconf_clean
dh_clean

 install: build



Bug#1066396: lftp: FTBFS: ./config.h:2540:11: fatal error: trio.h: No such file or directory

2024-03-24 Thread Andreas Metzler
Control: tags -1 patch

On 2024-03-24 Andrey Rakhmatullin  wrote:
> On Wed, Mar 13, 2024 at 01:03:20PM +0100, Lucas Nussbaum wrote:
> > > ./config.h:2540:11: fatal error: trio.h: No such file or directory
> > >  2540 | # include "trio.h"
> > >   |   ^~~~
> (this suggests that using trio is not actually supported but that's
> irrelevant)
> This is caused by the stdio detection failing and should be fixed by
> adding #include  to the test case code in m4/needtrio.m4 but this
> package doesn't run autoreconf so fixing d/rules to at least do that is
> also needed.
[...]

As a hotfix touch-magic can also be used.

cu Andreas

diff --git a/debian/rules b/debian/rules
index e0872ed..ab41336 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,6 +19,9 @@ CFLAGS += -g -Wall
 
 #configure: configure-stamp
 configure-stamp:
+	# Avoid autoconf rebuild due to patching input files.
+	touch --reference=aclocal.m4 configure m4/needtrio.m4
+	touch --reference=Makefile.am m4/needtrio.m4
 	dh_testdir
 	# Add here commands to configure the package.
 	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \
--- lftp-4.9.2.orig/configure
+++ lftp-4.9.2/configure
@@ -57429,6 +57429,7 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+	#include 
 	 int main()
 	 {
 	unsigned long long x=0,x1;
--- lftp-4.9.2.orig/m4/needtrio.m4
+++ lftp-4.9.2/m4/needtrio.m4
@@ -9,6 +9,7 @@ AC_DEFUN([LFTP_NEED_TRIO],[
   else
 
   AC_RUN_IFELSE([AC_LANG_SOURCE([[
+	#include 
 	 int main()
 	 {
 	unsigned long long x=0,x1;


Bug#1066396: lftp: FTBFS: ./config.h:2540:11: fatal error: trio.h: No such file or directory

2024-03-24 Thread Andrey Rakhmatullin
On Wed, Mar 13, 2024 at 01:03:20PM +0100, Lucas Nussbaum wrote:
> > ./config.h:2540:11: fatal error: trio.h: No such file or directory
> >  2540 | # include "trio.h"
> >   |   ^~~~
(this suggests that using trio is not actually supported but that's
irrelevant)
This is caused by the stdio detection failing and should be fixed by
adding #include  to the test case code in m4/needtrio.m4 but this
package doesn't run autoreconf so fixing d/rules to at least do that is
also needed.

-- 
WBR, wRAR


signature.asc
Description: PGP signature


Bug#1066396: lftp: FTBFS: ./config.h:2540:11: fatal error: trio.h: No such file or directory

2024-03-13 Thread Lucas Nussbaum
Source: lftp
Version: 4.9.2-2
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20240313 ftbfs-trixie

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> /bin/bash ../libtool --silent  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H 
> -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
> -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -g -Wall -Wall -MT argmatch.lo -MD 
> -MP -MF $depbase.Tpo -c -o argmatch.lo argmatch.c &&\
> mv -f $depbase.Tpo $depbase.Plo
> In file included from argmatch.c:22:
> ./config.h:2540:11: fatal error: trio.h: No such file or directory
>  2540 | # include "trio.h"
>   |   ^~~~
> compilation terminated.
> make[5]: *** [Makefile:2321: argmatch.lo] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/lftp_4.9.2-2_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.