# [TOOLCHAIN] Problèmes de compilation (résolu)

## Ascodas

Salut,

Sur un portable que je n'utilise pas tous les jours, aucune compilation n'arrive au bout (configure: error: C compiler cannot create executables) et ceci est surement du à une update d'il y a qque semaines (peut-être un oubli de fix_libtool_files ???) par ex. :

```
 * Removing useless C++ checks ...                                                                                                                                                                                                                                       [ ok ]

>>> Source unpacked in /var/tmp/portage/sys-devel/libtool-1.5.26/work

>>> Compiling source in /var/tmp/portage/sys-devel/libtool-1.5.26/work/libtool-1.5.26 ...

 * econf: updating libtool-1.5.26/libltdl/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating libtool-1.5.26/libltdl/config.sub with /usr/share/gnuconfig/config.sub

 * econf: updating libtool-1.5.26/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating libtool-1.5.26/config.sub with /usr/share/gnuconfig/config.sub

./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... /bin/mkdir -p

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc

checking for C compiler default output file name... 

configure: error: in `/var/tmp/portage/sys-devel/libtool-1.5.26/work/libtool-1.5.26':

configure: error: C compiler cannot create executables

See `config.log' for more details.

!!! Please attach the following file when seeking support:

!!! /var/tmp/portage/sys-devel/libtool-1.5.26/work/libtool-1.5.26/config.log

 * 

 * ERROR: sys-devel/libtool-1.5.26 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 2181:  Called _eapi0_src_compile

 *               ebuild.sh, line  598:  Called econf

 *               ebuild.sh, line  534:  Called die

 * The specific snippet of code:

 *            die "econf failed"

 *  The die message:

 *   econf failed

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-devel/libtool-1.5.26/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/libtool-1.5.26/temp/environment'.

 * 

>>> Failed to emerge sys-devel/libtool-1.5.26, Log file:

>>>  '/var/tmp/portage/sys-devel/libtool-1.5.26/temp/build.log'

 * Messages for package sys-devel/libtool-1.5.26:

 * 

 * ERROR: sys-devel/libtool-1.5.26 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 2181:  Called _eapi0_src_compile

 *               ebuild.sh, line  598:  Called econf

 *               ebuild.sh, line  534:  Called die

 * The specific snippet of code:

 *            die "econf failed"

 *  The die message:

 *   econf failed

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-devel/libtool-1.5.26/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/libtool-1.5.26/temp/environment'.

 * 

[root@t40p ascodas]$ 
```

```
ascodas@t40p ~ $ gcc-config -l

 [1] i686-pc-linux-gnu-4.3.2 *

ascodas@t40p ~ $ 
```

```

ascodas@t40p ~ $ emerge --info

Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.27-gentoo-r1 i686)

=================================================================

System uname: Linux-2.6.27-gentoo-r1-i686-Intel-R-_Pentium-R-_M_processor_1600MHz-with-glibc2.0

Timestamp of tree: Sun, 26 Jul 2009 08:45:02 +0000

ccache version 2.4 [disabled]

app-shells/bash:     3.2_p39

dev-lang/python:     2.4.4-r13, 2.5.4-r3

dev-python/pycrypto: 2.0.1-r8

dev-util/ccache:     2.4-r7

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O3 -march=pentium-m -mtune=pentium-m -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O3 -march=pentium-m -mtune=pentium-m -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ http://mirror.cambrium.nl/pub/os/linux/gentoo/ http://mirror.ovh.net/gentoo-distfiles/"

LANG="fr_FR.utf8"

LC_ALL="fr_FR.utf8"

LDFLAGS="-Wl,-O1"

LINGUAS="fr fr_FR"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X a52 aac aalib acl acpi alsa apache2 ati bash-completion berkdb bluetooth bzip2 cdparanoia cdrom cli cracklib crypt cups dbus dri dvd dvdread encode ffmpeg flac fortran gdbm gphoto2 gpm gtk hal i8x0 iconv ipv6 irda isdnlog jpeg libcaca mad matroska midi mod_php mp3 mpc mplayer mudflap musepack musicbrainz mysql ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre pdf perl png pppd python quicktime readline reflection samba scanner session spl ssl sysfs tcpd tiff unicode usb vorbis wifi win32codecs x86 xorg xv xvid zlib" ALSA_CARDS="snd_intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr fr_FR" USERLAND="GNU" VIDEO_CARDS="ati radeon"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

ascodas@t40p ~ $ 
```

J'ajoute :

 - que mon gcc peut compiler un simple "hello world"

 - que mon dispatch-conf est vide.

 - que j'ai eu des problemes de libstdc résolus en recompilant autoconf et automake (les seuls paquets à avoir compilé)

Merci pour vos idées.Last edited by Ascodas on Sat Aug 01, 2009 2:08 pm; edited 1 time in total

----------

## Picani

Alors juste comme ça : enlève -mtune=pentium-m dans CFLAGS et CXXFLAGS. Je dis ça parce que -mtune=core2 me faisait cracher toutes mes compilations ... Le problème vient peut-être de l'option -mtune de GCC.

----------

## Ascodas

nope rien a y faire, j'avais déja joué avec les options passé a gcc, le CFLAGS initial était 

```
CFLAGS="-O3 -march=pentium-m -mtune=pentium-m -pipe -ftracer -fomit-frame-pointer  -momit-leaf-frame-pointer"
```

Je l'avais réduit sans résultats à :

```

CFLAGS="-O3 -march=pentium-m -fomit-frame-pointer"
```

Par exemple la compil de gcc stoppe :

