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

    From hahawang@21:1/5 to All on Sun May 9 16:00:01 2021
    Package: gftp
    Severity: important
    Version: 2.7.0b-1
    Tags: ftbfs,patch
    User:hahawang
    Usertags: hurd,hurd-i386 X-Debbugs-CC:debian-hurd@lists.debian.org,bug-hurd@gnu.org

    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>
    #endif

    ```

    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!

    ---

    hahawang


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

     #elif HAVE_GRANTPT

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From hahawang@21:1/5 to All on Sun May 9 16:40:06 2021
    I am sorry for the unindented patch file,  due to the thunderbird mail client(or may be I do not know how to use it correctly), so I decide to
    reply it with a correctly indented patch file.

    ---

    hahawang


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

     #elif HAVE_GRANTPT

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Samuel Thibault@21:1/5 to All on Sun May 9 19:50:01 2021
    Hello,

    hahawang, le dim. 09 mai 2021 21:56:58 +0800, a ecrit:
    @@ -60,7 +60,7 @@

     #elif HAVE_GRANTPT

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

    We rather use __GNU__ than __gnu_hurd__. But otherwise the patch makes
    perfect sense. I'd say try to submit to upstream gftp. Debian will then
    catch it up later (we're in the release freeze atm anyway)

    Samuel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)