You are not logged in.

#251 2010-02-23 17:50:03

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

melpo wrote:

Hey,

I found the debian patch to get a working gcc-4.4 c++ compiler built in the debian patch tracker. (http://patch-tracker.debian.org/patch/s … anges.diff)

<3 to the debian folks for this

Next stop pacman smile

So I have to change the GCC_VER to 4.4 and the scripts/cross-gcc-pass1?

Last edited by Giselher (2010-02-23 17:50:26)

Offline

#252 2010-02-23 18:27:29

melpo
Member
From: Austria
Registered: 2010-02-07
Posts: 19

Re: The Arch Hurd Project

Giselher wrote:

So I have to change the GCC_VER to 4.4 and the scripts/cross-gcc-pass1?

You have to change GCC_VER to 4.4.2 or 4.4.3 (I only tested it with 4.4.3, both should work though) and as you already said add the patch in scripts/cross-gcc-pass1

Offline

#253 2010-02-23 19:00:33

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

melpo wrote:
Giselher wrote:

So I have to change the GCC_VER to 4.4 and the scripts/cross-gcc-pass1?

You have to change GCC_VER to 4.4.2 or 4.4.3 (I only tested it with 4.4.3, both should work though) and as you already said add the patch in scripts/cross-gcc-pass1

Thanks for your response, but binutils wants to install on my root /. I don't know why. The last time i built hurd it worked.

EDIT:
I changed in scripts/cross-binutils

make install

to

make DESTDIR=$CHFS install

But that didnt work too.

Last edited by Giselher (2010-02-23 19:02:11)

Offline

#254 2010-02-23 19:37:44

melpo
Member
From: Austria
Registered: 2010-02-07
Posts: 19

Re: The Arch Hurd Project

Giselher wrote:

Thanks for your response, but binutils wants to install on my root /. I don't know why. The last time i built hurd it worked.

I'm sorry I can't help you there.
I am actually using the old crosshurd script (crosshurd20100121.tar.gz) because I am experiencing similar issues as you with the new one.
I'm not sure if this behavior is intended or an accident, maybe Allan can give us a hint on using the newer script smile

Offline

#255 2010-02-23 19:49:09

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

melpo wrote:
Giselher wrote:

Thanks for your response, but binutils wants to install on my root /. I don't know why. The last time i built hurd it worked.

I'm sorry I can't help you there.
I am actually using the old crosshurd script (crosshurd20100121.tar.gz) because I am experiencing similar issues as you with the new one.
I'm not sure if this behavior is intended or an accident, maybe Allan can give us a hint on using the newer script smile

Allan broke it smile.

I did change DESTDIR in binutils not in cross-binutils.

with the real cross-binutils changed it worked. Now i have to change the DESTDIRS in all  cross-* scripts. I hope it will work then.

EDIT:
I cannot use this patch.

I added it this way:

patch -p0 < $SRCDIR/patches/gcc-$GCC_VER/hurd-changes.diff

Last edited by Giselher (2010-02-23 20:34:07)

Offline

#256 2010-02-23 21:06:14

melpo
Member
From: Austria
Registered: 2010-02-07
Posts: 19

Re: The Arch Hurd Project

You need to use patchlevel 1, your command would be:

patch -p1 < $SRCDIR/patches/gcc-$GCC_VER/hurd-changes.diff

Further than that, I noticed that the tabs from the patch are converted to spaces in my post, so you should copy the parts you need directly from the debian patch. Sorry about that.
I have practically no experience with this forum so I would very much appreciate it if somebody would please tell me if I did something wrong or if this is a bug/feature.

Offline

#257 2010-02-23 21:18:20

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

melpo wrote:

You need to use patchlevel 1, your command would be:

patch -p1 < $SRCDIR/patches/gcc-$GCC_VER/hurd-changes.diff

Further than that, I noticed that the tabs from the patch are converted to spaces in my post, so you should copy the parts you need directly from the debian patch. Sorry about that.
I have practically no experience with this forum so I would very much appreciate it if somebody would please tell me if I did something wrong or if this is a bug/feature.

Thanks, but too late. smile (One of the files in the patch doens't exists so it could not patch)

I am working on the scripts and trying to compile hurd.
I will post my changes if it works.

EDIT:
This is useful smile

source ./scripts/prepare
soruce ./scripts/pkgver
#source ./scripts/downlaod

source ./scripts/${1}

EDIT2:
Allan: why don't use wget -nc in scripts/get-sources

EDIT3:
Cannot build cross-mig

checking for i586-pc-gnu-gcc... none    
configure: error: could not find a compiler for the target you requested   
make: *** No rule to make target `all'.  Stop.

EDIT4:
Works now
$PATH=${CHFS}/cross-tools/bin
(Too many edits)
It wasn't a good idea to change all to $CHFS

Last edited by Giselher (2010-02-23 22:27:57)

Offline

#258 2010-02-23 23:09:06

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

Re: The Arch Hurd Project

The latest cross scripts I put on the website require more setup for use.  I think I explained it in the post I put it in but...

You need symlinks to in / to folders in $ROOT.  e.g.

lrwxrwxrwx   1 root root   34 Feb  3 00:18 cross-tools -> /home/allan/hurd/hurd/cross-tools/
lrwxrwxrwx   1 root root    28 Feb  3 00:18 tools -> /home/allan/hurd/hurd/tools/

where ROOT=/home/allan/hurd for me.  Refer to CLFS for details.   That makes the cross-compiled compiler actually work once we boot the hurd build.  Otherwise, you end up with really annoying issues (hence the reason I rewrote the cross scripts...).

Giselher wrote:

EDIT2:
Allan: why don't use wget -nc in scripts/get-sources

I have never actually used that script so I have put no effort into it...

Offline

#259 2010-02-23 23:36:40

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

Re: The Arch Hurd Project

melpo wrote:

Hey,

I found the debian patch to get a working gcc-4.4 c++ compiler built in the debian patch tracker. (http://patch-tracker.debian.org/patch/s … anges.diff)
<snip>
<3 to the debian folks for this

Next stop pacman smile

I looked at that patch in the past, but the description really does not tall me anything about build fixes.  I skipped it as I did not want to support /usr or defining MAXPATHLEN...

Offline

#260 2010-02-24 00:24:49

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: The Arch Hurd Project

How that I don't have as much work to do for uni, I can play around with this again.

I have an updated version of the get-source script, with all the download links, if anyone wants it.

Offline

#261 2010-02-24 01:35:06

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

Re: The Arch Hurd Project

bobdob wrote:

I have an updated version of the get-source script, with all the download links, if anyone wants it.

Sure, do post.

Offline

#262 2010-02-24 05:18:43

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

Re: The Arch Hurd Project

I took a quick look at this again today.   The "cross hurd from scratch" approach has booting issues, so it is probably easier hacking together a fully working gcc when inside the booted hurd.  Also, the old approach did not require as much manual interaction at the start.  So, I reverted to the previous approach and made a couple of changes based on the work I had done.

Grab a tarball here: http://allanmcrae.com/hurd/crosshurd-20100224.tar.gz

I have not got the time to fully test this.  Everything in scripts/devel should build and scripts/devel/chfs is the remaining packages from the CHFS approach so should provide guidelines.  Mainly DESTDIR changes will be needed.

I am very time limited lately, so will not be working on this in the near future.  The likelihood of me working on it is the distant future is also low.  While the idea of Arch Hurd still appeals to me, the lack of any real active upstream is very discouraging and I have a few other ideas that I think would be better long term projects.

So good luck!  I will keep following this thread.

Offline

#263 2010-02-24 09:20:02

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: The Arch Hurd Project

Here it is:

get-sources

#!/bin/bash

source ./scripts/pkgver

cd $SRCDIR

# bash
if [ ! -f bash-$BASH_VER.tar.gz ]; then
  wget http://ftp.gnu.org/gnu/bash/bash-$BASH_VER.tar.gz
fi

if [ $BASH_PATCHLEVEL -gt 000 ]; then
  for p in $(seq -w 001 $BASH_PATCHLEVEL); do
      if [ ! -f bash${BASH_VER/.}-$p ]; then
        wget http://ftp.gnu.org/gnu/bash/bash-$BASH_VER-patches/bash${BASH_VER/.}-$p
      fi
  done
fi

# binutils
if [ ! -f binutils-$BINUTILS_VER.tar.bz2 ]; then
  wget http://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS_VER.tar.bz2
fi

# bison
if [ ! -f bison-$BISON_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/bison/bison-$BISON_VER.tar.gz
fi

# bzip2
if [ ! -f bzip2-$BZIP2_VER.tar.gz ]; then
  wget http://www.bzip.org/$BZIP2_VER/bzip2-$BZIP2_VER.tar.gz
fi

# cloog-ppl
if [ ! -f cloog-ppl-$CLOOG_PPL_VER.tar.gz ]; then
  wget ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-$CLOOG_PPL_VER.tar.gz
fi

# coreutils
if [ ! -f coreutils-$COREUTILS_VER.tar.gz ]; then
  wget http://ftp.gnu.org/gnu/coreutils/coreutils-$COREUTILS_VER.tar.gz
fi

# diffutils
if [ ! -f diffutils-$DIFFUTILS_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/diffutils/diffutils-$DIFFUTILS_VER.tar.gz
fi

# findutils
if [ ! -f findutils-$FINDUTILS_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/pub/gnu/findutils/findutils-$FINDUTILS_VER.tar.gz
fi

# file
if [ ! -f file-$FILE_VER.tar.gz ]; then
  wget ftp://ftp.astron.com/pub/file/file-$FILE_VER.tar.gz
fi

# flex
if [ ! -f flex-$FLEX_VER.tar.bz2 ]; then
  wget http://downloads.sourceforge.net/sourceforge/flex/flex-$FLEX_VER.tar.bz2
fi

# gawk
if [ ! -f gawk-$GAWK_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/gawk/gawk-$GAWK_VER.tar.gz
fi

# gcc
if [ ! -f gcc-core-$GCC_VER.tar.bz2 ]; then
  wget http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-core-$GCC_VER.tar.bz2
fi
if [ ! -f gcc-g++-$GCC_VER.tar.bz2 ]; then
  wget http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-g++-$GCC_VER.tar.bz2
fi

# gettext
if [ ! -f gettext-$GETTEXT_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VER.tar.gz
fi

# glibc
if [ ! -f glibc-$GLIBC_VER.tar.bz2 ]; then
  wget http://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VER.tar.bz2
fi

# gmp
if [ ! -f gmp-$GMP_VER.tar.bz2 ]; then
  wget ftp://ftp.gnu.org/gnu/gmp/gmp-$GMP_VER.tar.bz2
fi

# grep
if [ ! -f grep-$GREP_VER.tar.bz2 ]; then
  wget ftp://ftp.gnu.org/gnu/grep/grep-$GREP_VER.tar.bz2
fi

# grub
if [ ! -f grub-$GRUB_VER.tar.gz ]; then
  wget ftp://alpha.gnu.org/gnu/grub/grub-$GRUB_VER.tar.gz
fi

# gzip
if [ ! -f gzip-$GZIP_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/pub/gnu/gzip/gzip-$GZIP_VER.tar.gz
fi

# m4
if [ ! -f m4-$M4_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/m4/m4-$M4_VER.tar.gz
fi

# make
if [ ! -f make-$MAKE_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/make/make-$MAKE_VER.tar.gz
fi

# mpfr
if [ ! -f mpfr-$MPFR_VER.tar.bz2 ]; then
  wget http://mpfr.loria.fr/mpfr-current/mpfr-$MPFR_VER.tar.bz2
fi

# nano
if [ ! -f nano-$NANO_VER.tar.gz ]; then
  wget http://www.nano-editor.org/dist/v2.2/nano-$NANO_VER.tar.gz
fi

# ncurses
if [ ! -f ncurses-$NCURSES_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/pub/gnu/ncurses/ncurses-$NCURSES_VER.tar.gz
fi

# patch
if [ ! -f patch-$PATCH_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/patch/patch-$PATCH_VER.tar.gz
fi

# ppl
if [ ! -f ppl-$PPL_VER.tar.gz ]; then
  wget http://www.cs.unipr.it/ppl/Download/ftp/releases/$PPL_VER/ppl-$PPL_VER.tar.gz
fi

# sed
if [ ! -f sed-$SED_VER.tar.bz2 ]; then
  wget ftp://ftp.gnu.org/gnu/sed/sed-$SED_VER.tar.bz2
fi

# tar
if [ ! -f tar-$TAR_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/gnu/tar/tar-$TAR_VER.tar.gz
fi

# texinfo
if [ ! -f texinfo-$TEXINFO_VER.tar.gz ]; then
  wget ftp://ftp.gnu.org/pub/gnu/texinfo/texinfo-$TEXINFO_VER.tar.gz
fi

# xz-utils
if [ ! -f xz-$XZ_UTILS_VER.tar.gz ]; then
  wget http://tukaani.org/xz/xz-$XZ_UTILS_VER.tar.gz
fi

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

# gnumach-git
if [ -d $SRCDIR/gnumach ]; then
  cd $SRCDIR/gnumach && git pull origin
else
  cd $SRCDIR
  git clone git://git.sv.gnu.org/hurd/gnumach.git
fi

# hurd-git
if [ -d $SRCDIR/hurd ]; then
  cd $SRCDIR/hurd && git pull origin
else
  cd $SRCDIR
  git clone git://git.sv.gnu.org/hurd/hurd.git
fi

# libpthread-git
if [ -d $SRCDIR/libpthread ]; then
  cd $SRCDIR/libpthread && git pull origin
else
  cd $SRCDIR
  git clone git://git.sv.gnu.org/hurd/libpthread.git
fi

# mig-git
if [ -d $SRCDIR/mig ]; then
  cd $SRCDIR/mig && git pull origin
else
  cd $SRCDIR
  git clone git://git.sv.gnu.org/hurd/mig.git
fi

Offline

#264 2010-02-25 11:29:33

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

Allan wrote:

I took a quick look at this again today.   The "cross hurd from scratch" approach has booting issues, so it is probably easier hacking together a fully working gcc when inside the booted hurd.  Also, the old approach did not require as much manual interaction at the start.  So, I reverted to the previous approach and made a couple of changes based on the work I had done.

Grab a tarball here: http://allanmcrae.com/hurd/crosshurd-20100224.tar.gz

I have not got the time to fully test this.  Everything in scripts/devel should build and scripts/devel/chfs is the remaining packages from the CHFS approach so should provide guidelines.  Mainly DESTDIR changes will be needed.

I am very time limited lately, so will not be working on this in the near future.  The likelihood of me working on it is the distant future is also low.  While the idea of Arch Hurd still appeals to me, the lack of any real active upstream is very discouraging and I have a few other ideas that I think would be better long term projects.

So good luck!  I will keep following this thread.

Thanks, with this its a lot easier and i have a booting hurd smile.

But once I used MAKEDEV console hd0 hd0s1 … The filesystem is read-only on the next boot. Any Ideas ?

Offline

#265 2010-02-25 11:54:34

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

Re: The Arch Hurd Project

Never heard of that before...  Are you shutting down properly?  Perhaps it is staying rw after the fs check?

Offline

#266 2010-02-25 19:08:05

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

With fsysopts / --writable i can make it rw.

It seems there is a problem with ppl.

I get this:

libtool: link: warning: library `/home/alexander/workplace/archhurd/hurd/lib/libgmpxx.la' was moved.
/bin/grep: //lib/libgmp.la: No such file or directory
/bin/sed: can't read //lib/libgmp.la: No such file or directory
libtool: link: `//lib/libgmp.la' is not a valid libtool archive
make[2]: *** [libppl.la] Error 1
make[2]: Leaving directory `/home/alexander/workplace/archhurd/build/ppl-0.10.2/src'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/alexander/workplace/archhurd/build/ppl-0.10.2/src'

Offline

#267 2010-02-25 21:43:32

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

Re: The Arch Hurd Project

Easiest solution it to delete the libtool files (.la).   They are not needed.  Might have to recompile mpfr after deleting gmp's .la files.

Offline

#268 2010-02-27 09:47:02

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

I also had to delete the .la files of ppl.

I am trying now to compiling gcc for hurd. But I get this messages.

The directory that should contain system headers does not exist:
  /include
make[2]: *** [stmp-fixinc] Error 1
make[2]: Leaving directory `/home/alexander/workplace/archhurd/build/cross-gcc
-build/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/home/alexander/workplace/archhurd/build/cross-gcc
-build'
make: *** [install] Error 2

Last edited by Giselher (2010-02-27 10:10:44)

Offline

#269 2010-02-27 10:17:48

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

Re: The Arch Hurd Project

Hmm... there is a fix for that somewhere....

Do this in your source directory:

cp gcc/Makefile.in{,.orig}
sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in

That should stop fixincludes running a prevent that error.

Offline

#270 2010-02-27 10:26:36

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: The Arch Hurd Project

I had this same problem trying to compile gcc-4.2.4. After spending forever trying to work out what was causing it,
I finally tracked it down to "SYSTEM_HEADER_DIR" not being set properly in gcc/Makefile.in.

So here is the cheap hack I made to manually set it:

--- a/gcc/Makefile.in.orig      2010-02-25 20:45:22.897274306 +0000
+++ b/gcc/Makefile.in   2010-02-25 20:47:07.657262153 +0000
@@ -409,7 +409,7 @@
 # The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
 # Use single quotes here to avoid nested double- and backquotes, this
 # macro is also used in a double-quoted context.
-SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`
+SYSTEM_HEADER_DIR = /tools/include
 
 # Control whether to run fixproto and fixincludes.
 STMP_FIXPROTO = @STMP_FIXPROTO@

You while have to change the location it points to tho, since this was for the CHFS approach.


Also I keep get the blocksize too small error message. I'm using the instructions on the archhurh.org install page,
even tho I wasn't getting the error before when I followed them.

Edit: Allan I also tried that approach, but it still didn't work for me.

Last edited by bobdob (2010-02-27 10:27:34)

Offline

#271 2010-02-27 10:29:22

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

Offline

#272 2010-02-27 11:08:48

bobdob
Member
Registered: 2008-06-13
Posts: 138

Re: The Arch Hurd Project

Thanks, that fixed it.

Also, have far did you get your CHFS build to boot?

Offline

#273 2010-02-27 11:10:52

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

Re: The Arch Hurd Project

CHFS booted until right near the end of the boot process...  I could not figure out what was different.

Offline

#274 2010-02-27 11:52:35

Giselher
Member
From: Austria
Registered: 2010-02-02
Posts: 150
Website

Re: The Arch Hurd Project

I compiled gcc but i doesn,t work in hurd.

gcc says: crtbegin.o: No such file or directory

EDIT: My gcc-script: http://pastebin.com/X1afDH1b

Last edited by Giselher (2010-02-27 11:58:29)

Offline

#275 2010-02-27 11:58:57

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

Re: The Arch Hurd Project

Did you get anything of interest in the build output?   I seem to remember battling that in the past but I thought I had gotten around that issue with some patching to glibc...

Offline

Board footer

Powered by FluxBB