Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Pb cross-compilation sous Debian

2 réponses
Avatar
Willy
Bonjour,

Je travaille sous Debian Etch AMD64 et je souhaite compiler pour
l'architecture i386 (et pour powerpc ultérieurement). Le problème est
que je n'arrive pas à compiler GCC pour i386.

après avoir installé les paquets nécessaires, j'exécute les étapes
suivantes:


$ apt-get source gcc-4.1
$ cd gcc-4.1-4.1.1ds2
$ export GCC_TARGET=i386
$ debian/rules control
$ dpkg-buildpackage -rfakeroot -b > ../gcc.build 2>&1 || echo 'Build error'


j'obtiens le message d'erreur suivant:


willy@SuperMicro:~/tmp/gcc$ tail -n 50 gcc.build

checking how to run the C++ preprocessor...
/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/xgcc -shared-libgcc
-B/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc -nostdinc++
-L/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/i486-linux-gnu/64/libstdc++-v3/src
-L/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/i486-linux-gnu/64/libstdc++-v3/src/.libs
-B/usr/i486-linux-gnu/bin/ -B/usr/i486-linux-gnu/lib/ -isystem
/usr/i486-linux-gnu/include -isystem /usr/i486-linux-gnu/sys-include
-m64 -E
loading cache ./config.cache within ltconfig
checking host system type... x86_64-pc-linux-gnu
checking build system type... x86_64-pc-linux-gnu
checking for objdir... .libs
checking for /home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/xgcc
option to produce PIC... -fPIC -DPIC
checking if /home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/xgcc PIC
flag -fPIC -DPIC works... yes
checking if /home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/xgcc static
flag -static works... no
finding the maximum length of command line arguments... (cached) 49153
checking if /home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/xgcc
supports -c -o file.o... (cached) yes
checking if /home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/xgcc
supports -fno-rtti -fno-exceptions ... yes
checking whether the linker
(/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/collect-ld -m
elf_x86_64) supports shared libraries...
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking command to parse
/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/nm output... failed
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
appending configuration tag "CXX" to libtool
checking for exception model to use... call frame
checking for compiler with PCH support... yes
checking for enabled PCH... yes
checking for underlying I/O to use... stdio
checking how to run the C preprocessor...
/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/xgcc
-B/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build/./gcc/
-B/usr/i486-linux-gnu/bin/ -B/usr/i486-linux-gnu/lib/ -isystem
/usr/i486-linux-gnu/include -isystem /usr/i486-linux-gnu/sys-include
-m64 -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for C locale to use... gnu
checking for msgfmt... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for library containing gettext... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.
make[3]: *** [configure-target-libstdc++-v3] Error 1
make[3]: Leaving directory `/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2/build'
s=`cat status`; rm -f status; test $s -eq 0
make[1]: *** [stamps/05-build-stamp] Error 1
make[1]: Leaving directory `/home/willy/tmp/gcc/gcc-4.1-4.1.1ds2'
make: *** [stamps/05-build-stamp] Erreur 2

willy@SuperMicro:~/tmp/gcc$

J'ai cherché sur Google, mais je n'ai trouvé aucune information pouvant
m'aider et c'est pourquoi je sollicite votre aide.

Willy.

--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/DebFrFrenchLists
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to debian-user-french-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

2 réponses

Avatar
Serge Cavailles
Le vendredi 27 juin 2008 12:06, Willy a écrit :
Bonjour,



Bonjour,

Je travaille sous Debian Etch AMD64 et je souhaite compiler pour
l'architecture i386 (et pour powerpc ultérieurement). Le problème est
que je n'arrive pas à compiler GCC pour i386.

après avoir installé les paquets nécessaires, j'exécute les éta pes
suivantes:


$ apt-get source gcc-4.1
$ cd gcc-4.1-4.1.1ds2
$ export GCC_TARGET=i386
$ debian/rules control
$ dpkg-buildpackage -rfakeroot -b > ../gcc.build 2>&1 || echo 'Build
error'


j'obtiens le message d'erreur suivant:


:~/tmp/gcc$ tail -n 50 gcc.build


[...]
checking for library containing gettext... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.

:~/tmp/gcc$

J'ai cherché sur Google, mais je n'ai trouvé aucune information pouva nt
m'aider et c'est pourquoi je sollicite votre aide.



En cherchant moi aussi sur notre ami commun, je trouve
http://www2.pt.tu-clausthal.de/~alexp/arm/index.html

qui dit que
[citation]
It is crucial to use '--disable-shared'. Otherwize you'll get the following
error during make all:
checking for shared libgcc... configure: error: Link tests are not allowed
after GCC_NO_EXECUTABLES.
[/citation]

Souhaitant que ça puisse vous aider.
Cordialement
--
Serge


Willy.



--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/DebFrFrenchLists
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Avatar
Willy
Bonjour,

Merci pour votre réponse mais cela ne m' aide pas vraiment.
J'ai trouvé la variable "with_shared_libgcc" dans le fichier
debian/rules.defs que j'ai fixée à "no", mais cela ne marche toujours
pas. Apparemment le problème survient pendant la création de la cible
"libstdc++-v3". Avec les sources de GCC à la Debian, y a-t-il un moyen
de compiler tout sauf cette cible, puis la produire séparément afin de
mieux localiser le problème (car c'est vraiment long de tout compiler) ?
Avec dpkg-buildpackage, la compilation s'arrête et aucun paquet n' est créé.

Willy.

--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/DebFrFrenchLists
Vous pouvez aussi ajouter le mot ``spam'' dans vos champs "From" et
"Reply-To:"

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact