vendredi 3 janvier 2014

Crosstool-NG 1.19.0 et Make 4.0

Ce petit billet pour faire part des quelques modifications à apporter à la dernière release (1.19.0) de crosstool-NG pour créer une chaîne de compilation croisée pour la raspberry pi sur une distribution arch-linux x86_64.

Les outils abordés sont :

  • crosstool-NG version 1.19.0
  • eglibc version 2.16
  • GNU make version 4.0


Gestion de la nouvelle version de GNU make


La première erreur est que la version 4.0 de make n'est pas gérée par eglibc, donc il va falloir modifier le fichier configure pour remédier à cette erreur.

[INFO ]  Installing kernel headers: done in 6.93s (at 06:41)
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files

...................

[CFG  ]    checking for arm-bcm2708-linux-gnueabi-gcc... (cached) arm-bcm2708-linux-gnueabi-gcc    
[CFG  ]    checking version of arm-bcm2708-linux-gnueabi-gcc    ... 4.8.2, ok
[CFG  ]    checking for gnumake... no
[CFG  ]    checking for gmake... no
[CFG  ]    checking for make... make
[CFG  ]    checking version of make... 4.0, bad
[CFG  ]    checking for gnumsgfmt... no
[CFG  ]    checking for gmsgfmt... no
[CFG  ]    checking for msgfmt... msgfmt
[CFG  ]    checking version of msgfmt... 0.18.3, ok
[CFG  ]    checking for makeinfo... makeinfo
[CFG  ]    checking version of makeinfo... 5.2, ok
[CFG  ]    checking for sed... sed
[CFG  ]    checking version of sed... v. ?.??, bad
[CFG  ]    checking for arm-bcm2708-linux-gnueabi-readelf... arm-bcm2708-linux-gnueabi-readelf
[CFG  ]    checking for arm-bcm2708-linux-gnueabi-nm... nm
[CFG  ]    checking for autoconf... autoconf
[CFG  ]    checking whether autoconf works... yes
[ERROR]    configure: error: 
[CFG  ]    *** These critical programs are missing or too old: make
[CFG  ]    *** Check the INSTALL file for required versions.
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@347]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc_start_files[scripts/build/libc/glibc-eglibc.sh-common@60]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      '/home/vbenoit/PERSO/raspberry_pi/crosstool-ng/install/share/doc/crosstool-ng/ct-ng.1.19.0/B - Known issues.txt'
[ERROR]  
[ERROR]  (elapsed: 6:46.20)

Voici le patch (eglibc_2_16_make_4.patch) à appliquer au fichier configure de eglibc pour résoudre l'erreur.

--- a/configure	2014-01-03 14:08:59.027618540 +0100
+++ b/configure	2014-01-03 14:10:24.897615610 +0100
@@ -4936,7 +4936,7 @@
   ac_prog_version=`$MAKE --version 2&>1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    3.79* | 3.[89]*)
+    3.79* | 3.[89]* | 4.0*)
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;


Erreur tls_model


Une autre erreur peut survenir surtout sur avec une distribution 64 bits arch-linux avec un message d'erreur de ce type :

[ERROR] configure: error: support for the tls_model attribute is required

Il y aurait quelques conflits avec les options -mcpu=arm1176jzf-s et -march=armv6z qui sont deux attributs redondants. En supprimant le premier de la configuration dans le menuconfig (Target Options -> Emit assembly for CPU et Target Options -> Tune for CPU), cela résout le problème.




Aucun commentaire:

Enregistrer un commentaire