```
updating cache ../config.cache

configure: creating ./config.status

config.status: creating Makefile

config.status: creating testsuite/Makefile

config.status: creating config.h

config.status: executing default commands

make[2]: quittant le répertoire « /var/tmp/portage/sys-devel/gcc-4.3.2-r3/work/build »

make[1]: *** [stage1-bubble] Erreur 2

make[1]: quittant le répertoire « /var/tmp/portage/sys-devel/gcc-4.3.2-r3/work/build »

make: *** [bootstrap-lean] Erreur 2

 * 

 * ERROR: sys-devel/gcc-4.3.2-r3 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 4811:  Called toolchain_src_compile

 *             environment, line 5337:  Called gcc_src_compile

 *             environment, line 3065:  Called gcc_do_make

 *             environment, line 2855:  Called die

 * The specific snippet of code:

 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";

 *  The die message:

 *   emake failed with bootstrap-lean

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.3.2-r3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.3.2-r3/temp/environment'.

 * 

>>> Failed to emerge sys-devel/gcc-4.3.2-r3, Log file:

>>>  '/var/tmp/portage/sys-devel/gcc-4.3.2-r3/temp/build.log'

 * Messages for package sys-devel/gcc-4.3.2-r3:

 * 

 * ERROR: sys-devel/gcc-4.3.2-r3 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 4811:  Called toolchain_src_compile

 *             environment, line 5337:  Called gcc_src_compile

 *             environment, line 3065:  Called gcc_do_make

 *             environment, line 2855:  Called die

 * The specific snippet of code:

 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";

 *  The die message:

 *   emake failed with bootstrap-lean

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.3.2-r3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.3.2-r3/temp/environment'.

 * 

[root@t40p ascodas]$ 
```

avec des erreurs lors du configure :

```
checking for sys/sysctl.h... checking for suffix of object files... configure: error: C compiler cannot create executables

See `config.log' for more details.
```

```
checking whether time.h and sys/time.h may both be included... make[2]: *** [configure-stage1-intl] Erreur 77

make[2]: *** Attente des tâches non terminées....

yes
```

```
checking for bsearch... make[2]: *** [configure-stage1-libiberty] Erreur 1

yes

checking for bzero... yes
```

de manière générale il y a toujours un "C compiler cannot create executables" avec l'ensemble des programmes que je tente de compiler.

----------

## boozo

'alute

tu as essayé de simplement baisser le niveau d'optimisation avec i.e. : -O2 -march=pentium-m -pipe et pour satisfaire aux bonnes pratiques (voire faire plaisir à Picani ^^) en mettant aussi le MAKEOPTS à 1 ?

Edit n : vraiment temps de rentrer moi... :s 

----------

## Picani

Merde j'avais pas vu le -03 ... Lors d'une première installation l'année dernière (oui je sais le contexte spatio-temporel n'est pas du tout le même) rien n'avait marché avec. Mais je vais pas me mouiller : le problème vient de MAKEOPTS pour la recompilation de GCC   :Cool:  (hum hum ...)

Sinon encore plus "petit bonheur la chance", essaye de supprimer le (ou les) ebuild(s) et archive(s) de sources, de faire emerge --sync et de relancer ta compilation.

----------

## Ascodas

rien à faire avec ce make.conf :

```
CFLAGS="-O2 -march=pentium-m -pipe"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j1"
```

Par exemple lors d'une tentative d'un -eav system ca bloque sur zlib :

```
Building static library libz.a version 1.2.3 with i686-pc-linux-gnu-gcc.

Checking for unistd.h... No.

Checking for attribute(visibility) support... No.

Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()

Checking for snprintf() in stdio.h... No.

  WARNING: snprintf() not found, falling back to sprintf(). zlib

  can build but will be open to possible buffer-overflow security

  vulnerabilities.

Checking for return value of sprintf()... No.

  WARNING: apparently sprintf() does not return a value. zlib

  can build but will be open to possible string-format security

  vulnerabilities.

Checking for errno.h... No.

Checking for mmap support... No.

make -j1 

i686-pc-linux-gnu-gcc -O2 -march=pentium-m -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H   -c -o example.o example.c

example.c:1: erreur interne du compilateur: Erreur du bus

Veuillez soumettre un rapport complet d'anomalies,

avec le source pré-traité si nécessaire.

Consultez <http://bugs.gentoo.org/> pour plus de détail.

make: *** [example.o] Erreur 1

 * 

 * ERROR: sys-libs/zlib-1.2.3-r1 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 2487:  Called die

 * The specific snippet of code:

 *               emake || die

 *  The die message:

 *   (no error message)

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-libs/zlib-1.2.3-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/zlib-1.2.3-r1/temp/environment'.

 * 

>>> Failed to emerge sys-libs/zlib-1.2.3-r1, Log file:

>>>  '/var/tmp/portage/sys-libs/zlib-1.2.3-r1/temp/build.log'

 * Messages for package sys-libs/zlib-1.2.3-r1:

 * 

 * ERROR: sys-libs/zlib-1.2.3-r1 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 2487:  Called die

 * The specific snippet of code:

 *               emake || die

 *  The die message:

 *   (no error message)

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/sys-libs/zlib-1.2.3-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/zlib-1.2.3-r1/temp/environment'.

 * 

 * GNU info directory index is up-to-date.

t40p thomas # 
```

Merci pour votre aide !

----------

## Picani

Ben sinon installe des binaires de GCC, binutils, glibc, libtool et linux-headers, puis recompile la chaîne de compilation.

----------

## diloo

salut,

j'avais eu la même erreur que celle ci il y a peu

```

configure: error: C compiler cannot create executables 

```

c'était dû à une erreur de profil gcc, tu peux essayer de régénérer le tiens avec

```

gcc-config -f i686-pc-linux-gnu-4.3.2

```

----------

## Ascodas

Bon c'est résolu avec l'installation de gcc binaire, je lance un eav system pour remettre tout à plat.

Merci à tous.

----------

