You are not logged in.

#126 2010-01-17 15:32:35

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,473
Website

Re: The Arch Hurd Project

zlib

ZLIB_VER=1.2.3
#!/bin/bash

cd $SOURCE_DIR
if [ ! -f zlib-$ZLIB_VER.tar.gz ]; then
  wget http://www.zlib.net/zlib-$ZLIB_VER.tar.gz
fi

cd $BUILD_DIR
rm -rf zlib-$ZLIB_VER
tar -xf $SOURCE_DIR/zlib-$ZLIB_VER.tar.gz
cd zlib-$ZLIB_VER
patch -p1 < $SOURCE_DIR/patches/zlib-$ZLIB_VER/zlib-1.2.3-fPIC.patch

# can-not build outside source directory 

configure \
    --prefix=$HURD_DIR \
    --shared
make install

cd $ROOT

Offline

#127 2010-01-17 15:37:44

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

fakeroot:

FAKEROOT_VER=1.14.4
#!/bin/bash

cd $SOURCE_DIR
if [ ! -f fakeroot_$FAKEROOT_VER.orig.tar.bz2 ]; then
  wget http://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_$FAKEROOT_VER.orig.tar.bz2
fi

cd $BUILD_DIR
rm -rf fakeroot-$FAKEROOT_VER
tar -xf $SOURCE_DIR/fakeroot_$FAKEROOT_VER.orig.tar.bz2

rm -rf fakeroot-build
mkdir -p fakeroot-build
cd fakeroot-build

../fakeroot-$FAKEROOT_VER/configure \
  --prefix= \
  --libdir=/lib/libfakeroot \
  --disable-static \
  --with-ipc=sysv \
  --host=$TARGET

make DESTDIR=$HURD_DIR install

cd $ROOT

Offline

#128 2010-01-17 17:03:52

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

I'm going to try and make a big dent in pacman's dependencies by the end of the day

gdbm:

GDBM_VER=1.8.3
#!/bin/bash

