Compilation ipcop-1.4.18

Forum traitant de la distribution sécurisée montante nommée IP cop et basée sur la distribution Smoothwall. C'est à l'heure actuelle le forum le plus actif du site.

Modérateur: modos Ixus

Compilation ipcop-1.4.18

Messagepar philippe_PMA » 18 Déc 2007 21:09

Bonjour.

J'essaye de compiler IpCop en version 1.4.18 à partir d'une Fedora 8.

Ci-dessous les commandes que j'ai faites :
Code: Tout sélectionner
mv
cd /root
chown root.root ipcop-1.4.18-sources.tgz
chmod 700 ipcop-1.4.18-sources.tgz
tar xvfz ipcop-1.4.18-sources.tgz
cd ipcop-1.4.18
chmod 755 make.sh
./make.sh getothersrc
./make.sh gettoolchain
./make.sh build


Le résultat de la dernière commande est le suivant :
Code: Tout sélectionner
[root@localhost ipcop-1.4.18]# ./make.sh build
déc 18 18:55:45: Machine is ix86 (or equivalent)
déc 18 18:55:45: Restore from ipcop-1.4.11-toolchain-i686.tar.gz
déc 18 18:55:49: Resetting our nice level to 10
déc 18 18:55:49: Checking if we're running as root user
déc 18 18:55:49: Checking for necessary space on disk
déc 18 18:55:49: Building Linux From Scratch system
Dec 18 18:55:49: Stage2 linux base build
Dec 18 18:55:49: Building stage2
ERROR: Building stage2
       Check /root/ipcop-1.4.18/log/_build.base.log for errors if applicable


