I tried to build hurd with cross-hurd scripts,

and I did some fixes to these errors that made the build fail :

 download.sh :

#in file download-funcs.sh

1-zlib : the original link is not found

ZLIB_URL=http://zlib.net/"$ZLIB_PKG"; -> ZLIB_URL=
https://github.com/madler/zlib/releases/download/v1.3.1/"$ZLIB_PKG";

2-make : the link missing "/make/"

MAKE_URL=$GNU_REPO/"$MAKE_PKG" -> MAKE_URL=$GNU_REPO/make/"$MAKE_PKG"



3- libxcrypt : i think "libxcrypt-gcc15.patch" not required for gcc-15 , it
fail frequently


download_libxcrypt() {
  download_package $LIBXCRYPT_URL &&
    pushd $LIBXCRYPT_SRC &&
      apply_patch $SCRIPT_DIR/patches/libxcrypt/libxcrypt-gcc15.patch 1 &&
    popd
}

->



download_libxcrypt() {
  download_package $LIBXCRYPT_URL &&
    pushd $LIBXCRYPT_SRC &&
   #    apply_patch $SCRIPT_DIR/patches/libxcrypt/libxcrypt-gcc15.patch  &&
    popd
}


4-rumpkernel : original script of install rump from gitlab fall, I modify it

download_rumpkernel() {
  download_from_git rumpkernel
https://salsa.debian.org/hurd-team/rumpkernel.git
}

->

download_rumpkernel(){

cd src
wget https://ftp.gnu.org/gnu/gawk/gawk-5.4.1.tar.xz
tar -xvf  'rumpkernel-master.tar.gz?ref_type=heads'
mv rumpkernel-master rumpkernel
cd rumpkernel
mv buildrump.sh buildrump
cd ..
cd ..
}


5-glibc : this file also fail "submitted-AF_LINK.diff"


download_glibc() {
  (if [ ! -d glibc ]; then
    git clone --depth=1 git://sourceware.org/git/glibc.git
  fi) &&
    cd glibc &&
    git reset --hard &&
    git pull &&
    git checkout $GLIBC_TAG &&
    apply_patch $SCRIPT_DIR/patches/glibc/tg-unlockpt-chroot.diff 1 &&
    apply_patch $SCRIPT_DIR/patches/glibc/submitted-AF_LINK.diff 1 &&
    apply_patch $SCRIPT_DIR/patches/glibc/unsubmitted-prof-eintr.diff 1 &&
    apply_patch $SCRIPT_DIR/patches/glibc/unsubmitted-getaux_at_secure.diff
1 &&
    apply_patch $SCRIPT_DIR/patches/glibc/tg-mach-hurd-link.diff 1 &&
    cd ..
}


->

download_glibc() {
  (if [ ! -d glibc ]; then
    git clone --depth=1 git://sourceware.org/git/glibc.git
  fi) &&
    cd glibc &&
    git reset --hard &&
    git pull &&
    git checkout $GLIBC_TAG &&
    apply_patch $SCRIPT_DIR/patches/glibc/tg-unlockpt-chroot.diff 1 &&
  #  apply_patch $SCRIPT_DIR/patches/glibc/submitted-AF_LINK.diff 1 &&
    apply_patch $SCRIPT_DIR/patches/glibc/unsubmitted-prof-eintr.diff 1 &&
    apply_patch $SCRIPT_DIR/patches/glibc/unsubmitted-getaux_at_secure.diff
1 &&
    apply_patch $SCRIPT_DIR/patches/glibc/tg-mach-hurd-link.diff 1 &&
    cd ..
}



#in file package-versions.sh

1-openssh : the original link fail because the "cdn", the system treats it
as unsafe

OPENSSH_URL=
https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/$OPENSSH_PKG ->
OPENSSH_URL=
https://mirror.planetunix.net/pub/OpenBSD/OpenSSH/portable/$OPENSSH_PKG


compile.sh :


in both files :

#cross-hurd/src/libxcrypt-4.5.2/lib/crypt-sm3-yescrypt.c

#cross-hurd/src/libxcrypt-4.5.2/lib/crypt-gost-yescrypt.c


the compiler fail because this line :


char *hptr = strchr ((const char *) intbuf->retval + 3, '$');

this line originally a warning but because the -Werror the compiler treats
it as error

the fix is remove the "const":

char *hptr = strchr (( char *) intbuf->retval + 3, '$');



-------------------------

Ahmed Khider

Reply via email to