[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gftp: FTBFS on hurd-i386: fatal error: stropts.h: No such file or directory

Hi, Jess

    You are right, after I pushed this patch to the upstream repository and the maintainer merged it.

    He gave me an reply saying the `stropts.h` now seemed meaningless since most major platforms

do not support it, so does GNU Hurd. These lines will be completely removed in the future.

    Thanks for your kind advises.

    The original reply message and the issue I have opened is here.




On 2021/5/10 上午1:37, Jessica Clarke wrote:
On 9 May 2021, at 14:56, hahawang <hahwang@yandex.com> wrote:
Package: gftp
Severity: important
Version: 2.7.0b-1
Tags: ftbfs,patch
Usertags: hurd,hurd-i386

I decide to fix a broken package found at the recommended page(https://people.debian.org/~sthibault/out_of_date.txt)named `gftp`.

After I download the package source and try to build without any modifications under the debian hurd running in qemu (debian-hurd-20210219.img),  I got the following error.


pty.c:64:10: fatal error: stropts.h: No such file or directory
    64 | #include <stropts.h>
       |          ^~~~~~~~~~~
compilation terminated.


So that I decide to check the source code and find the following line:


#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__))
#include <stropts.h>


Obviously, the GNU Hurd also haven't the `stropt.h`, so It is better to add a check of GNU-hurd at this line. By following the document available at https://sourceforge.net/p/predef/wiki/OperatingSystems/,

I have fixed the build failure, patches avaiable at the end of this email.

Although, IMHO it's trivial, so I decide to report this bug along with a patch directly to the debian bug tracking system, but also hopes for your advises and reviews!

Thank you!



--- a/lib/pty.c
+++ b/lib/pty.c
@@ -60,7 +60,7 @@


-#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__))
+#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__) || defined(__gnu_hurd__))
  #include <stropts.h>
Why is this not just #ifdef __sun upstream? AFAIK Solaris is the only OS that
implements that mess. Or, better yet, if it’s optional, just delete the code
that needs this header? Or make it an autoconf check. This is hands down the
worst way upstream could write this code.


Reply to: