Loggytronic Forum

VOMP => VOMP General / MVP => Topic started by: Fourty2 on February 10, 2007, 17:16:21

Title: Changes to development script or enrivonment...
Post by: Fourty2 on February 10, 2007, 17:16:21
Hello Chris,

can you please inform us, which changes are necessary to compile Rev. 2.6 dongles...
(based on Devscript-3)

Thanks in advance,
42.
Title: Re: Changes to development script or enrivonment...
Post by: Chris on February 11, 2007, 01:29:43
I have been working on that today. The new makedevenv-4 script is running on my test box right now, if it works I will upload it and annouce it. Most of it has changed :)
Title: Re: Changes to development script or enrivonment...
Post by: Chris on February 11, 2007, 02:49:06
Hmm.... Surprise surprise. It doesn't work.
Title: Re: Changes to development script or enrivonment...
Post by: Chris on February 13, 2007, 02:59:23
It is done and posted on the website. Could you report if it works on your system, and what your system is?
Title: Re: Changes to development script or enrivonment...
Post by: Fourty2 on February 13, 2007, 09:03:56
Quote from: Chris on February 13, 2007, 02:59:23
It is done and posted on the website. Could you report if it works on your system, and what your system is?

Debian 3.1 (Sarge), Kernel 2.6.20 and some package "upgrades" useful for vdr-plugins.

Sorry, not running... (User: root)

Last words:

crosstool-0.43/x86_64-static.dat
++ pwd
+ TARBALLS_DIR=/usr/local/src/VoMP/crosstool/downloads
++ pwd
+ RESULT_TOP=/usr/local/src/VoMP/crosstool
+ export TARBALLS_DIR RESULT_TOP
+ GCC_LANGUAGES=c,c++
+ export GCC_LANGUAGES
+ cd crosstool-0.43
++ cat powerpc-405.dat gcc-3.4.5-glibc-2.2.5.dat
+ eval TARGET=powerpc-405-linux-gnu 'TARGET_CFLAGS="-O' '-mcpu=405"' 'GCC_EXTRA_CONFIG="--with-cpu=405' '--enable-cxx-flags=-mcpu=405"' 'GLIBC_EXTRA_CONFIG="$GLIBC_EXTRA_CONFIG' '--without-fp"' BINUTILS_DIR=binutils-2.15 GCC_DIR=gcc-3.4.5 GLIBC_DIR=glibc-2.2.5 LINUX_DIR=linux-2.6.8 GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.2.5 'EXTRA_TARGET_CFLAGS="-fno-unit-at-a-time"' sh all.sh --notest
++ TARGET=powerpc-405-linux-gnu
++ TARGET_CFLAGS=-O -mcpu=405
++ GCC_EXTRA_CONFIG=--with-cpu=405 --enable-cxx-flags=-mcpu=405
++ GLIBC_EXTRA_CONFIG= --without-fp
++ BINUTILS_DIR=binutils-2.15
++ GCC_DIR=gcc-3.4.5
++ GLIBC_DIR=glibc-2.2.5
++ LINUX_DIR=linux-2.6.8
++ GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.2.5
++ EXTRA_TARGET_CFLAGS=-fno-unit-at-a-time
++ sh all.sh --notest
DEJAGNU not set, so not running any regression tests
GLIBC_ADDON_OPTIONS not set, so building all glibc add-on's
KERNELCONFIG not set, so not configuring linux kernel
+ TOOLCOMBO=gcc-3.4.5-glibc-2.2.5
++ pwd
+ BUILD_DIR=/usr/local/src/VoMP/crosstool/crosstool-0.43/build/powerpc-405-linux-gnu/gcc-3.4.5-glibc-2.2.5
++ pwd
+ TOP_DIR=/usr/local/src/VoMP/crosstool/crosstool-0.43
+ test -z ''
+ SRC_DIR=/usr/local/src/VoMP/crosstool/crosstool-0.43/build/powerpc-405-linux-gnu/gcc-3.4.5-glibc-2.2.5
+ echo 'SRC_DIR not set, so source tarballs will be unpacked in the build directory'
SRC_DIR not set, so source tarballs will be unpacked in the build directory
+ abort 'Don'\''t run all.sh or crosstool.sh as root, it'\''s dangerous'
+ echo 'Don'\''t' run all.sh or crosstool.sh as root, 'it'\''s' dangerous
Don't run all.sh or crosstool.sh as root, it's dangerous
+ exec false


Fourty2
Title: Re: Changes to development script or enrivonment...
Post by: Fourty2 on February 13, 2007, 09:19:25
Hello,

Crosstool build aborts because of a "if user is root" check in all.sh.
After a small change everything runs as expected..  ;D

Fourty2
Title: Re: Changes to development script or enrivonment...
Post by: davep on February 13, 2007, 21:28:45
Build fails on Mandriva 2007 because the gcc version is 4.1.1 - not the required 3.x.

checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for pwd... /bin/pwd
checking build system type... i686-pc-linux-gnu
checking for powerpc-405-linux-gnu-gcc... gcc
checking version of gcc... 4.1.1, bad
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.81, ok
configure: error:
*** These critical programs are missing or too old:gcc
*** Check the INSTALL file for required versions.

Dave
Title: Re: Changes to development script or enrivonment...
Post by: carsten on February 13, 2007, 21:54:22
Chris,

I am just looking into setting up the environment. On my Debian etch (which I once upgraded from a sarge), I have
both: gcc-4.1 and gcc-3.3 available. The Debain README says (and I checked that), a gcc-3.3 would do it, if I need
this version. They recommend to do a make CC=gcc-3.3 in such a case. Does this help in any way?

Anyway, I just started the makedev script to see what it will report for me. Give you the result tomorrow...

BR,
Carsten.
Title: Re: Changes to development script or enrivonment...
Post by: Chris on February 13, 2007, 22:45:40
It's crosstool that requires gcc 3 and not 4, so there's nothing I can do about it, except make the script more intelligent to reject gcc 4. There are so many scripts involved that I wouldn't like to say if setting CC=gcc-3.3 in one place would work. I wonder if there is a way for the script to find the gcc version and reject it at the start rather than ploughing half way through crosstool before failing...
Title: Re: Changes to development script or enrivonment...
Post by: carsten on February 13, 2007, 22:56:37
Hey Chris,

just wanted to go to bed and found what we expected:

Quote+ CC=gcc
+ /space/vomp/crosstool/crosstool-0.43/build/powerpc-405-linux-gnu/gcc-3.4.5-glibc-2.2.5/glibc-2.2.5/configure --prefix=/usr --build=i686-pc-linux-gnu --host=powerpc-405-linux-gnu --without-cvs --disable-sanity-checks --with-headers=/space/vomp/crosstool/gcc-3.4.5-glibc-2.2.5/powerpc-405-linux-gnu/powerpc-405-linux-gnu/include --enable-hacker-mode
creating cache ./config.cache
checking host system type... powerpc-405-linux-gnu
checking sysdep dirs... sysdeps/powerpc/elf sysdeps/unix/sysv/linux/powerpc sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/powerpc sysdeps/unix sysdeps/posix sysdeps/powerpc/fpu sysdeps/powerpc sysdeps/wordsize-32 sysdeps/ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/powerpc/soft-fp sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for pwd... /bin/pwd
checking build system type... i686-pc-linux-gnu
checking for powerpc-405-linux-gnu-gcc... gcc
checking version of gcc... 4.1.2, bad
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.81, ok
configure: error:
*** These critical programs are missing or too old:gcc
*** Check the INSTALL file for required versions.

OK, when you tell me it's not possible to overwrite the CC=gcc in the top of the quote, then it will be like this. I am not an expert on cross compiling. But wouldn't a check on ls -l /usr/bin/gcc give something that you could analyze on it's validity?

Carsten.
Title: Re: Changes to development script or enrivonment...
Post by: Chris on February 13, 2007, 23:18:42
The script could use readlink to find the real gcc binary, but I don't know if it's just Debian based distros that do it like that. Also I don't know how many results I would need to check for, i.e. which versions of gcc exist and which are good and bad.
Title: Re: Changes to development script or enrivonment...
Post by: sirwio on February 13, 2007, 23:48:24
Script runs fine on my gentoo development box wich is fairly up to date. Good work!!!

- Magnus
Title: Re: Changes to development script or enrivonment...
Post by: torsten on February 14, 2007, 13:15:03
@carsten:

It is a bug in the crosstool-patches for gcc-3.4.5-glibc-2.2.5. They work only with gcc-versions < 4.1. Have a look at a patch with "gcc" and "4.0" in its name. There is a expression like 4.0*. Substitute it with 4.* or 4.[012]*. I am not sure, whether this kind of pattern matching is used. You should give it a try. After the modification of the patch crosstool builds fine.

- Torsten
Title: Re: Changes to development script or enrivonment...
Post by: Harry on February 14, 2007, 14:55:13
success on debian 3.1 (knoppix 3.6) in a QEMU VM.

funny though... i had to configure 256 MB of RAM for the VM.
with only 128 MB (and no swap) the build process stopped
suddenly. can't tell exactly why... but saw a "ar: killed" somewhere
in the text-maze. tried that twice.

well.. what the heck.
cheers
Harry
Title: Re: Changes to development script or enrivonment...
Post by: carsten on February 14, 2007, 15:44:19
Thanks Torsten,

as an alternative, I set up update-alternative and switched so that gcc will use gcc-3.3 now. We will
know this evening, whether it works. I intended to set up a vm with vmware and a Debian sarge
before I understood what update-alternative does and how to configure it for my system.

Looks pretty well for now. At least, it jumped over the bad bad gcc-4.1 thingy...

Regards,
Carsten.
Title: Re: Changes to development script or enrivonment...
Post by: carsten on February 14, 2007, 16:38:36
Hi,

I was curious about Torsten's comment and checked. The file we are talking about is in the
crosstool-0.43.tar.gz archive:

 
Quotecrosstool-0.43/patches/glibc-2.2.5/glibc-2.2.5-allow-gcc-4.0-configure.patch

and it should read like this:

Fixes
checking version of powerpc-405-linux-gnu-gcc ... 4.0.0, bad
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.80, ok
configure: error:
*** These critical programs are missing or too old:gcc


--- glibc-2.2.5/configure.old   2005-03-10 00:23:46.374213600 -0800
+++ glibc-2.2.5/configure       2005-03-10 00:25:13.313996744 -0800
@@ -1476,7 +1476,7 @@
   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*
)
+    *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|4.[012]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9
]|sgicc-*)
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;



The patched line is in the lower third and reads (change marked in red):

+    *gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|4.[012]*|cygnus-2.9...

because, as Torsten pointed out, it won't allow compiler past 4.0 to be used. I guess this would fix our problem,
but I am actually checking it out (had to interrupt my process based on gcc-3.3, but I think it's worth it...).

I will keep you informed here...

BR,
Carsten.
Title: Re: Changes to development script or enrivonment...
Post by: carsten on February 14, 2007, 21:07:24
Good News!  :)

It seems the patch will allow us to use also compiler > 3.3 (I tested with Debian 4.1.1-21, which is 4.1.2 prerelease).

I was able to create a dongle and it works perfectly.

Chris, when I find your email, I will mail you that one file...maybe you can change it in the package.

Thanks Torsten for pointing that out!

Best Regards,
Carsten.
Title: Re: Changes to development script or enrivonment...
Post by: davep on February 18, 2007, 19:58:14
Also working on my Mandriva box after applying the crosstool fix.

One other problem when building the NFS-mount version. While the VOMP kernel is built locally, the modules are supplied by the nfs tarball, and there is a version mismatch:

./insmods.sh
Using /lib/modules/2.4.31/misc/os_core.o
insmod: kernel-module version mismatch
        /lib/modules/2.4.31/misc/os_core.o was compiled for kernel version 2.4.31-v1.1-hcwmvp
        while this kernel is version 2.4.31.

A quick fix is to add the "-f" option to the insmod lines in insmod.sh.