• Re: dhcpcd5: FTBFS on Hurd-i386

    From Samuel Thibault@21:1/5 to All on Fri Jul 1 11:50:01 2022
    Hello,

    Martin-Éric Racine, le ven. 01 juil. 2022 12:01:24 +0300, a ecrit:
    ../compat/rbtree.h:50:10: fatal error: sys/endian.h: No such file or directory
    50 | #include <sys/endian.h>
    | ^~~~~~~~~~~~~~

    Probably <endian.h> can be used instead?

    Samuel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to All on Fri Jul 1 11:30:01 2022
    Greetings,

    dhcpcd5 FTBFS on Hurd-i386:

    Makefile:55: warning: ignoring prerequisites on suffix rule definition
    cc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=.
    -fstack-protector-strong -Wformat -Werror=format-security -std=c99
    -Wdate-time -D_FORTIFY_SOURCE=2 -I/include -DHAVE_CONFIG_H -DNDEBUG
    -DINET -DARP -DARPING -DIPV4LL -DINET6 -DDHCP6 -DAUTH -DPRIVSEP -I..
    -I../src -I./crypt -c common.c -o common.o
    In file included from ../config.h:24,
    from dhcpcd.h:37,
    from common.c:40:
    ../compat/rbtree.h:50:10: fatal error: sys/endian.h: No such file or directory
    50 | #include <sys/endian.h>
    | ^~~~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [Makefile:55: common.o] Error 1
    make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
    make[1]: *** [Makefile:24: all] Error 2
    make[1]: Leaving directory '/<<PKGBUILDDIR>>'
    dh_auto_build: error: make -j1 returned exit code 2
    make: *** [debian/rules:6: binary-arch] Error 255

    Would anyone have a fix for this? Thanks!

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to All on Fri Jul 1 17:50:02 2022
    ../compat/rbtree.h:50:10: fatal error: sys/endian.h: No such file or directory
    50 | #include <sys/endian.h>
    Probably <endian.h> can be used instead?

    Would you have a patch I could test on Debian and later submit to upstream?

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to [email protected] on Fri Jul 8 14:30:01 2022
    (non-subscriber; please keep me in CC)

    On Fri, Jul 1, 2022 at 6:31 PM Martin-Éric Racine
    <[email protected]> wrote:

    ../compat/rbtree.h:50:10: fatal error: sys/endian.h: No such file or directory
    50 | #include <sys/endian.h>
    Probably <endian.h> can be used instead?

    Would you have a patch I could test on Debian and later submit to upstream?

    This seems to be the relevant ./configure fragment:

    *****
    if [ -z "$BE64ENC" ]; then
    printf "Testing for be64enc ... "
    cat <<EOF >_be64enc.c
    #include <sys/endian.h>
    #include <stdlib.h>
    int main(void) {
    be64enc(NULL, 0);
    return 0;
    }
    EOF
    if $XCC _be64enc.c -o _be64enc 2>&3; then
    BE64ENC=yes
    else
    BE64ENC=no
    fi
    echo "$BE64ENC"
    rm -f _be64enc.c _be64enc
    fi
    if [ "$BE64ENC" = no ]; then
    echo "#include \"compat/endian.h\"" >>$CONFIG_H
    fi
    *****

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to [email protected] on Thu Jul 28 21:00:02 2022
    On Fri, Jul 8, 2022 at 3:11 PM Martin-Éric Racine
    <[email protected]> wrote:

    (non-subscriber; please keep me in CC)

    On Fri, Jul 1, 2022 at 6:31 PM Martin-Éric Racine <[email protected]> wrote:

    ../compat/rbtree.h:50:10: fatal error: sys/endian.h: No such file or directory
    50 | #include <sys/endian.h>
    Probably <endian.h> can be used instead?

    Would you have a patch I could test on Debian and later submit to upstream?

    This seems to be the relevant ./configure fragment:

    *****
    if [ -z "$BE64ENC" ]; then
    printf "Testing for be64enc ... "
    cat <<EOF >_be64enc.c
    #include <sys/endian.h>
    #include <stdlib.h>
    int main(void) {
    be64enc(NULL, 0);
    return 0;
    }
    EOF
    if $XCC _be64enc.c -o _be64enc 2>&3; then
    BE64ENC=yes
    else
    BE64ENC=no
    fi
    echo "$BE64ENC"
    rm -f _be64enc.c _be64enc
    fi
    if [ "$BE64ENC" = no ]; then
    echo "#include \"compat/endian.h\"" >>$CONFIG_H
    fi
    *****

    Actually, where it barfs is here:

    #if !defined(__linux__) && !defined(__QNX__) && !defined(__sun)
    #include <sys/endian.h>
    #else
    #include "endian.h"
    #endif

    What is the equivalent define for Hurd?

    From what I could google, __GNU__ or __MACH__ might be possible
    choices, but I'm not sure which one applies here.

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Samuel Thibault@21:1/5 to All on Thu Jul 28 21:40:01 2022
    Martin-Éric Racine, le jeu. 28 juil. 2022 21:30:42 +0300, a ecrit:
    Actually, where it barfs is here:

    #if !defined(__linux__) && !defined(__QNX__) && !defined(__sun)
    #include <sys/endian.h>
    #else
    #include "endian.h"
    #endif

    What is the equivalent define for Hurd?

    It's just the same on the Hurd as on Linux, since that's just coming
    from glibc.

    Samuel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to [email protected] on Fri Jul 29 08:10:01 2022
    On Thu, Jul 28, 2022 at 10:38 PM Samuel Thibault <[email protected]> wrote:

    Martin-Éric Racine, le jeu. 28 juil. 2022 21:30:42 +0300, a ecrit:
    Actually, where it barfs is here:

    #if !defined(__linux__) && !defined(__QNX__) && !defined(__sun)
    #include <sys/endian.h>
    #else
    #include "endian.h"
    #endif

    What is the equivalent define for Hurd?

    It's just the same on the Hurd as on Linux, since that's just coming
    from glibc.

    Yet it FTBFS on Hurd at that precise point. That suggets we need to
    patch that spot. Not knowing Hurd, I have no idea what the correct
    fragment would be.

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeffrey Walton@21:1/5 to [email protected] on Fri Jul 29 08:30:01 2022
    On Fri, Jul 29, 2022 at 2:09 AM Martin-Éric Racine
    <[email protected]> wrote:

    On Thu, Jul 28, 2022 at 10:38 PM Samuel Thibault <[email protected]> wrote:

    Martin-Éric Racine, le jeu. 28 juil. 2022 21:30:42 +0300, a ecrit:
    Actually, where it barfs is here:

    #if !defined(__linux__) && !defined(__QNX__) && !defined(__sun)
    #include <sys/endian.h>
    #else
    #include "endian.h"
    #endif

    What is the equivalent define for Hurd?

    It's just the same on the Hurd as on Linux, since that's just coming
    from glibc.

    Yet it FTBFS on Hurd at that precise point. That suggets we need to
    patch that spot. Not knowing Hurd, I have no idea what the correct
    fragment would be.

    If you want the Mach kernel, use __MACH__. If you want GNU Hurd, use
    __GNU__ or __gnu_hurd__.

    The Pre-defined Operating System Macros list at Sourceforge is usually reliable. Also see
    https://sourceforge.net/p/predef/wiki/OperatingSystems/ .

    Jeff

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to [email protected] on Fri Jul 29 10:00:01 2022
    On Fri, Jul 29, 2022 at 9:27 AM Jeffrey Walton <[email protected]> wrote:

    On Fri, Jul 29, 2022 at 2:09 AM Martin-Éric Racine <[email protected]> wrote:

    On Thu, Jul 28, 2022 at 10:38 PM Samuel Thibault <[email protected]> wrote:

    Martin-Éric Racine, le jeu. 28 juil. 2022 21:30:42 +0300, a ecrit:
    Actually, where it barfs is here:

    #if !defined(__linux__) && !defined(__QNX__) && !defined(__sun) #include <sys/endian.h>
    #else
    #include "endian.h"
    #endif

    What is the equivalent define for Hurd?

    It's just the same on the Hurd as on Linux, since that's just coming
    from glibc.

    Yet it FTBFS on Hurd at that precise point. That suggets we need to
    patch that spot. Not knowing Hurd, I have no idea what the correct
    fragment would be.

    If you want the Mach kernel, use __MACH__. If you want GNU Hurd, use
    __GNU__ or __gnu_hurd__.

    The Pre-defined Operating System Macros list at Sourceforge is usually reliable. Also see
    https://sourceforge.net/p/predef/wiki/OperatingSystems/ .

    Upstream says:

    "Hurd is not a supported OS. At a minimum it would need an equivalent
    of if-bsd.c being ported."

    Does that ring any bell?

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Samuel Thibault@21:1/5 to All on Fri Jul 29 10:10:01 2022
    Martin-Éric Racine, le ven. 29 juil. 2022 10:35:38 +0300, a ecrit:
    "Hurd is not a supported OS. At a minimum it would need an equivalent
    of if-bsd.c being ported."

    Does that ring any bell?

    The Hurd has a very BSD-ish interface, so starting from if-bsd.c is
    probably a good idea.

    Samuel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to [email protected] on Fri Jul 29 10:50:01 2022
    On Fri, Jul 29, 2022 at 11:00 AM Samuel Thibault <[email protected]> wrote:

    Martin-Éric Racine, le ven. 29 juil. 2022 10:35:38 +0300, a ecrit:
    "Hurd is not a supported OS. At a minimum it would need an equivalent
    of if-bsd.c being ported."

    Does that ring any bell?

    The Hurd has a very BSD-ish interface, so starting from if-bsd.c is
    probably a good idea.

    See https://github.com/NetworkConfiguration/dhcpcd/issues/109

    Feel free to comment and send patches.

    Martin-Éric

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