cd $SOURCE_DIR
if [ ! -f gdbm-$GDBM_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/gdbm/gdbm-$GDBM_VER.tar.gz
fi

cd $BUILD_DIR
rm -rf gdbm-$GDBM_VER
tar -xf $SOURCE_DIR/gdbm-$GDBM_VER.tar.gz

rm -rf gdbm-build
mkdir -p gdbm-build
cd gdbm-build

../gdbm-$GDBM_VER/configure \
    --host=$TARGET \
    --prefix= \
    --mandir=/share/man \
    --infodir=/share/info

make prefix=$HURD_DIR
make prefix=$HURD_DIR manprefix=$HURD_DIR/share/man man3dir=$HURD_DIR/share/man/man3 infodir=$HURD_DIR/share/info install
make prefix=$HURD_DIR manprefix=$HURD_DIR/share/man man3dir=$HURD_DIR/share/man/man3 infodir=$HURD_DIR/share/info install-compat

cd $ROOT

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

db:

DB_VER=4.8.24
#!/bin/bash

cd $SOURCE_DIR
if [ ! -f db-$DB_VER.tar.gz ]; then
  wget http://download-uk.oracle.com/berkeley-db/db-$DB_VER.tar.gz
fi

cd $BUILD_DIR
rm -rf db-$DB_VER
tar -xf $SOURCE_DIR/db-$DB_VER.tar.gz

rm -rf db-build
mkdir -p db-build
cd db-build

../db-$DB_VER/dist/configure \
    --host=$TARGET \
    --prefix= \
    --enable-compat185 \
    --enable-static \
    --enable-shared \
    --enable-cxx
make DESTDIR=$HURD_DIR install

cd $ROOT

Last edited by Barrucadu (2010-01-17 17:17:00)

Offline

#129 2010-01-17 18:54:26

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

Re: The Arch Hurd Project

This seems like a cool project. Any way I could help?

Oh, and for the crosshurd scripts, it won't like, if I mess up or something, delete ~ or something? tongue

Offline

#130 2010-01-17 19:46:58

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

Arm-the-Homeless wrote:

This seems like a cool project. Any way I could help?

You could work on build scripts for the packages Allan mentioned in his post on the last page, or for pacman and its deps, if you want. I'm having particular difficulty with perl (required for openssl), and xz-utils (required for libarchive).

Arm-the-Homeless wrote:

Oh, and for the crosshurd scripts, it won't like, if I mess up or something, delete ~ or something? tongue

I've accidentally done things like replace ncurses with files compiled for hurd by forgetting to tell it where to install things, but I'm building it in a minimal 32-bit chroot so I haven't messed anything up particularly bad tongue

Last edited by Barrucadu (2010-01-17 19:49:15)

Offline

#131 2010-01-17 20:32:57

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

Can someone help me?

I made a folder under /mnt/data/Development, which is named "hurd". I putted Allan's script there, and executed it.

Am I doing it the right way?


/me wants you to detele this account... please delete it.

Offline

#132 2010-01-17 20:35:40

Arm-the-Homeless
Member
Registered: 2008-12-22
Posts: 273

Re: The Arch Hurd Project

Barrucadu wrote:
Arm-the-Homeless wrote:

This seems like a cool project. Any way I could help?

You could work on build scripts for the packages Allan mentioned in his post on the last page, or for pacman and its deps, if you want. I'm having particular difficulty with perl (required for openssl), and xz-utils (required for libarchive).

Arm-the-Homeless wrote:

Oh, and for the crosshurd scripts, it won't like, if I mess up or something, delete ~ or something? tongue

I've accidentally done things like replace ncurses with files compiled for hurd by forgetting to tell it where to install things, but I'm building it in a minimal 32-bit chroot so I haven't messed anything up particularly bad tongue

I'll try my hand at some build scripts, I guess.

And since I'm lazy, I'm planning on just building it without a chroot. So I'm pretty sure I can trust the crosshurd scripts from the site without me replacing kernel26? tongue

Offline

#133 2010-01-17 20:48:12

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

apollokk wrote:

Can someone help me?

I made a folder under /mnt/data/Development, which is named "hurd". I putted Allan's script there, and executed it.

Am I doing it the right way?

Oh, it didn't work. Please, help. roll


/me wants you to detele this account... please delete it.

Offline

#134 2010-01-17 20:53:34

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

apollokk wrote:
apollokk wrote:

Can someone help me?

I made a folder under /mnt/data/Development, which is named "hurd". I putted Allan's script there, and executed it.

Am I doing it the right way?

Oh, it didn't work. Please, help. roll

Extract the tarball to /mnt/data/Development, make any changes necessary in ./scripts/prepare, and then run `./scripts/makeall`. You need git installed to get some of the sources.

Offline

#135 2010-01-17 21:08:19

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

gtklocker@pascal /mnt/data/Development $ ./scripts/makeall
./scripts/makeall: line 4: ./scripts/cross-binutils: No such file or directory
./scripts/makeall: line 5: ./scripts/cross-gcc-pass1: No such file or directory
./scripts/makeall: line 6: ./scripts/gnumach-headers: No such file or directory
./scripts/makeall: line 7: ./scripts/cross-mig: No such file or directory
./scripts/makeall: line 8: ./scripts/hurd-headers: No such file or directory
./scripts/makeall: line 9: ./scripts/glibc-pass1: No such file or directory
./scripts/makeall: line 10: ./scripts/libpthread: No such file or directory
./scripts/makeall: line 11: ./scripts/cross-gcc-pass2: No such file or directory
./scripts/makeall: line 12: ./scripts/glibc-pass2: No such file or directory
./scripts/makeall: line 13: ./scripts/crossenv: No such file or directory
./scripts/makeall: line 14: ./scripts/gnumach: No such file or directory
./scripts/makeall: line 15: ./scripts/hurd: No such file or directory
./scripts/makeall: line 16: ./scripts/coreutils: No such file or directory
./scripts/makeall: line 17: ./scripts/bash: No such file or directory
./scripts/makeall: line 18: ./scripts/grub: No such file or directory
./scripts/makeall: line 19: ./scripts/sed: No such file or directory
./scripts/makeall: line 20: ./scripts/ncurses: No such file or directory
./scripts/makeall: line 21: ./scripts/nano: No such file or directory
./scripts/makeall: line 22: ./scripts/grep: No such file or directory
gtklocker@pascal /mnt/data/Development $ ls scripts
bash             cross-gcc-pass2  gnumach          hurd-headers  prepare
coreutils        cross-mig        gnumach-headers  libpthread    sed
cross-binutils   devel            grep             makeall
crossenv         glibc-pass1      grub             nano
cross-gcc-pass1  glibc-pass2      hurd             ncurses

/me wants you to detele this account... please delete it.

Offline

#136 2010-01-17 21:10:58

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

In that case… `source ./scripts/makeall`

Offline

#137 2010-01-17 21:16:06

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

$ source ./scripts/makeall
bash: ./scripts/cross-binutils: No such file or directory
bash: ./scripts/cross-gcc-pass1: No such file or directory
bash: ./scripts/gnumach-headers: No such file or directory
bash: ./scripts/cross-mig: No such file or directory
bash: ./scripts/hurd-headers: No such file or directory
bash: ./scripts/glibc-pass1: No such file or directory
bash: ./scripts/libpthread: No such file or directory
bash: ./scripts/cross-gcc-pass2: No such file or directory
bash: ./scripts/glibc-pass2: No such file or directory
bash: ./scripts/crossenv: No such file or directory
bash: ./scripts/gnumach: No such file or directory
bash: ./scripts/hurd: No such file or directory
bash: ./scripts/coreutils: No such file or directory
bash: ./scripts/bash: No such file or directory
bash: ./scripts/grub: No such file or directory
bash: ./scripts/sed: No such file or directory
bash: ./scripts/ncurses: No such file or directory
bash: ./scripts/nano: No such file or directory
bash: ./scripts/grep: No such file or directory

/me wants you to detele this account... please delete it.

Offline

#138 2010-01-17 21:28:40

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: The Arch Hurd Project

Are you following the install instructions from archhurd.org? When I first tried, I think I got the same errors and it was because I didn't know "# You might need to edit ./scripts/prepare first." was more mandatory than it seems. Specifically the ROOT variable. Is yours set properly?

Offline

#139 2010-01-17 21:31:52

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

Yes.


/me wants you to detele this account... please delete it.

Offline

#140 2010-01-17 21:40:00

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

gtklocker@pascal /mnt/data/crosshurd-tarball $ cat ./scripts/prepare 
#!/bin/bash

ROOT=/mnt/data/hurd
HOST=i686-pc-linux-gnu
TARGET=i586-pc-gnu

# see NOTES for information on other versions
BINUTILS_VER=2.19.1
GCC_VER=4.4.2
GLIBC_VER=2.10.1

BASH_VER=4.1
BASH_PATCHLEVEL=000
COREUTILS_VER=8.3
GRUB_VER=0.97

# clear system variables
export LC_ALL=C
unset CC CXX AR AS RANLIB LD STRIP
unset ASFLAGS CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MAKEFLAGS

export CFLAGS="-O2 -pipe"  # -march=${TARGET%%-*} will be added for cross compiled code

# prepare directories
export SOURCE_DIR=$ROOT/source
export BUILD_DIR=$ROOT/build
export CROSS_DIR=$ROOT/cross
export HURD_DIR=$ROOT/hurd
mkdir -p $SOURCE_DIR $BUILD_DIR $CROSS_DIR $HURD_DIR

mkdir -p $CROSS_DIR/{bin,$TARGET}
export PATH=$CROSS_DIR/bin:$PATH

# prepare hurd layout
cd $HURD_DIR
ln -sf . usr &>/dev/null
mkdir -p $HURD_DIR/{include,lib}
ln -sfn $HURD_DIR/{include,lib} $CROSS_DIR/$TARGET/

cd $ROOT

This is my prepare file.

And this the error I get:

gtklocker@pascal /mnt/data/crosshurd-tarball $ ./scripts/makeall
./scripts/makeall: line 4: ./scripts/cross-binutils: No such file or directory
./scripts/makeall: line 5: ./scripts/cross-gcc-pass1: No such file or directory
./scripts/makeall: line 6: ./scripts/gnumach-headers: No such file or directory
./scripts/makeall: line 7: ./scripts/cross-mig: No such file or directory
./scripts/makeall: line 8: ./scripts/hurd-headers: No such file or directory
./scripts/makeall: line 9: ./scripts/glibc-pass1: No such file or directory
./scripts/makeall: line 10: ./scripts/libpthread: No such file or directory
./scripts/makeall: line 11: ./scripts/cross-gcc-pass2: No such file or directory
./scripts/makeall: line 12: ./scripts/glibc-pass2: No such file or directory
./scripts/makeall: line 13: ./scripts/crossenv: No such file or directory
./scripts/makeall: line 14: ./scripts/gnumach: No such file or directory
./scripts/makeall: line 15: ./scripts/hurd: No such file or directory
./scripts/makeall: line 16: ./scripts/coreutils: No such file or directory
./scripts/makeall: line 17: ./scripts/bash: No such file or directory
./scripts/makeall: line 18: ./scripts/grub: No such file or directory

/me wants you to detele this account... please delete it.

Offline

#141 2010-01-17 21:41:58

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

These files exist:

gtklocker@pascal /mnt/data/crosshurd-tarball $ ls scripts
bash            cross-gcc-pass1  glibc-pass1      grub          makeall
coreutils       cross-gcc-pass2  glibc-pass2      hurd          prepare
cross-binutils  cross-mig        gnumach          hurd-headers
crossenv        devel            gnumach-headers  libpthread

/me wants you to detele this account... please delete it.

Offline

#142 2010-01-17 21:44:13

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: The Arch Hurd Project

ROOT needs to be set to wherever the scripts dir is, I think. Does it work with ROOT set to /mnt/data/crosshurd-tarball ?

Offline

#143 2010-01-17 21:46:32

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

Ok, I've been poking around with the scripts and I think your $ROOT variable is set to the wrong value. It should be set to the directory containing the scripts directory, so "/mnt/data/Development" in your case.
Everything will get compiled/installed in sub-directories of $ROOT: eg, $ROOT/hurd will contain the cross-built system.

I'll update the installing instructions to be more clear.

Offline

#144 2010-01-17 21:46:52

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

jac wrote:

ROOT needs to be set to wherever the scripts dir is, I think. Does it work with ROOT set to /mnt/data/crosshurd-tarball ?

Aha, it seems to be working now ... but, where can I see the changes? What the script is finished, what then?


/me wants you to detele this account... please delete it.

Offline

#145 2010-01-17 21:50:48

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

OK, compiling of the first package, finished with these errors.

xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o  ./strncmp.o
make[2]: i686-pc-linux-gnu-ar: Command not found
make[2]: *** [libiberty.a] Error 127
make[2]: Leaving directory `/mnt/data/hurd/build/cross-binutils-build/libiberty'
make[1]: *** [all-libiberty] Error 2
make[1]: Leaving directory `/mnt/data/hurd/build/cross-binutils-build'
make: *** [all] Error 2

/me wants you to detele this account... please delete it.

Offline

#146 2010-01-17 21:59:31

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

Another error sad

checking for ranlib... ranlib
checking for i586-pc-gnu-mig... no
checking for mig... no
configure: error: 
*** You need GNU MiG to compile the GNU Hurd, please see
*** http://www.gnu.org/software/hurd/mig.html for further details, or
*** download it directly from the main GNU server (ftp.gnu.org) or any
*** GNU mirror.
make: *** No rule to make target `install-headers'.  Stop.
rm: cannot remove `config.status': No such file or directory

/me wants you to detele this account... please delete it.

Offline

#147 2010-01-17 21:59:50

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

What are your $TARGET and $HOST variables set to in ./scripts/prepare, and are you on 32 or 64 bit?

Offline

#148 2010-01-17 22:01:03

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

Another:

configure: error: in `/mnt/data/hurd/build/gnumach-build':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** No rule to make target `install'.  Stop.

Why so many errors? sad


/me wants you to detele this account... please delete it.

Offline

#149 2010-01-17 22:02:50

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: The Arch Hurd Project

You probably have the wrong TARGET or HOST in ./scripts/prepare.

Offline

#150 2010-01-17 22:06:49

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: The Arch Hurd Project

My native system is x86_64.

TARGET and HOST on prepare file are:

HOST=i686-pc-linux-gnu
TARGET=i586-pc-gnu

/me wants you to detele this account... please delete it.

Offline

Board footer

Powered by FluxBB