Et le contenu de /root/ipcop-1.4.18/log/_build.base.log :
Code: Tout sélectionner
Dec 18 18:55:49: Stage2 linux base build
Dec 18 18:55:49: Building stage2
Inconsistency detected by ld.so: rtld.c: 1221: dl_main: Assertion `pt_load_num || (void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!


Quelqu'un a une idée ?

Merci.
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar philippe_PMA » 18 Déc 2007 22:26

Je viens de refaire les mêmes manipulations avec la version 1.4.16 d'IpCop.
Et j'ai le même résultat.
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar tomtom » 18 Déc 2007 22:35

Tu as essayé de suivre le howto : http://ipcop.org/modules.php?file=index ... ingHowtoFR

??


t.
One hundred thousand lemmings can't be wrong...
Avatar de l’utilisateur
tomtom
Amiral
Amiral
 
Messages: 6035
Inscrit le: 26 Avr 2002 00:00
Localisation: Paris

Messagepar philippe_PMA » 18 Déc 2007 22:42

tomtom a écrit:Tu as essayé de suivre le howto : http://ipcop.org/modules.php?file=index ... ingHowtoFR

??


t.


J'ai suivi la version en anglais. Mais c'est pareil.
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar tomtom » 18 Déc 2007 22:43

Code: Tout sélectionner
./make.sh prefetch


ne serait-il pas utile ?

t.
One hundred thousand lemmings can't be wrong...
Avatar de l’utilisateur
tomtom
Amiral
Amiral
 
Messages: 6035
Inscrit le: 26 Avr 2002 00:00
Localisation: Paris

Messagepar philippe_PMA » 18 Déc 2007 22:45

De mieux en mieux. Je me suis dit allons voir le source incriminé.
Mais il est introuvable !!!

Code: Tout sélectionner
[root@localhost ipcop-1.4.18]# find . -name rtld.c -print
[root@localhost ipcop-1.4.18]#




:?: :!:
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar philippe_PMA » 18 Déc 2007 22:52

tomtom a écrit:
Code: Tout sélectionner
./make.sh prefetch


ne serait-il pas utile ?

t.


Pas sur, dans la version anglaise du I PCop Building Howto (ici) il y est indiqué la commande ./make.sh getothersrc qui doit donner le même résultat que ./make.sh prefetch

De ce que je comprends, ./make.sh prefetch récupére un par un tout ce qu'il faut et ./make.sh getothersrc le fait en une seule fois ...
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar philippe_PMA » 18 Déc 2007 22:59

Sans tout effacer (donc en fesant confiance aux dépendances du make), j'ai tenté un ./make.sh prefetch suivi d'un ./make.sh build.
Mais le résultat est identique.
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar tomtom » 18 Déc 2007 23:06

Hum, je ne suis pas connaisseur, mais le preftech a l'air de faire un certain nombre de choses interessantes...

Tu devrais commencer par unmake.sh clean et suivre le howto !


t.
One hundred thousand lemmings can't be wrong...
Avatar de l’utilisateur
tomtom
Amiral
Amiral
 
Messages: 6035
Inscrit le: 26 Avr 2002 00:00
Localisation: Paris

Messagepar philippe_PMA » 19 Déc 2007 00:14

tomtom a écrit:Hum, je ne suis pas connaisseur, mais le preftech a l'air de faire un certain nombre de choses interessantes...

Tu devrais commencer par unmake.sh clean et suivre le howto !


t.


J'ai suivi le how to anglais qui est plus complet que le how to français.
Mais je recommencerais avec le howto français.
Ainsi que la manip que tu indiques.

Mais après un bon dodo, métro, boulot ;-)
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar tomtom » 19 Déc 2007 00:23

Je viens de faire qques essais, mais le DNS de free a l'air malade ce soir, donc plein de téléchargements se plantent en cours de compil, dur dur !

ANyway, en regardant d'un peu plus près ta log d'erreur, j'ai l'impression que c'est au niveau de ta libc et donc de ton GCC qu'il y a un problème...

As-tu installé les build-essentials ?


Bonne nuit :p

t.
One hundred thousand lemmings can't be wrong...
Avatar de l’utilisateur
tomtom
Amiral
Amiral
 
Messages: 6035
Inscrit le: 26 Avr 2002 00:00
Localisation: Paris

Messagepar philippe_PMA » 19 Déc 2007 11:29

tomtom a écrit:...
ANyway, en regardant d'un peu plus près ta log d'erreur, j'ai l'impression que c'est au niveau de ta libc et donc de ton GCC qu'il y a un problème...

As-tu installé les build-essentials ?
...
t.


Je ne pense que le problème soit lié à mon gcc ou ma libc.

La commande ./make.sh gettoolchain est censé me permettre d'être autonome de ce qui se trouve sur mon PC ...
Mais j'ai peut-être pas tout compris.
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar philippe_PMA » 19 Déc 2007 22:44

bon, j'ai suivi le howto français.

Super, ça plante pas pareil ;-)

J'ai fais :
Code: Tout sélectionner
cd /root
chown root.root ipcop-1.4.18-sources.tgz
chmod 700 ipcop-1.4.18-sources.tgz
tar xvfz ipcop-1.4.18-sources.tgz
cd ipcop-1.4.18
chmod 755 make.sh
./make.sh prefetch
./make.sh build


Le résultat du ./make.sh build :

Code: Tout sélectionner
# ./make.sh build
déc 19 19:12:09: Machine is ix86 (or equivalent)
déc 19 19:12:09: Full toolchain compilation
déc 19 19:12:09: Resetting our nice level to 10
déc 19 19:12:09: Checking if we're running as root user
déc 19 19:12:09: Checking for necessary space on disk
déc 19 19:12:09: Building Linux From Scratch system
Dec 19 19:12:09: Stage1 toolchain build
Dec 19 19:12:09: Building ccache
Dec 19 19:12:13: Building sed LFS_PASS=1
Dec 19 19:12:26: Building m4 LFS_PASS=1
Dec 19 19:12:31: Building bison LFS_PASS=1
Dec 19 19:12:51: Building flex LFS_PASS=1
Dec 19 19:13:01: Building binutils LFS_PASS=1
ERROR: Building binutils LFS_PASS=1
       Check /root/ipcop-1.4.18/log/_build.toolchain.log for errors if applicable


La fin du fichier root/ipcop-1.4.18/log/_build.toolchain.log
Code: Tout sélectionner
...
          gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat  /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/xstrdup.c -o pic/xstrdup.o; \
        else true; fi
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/xstrdup.c -o xstrdup.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
if [ x"" != x ]; then \
          gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat  /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/xstrerror.c -o pic/xstrerror.o; \
        else true; fi
if [ x"" != x ]; then \
          gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat  /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/xstrndup.c -o pic/xstrndup.o; \
        else true; fi
gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/xstrerror.c -o xstrerror.o
gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/xstrndup.c -o xstrndup.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
if [ x"" != x ]; then \
          gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat  /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/mkstemps.c -o pic/mkstemps.o; \
        else true; fi
gcc -c -DHAVE_CONFIG_H -O2 -mcpu=i386 -march=i386 -pipe -fomit-frame-pointer  -I. -I/root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/../include  -W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes -Wc++-compat /root/ipcop-1.4.18/build/usr/src/binutils-2.16.91.0.7/libiberty/mkstemps.c -o mkstemps.o
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
rm -f ./libiberty.a pic/./libiberty.a
ar rc ./libiberty.a \
          ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strsignal.o ./ternary.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o  ./mkstemps.o
ranlib ./libiberty.a
if [ x"" != x ]; then \
          cd pic; \
          ar rc ./libiberty.a \
            ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strsignal.o ./ternary.o ./unlink-if-ordinary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o  ./mkstemps.o; \
          ranlib ./libiberty.a; \
          cd ..; \
        else true; fi
make[3]: Leaving directory `/root/ipcop-1.4.18/build/usr/src/binutils-build/libiberty'
make[2]: Leaving directory `/root/ipcop-1.4.18/build/usr/src/binutils-build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/ipcop-1.4.18/build/usr/src/binutils-build'
make: *** [/root/ipcop-1.4.18/log/binutils-2.16.91.0.7-tools1] Error 2


Retour à la case départ ...
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar philippe_PMA » 20 Déc 2007 23:58

Bon, je suis sur que mon problème vient de la version de gcc installée sur mon système.

Code: Tout sélectionner
[root@localhost ipcop-1.4.18]# gcc -v
Utilisation des specs internes.
Target: i386-redhat-linux
Configuré avec: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=i386-redhat-linux
Modèle de thread: posix
version gcc 4.1.2 20070925 (Red Hat 4.1.2-33)


Ce que je comprends pas c'est qu'en fesant la commande ./make.sh gettoolchain celà aurait dû me permettre de ne pas utiliser mon gcc mais celui préparer "par IpCop".

Quelqu'un peut t'il m'aider ?
philippe_PMA
Major
Major
 
Messages: 73
Inscrit le: 18 Déc 2007 21:01

Messagepar Gesp » 21 Déc 2007 09:29

./make.sh getothersrc
./make.sh gettoolchain
./make.sh build

C'est ce qui devrait fonctionner dans tous les cas.

Inconsistency detected by ld.so: rtld.c: 1221: dl_main: Assertion `pt_load_num || (void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!

A priori, le problème ne vient pas de la version de gcc.
En debian etch, je suis en 4.1.2 et en gentoo aussi (vu qu'elle date un peu).

Pour compiler la toolchain, j'ai fait des corrections en cvs après 1.4.18.
PATH doit être redéfini avant de commencer à compiler.
Tu peux changer make.sh dans la partie toolchain() par
Code: Tout sélectionner
    echo -ne "`date -u '+%b %e %T'`: Stage1 toolchain build \n" | tee -a $LOGFILE
    ORG_PATH=$PATH
    NATIVEGCC=`gcc -dumpversion`
    export GCCmajor=${NATIVEGCC:0:1}
    export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
    if [ -f $BASEDIR/log/ccache-* ]; then
       echo "Warning : you can't partially rebuild some parts of the toolchain cleanly."
       echo "Preferably before each toolchain build, use:"
       echo "./make.sh clean"
    fi
    lfsmake1 ccache
    # Build sed now, as we use some extensions
    lfsmake1 sed   LFS_PASS=1
    # on very old system, more recent m4, bison, flex are needed to build binutils
    lfsmake1 m4      LFS_PASS=1
    lfsmake1 bison   LFS_PASS=1
    lfsmake1 flex   LFS_PASS=1
    # version build on toolchain depend of installed gcc
    lfsmake1 binutils   LFS_PASS=1
Avatar de l’utilisateur
Gesp
Amiral
Amiral
 
Messages: 4481
Inscrit le: 29 Déc 2002 01:00

Suivant

Retour vers IPCop

Qui est en ligne ?

Utilisateur(s) parcourant actuellement ce forum : Aucun utilisateur inscrit et 1 invité