# [EMERGE] Error en actualización GCC 4.4.5

## koyo

Hola a todos.

Estoy tratando de actualiza GCC 4.4.5 luego de agregar unas variables adicionales USE (Soporte Objetive-C), es un sistema con menos de 48 horas de instalacion; basicamente este es el primer emerge --sync / emerge -NDuav world que realizo en el. He tratado de implementar la solución planteada en la siguiente discusión https://forums.gentoo.org/viewtopic-t-867387.html?sid=676266320de352e2dc75b9b963fdf4a0 , pero sin éxito (emerge glibc && emerge gcc)

El error que me arroja el emerge es el siguiente:

```
mkdir 32

configure: creating cache ./config.cache

checking for --enable-version-specific-runtime-libs... no

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

checking for gawk... gawk

checking build system type... x86_64-pc-linux-gnu

checking host system type... x86_64-pc-linux-gnu

checking for x86_64-pc-linux-gnu-ar... /usr/x86_64-pc-linux-gnu/bin/ar

checking for x86_64-pc-linux-gnu-lipo... lipo

checking for x86_64-pc-linux-gnu-nm... /var/tmp/portage/sys-devel/gcc-4.4.5/work/build/./gcc/nm

checking for x86_64-pc-linux-gnu-ranlib... /usr/x86_64-pc-linux-gnu/bin/ranlib

checking for x86_64-pc-linux-gnu-strip... /usr/x86_64-pc-linux-gnu/bin/strip

checking whether ln -s works... yes

checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/sys-devel/gcc-4.4.5/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.5/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32

checking for C compiler default output file name... a.out

checking whether the C compiler works... configure: error: in `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build/x86_64-pc-linux-gnu/32/libgcc':

configure: error: cannot run C compiled programs.

If you meant to cross compile, use `--host'.

See `config.log' for more details.

make[2]: *** [configure-stage1-target-libgcc] Error 1

make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build'

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

make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build'

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

emake failed

 * ERROR: sys-devel/gcc-4.4.5 failed (compile phase):

 *   emake failed with bootstrap-lean

 * 

 * Call stack:

 *     ebuild.sh, line   56:  Called src_compile

 *   environment, line 5032:  Called toolchain_src_compile

 *   environment, line 5627:  Called gcc_src_compile

 *   environment, line 3177:  Called gcc_do_make

 *   environment, line 2959:  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}";

 * 

 * If you need support, post the output of 'emerge --info =sys-devel/gcc-4.4.5',

 * the complete build log and the output of 'emerge -pqv =sys-devel/gcc-4.4.5'.

 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.4.5/temp/build.log'.

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

 * S: '/var/tmp/portage/sys-devel/gcc-4.4.5/work/build'
```

Mi salida de emerge --info =sys-devel/gcc-4.4.5 es:

```
emerge --info =sys-devel/gcc-4.4.5

Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.36-gentoo-r5 x86_64)

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

                         System Settings

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

System uname: Linux-2.6.36-gentoo-r5-x86_64-Intel-R-_Xeon-R-_CPU_E5630_@_2.53GHz-with-gentoo-1.12.14

Timestamp of tree: Thu, 10 Mar 2011 03:30:01 +0000

app-shells/bash:     4.1_p9

dev-lang/python:     2.6.6-r2, 3.1.3-r1

sys-apps/baselayout: 1.12.14-r1

sys-apps/sandbox:    2.4

sys-devel/autoconf:  2.65-r1

sys-devel/automake:  1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.5

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=core2 -mtune=generic -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

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

CXXFLAGS="-march=core2 -mtune=generic -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LANG="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1,--as-needed"

LINGUAS="en"

MAKEOPTS="-j17"

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.gentoo.org/gentoo-portage"

USE="acl acpi amd64 bash-completion berkdb bidi bzip2 cjk cli cracklib crypt cxx dbus fat fortran gcj gdbm gif gnutls gpm hal hfs iconv inotify jfs lm_sensors lzo mmx modules mpi mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl png pppd python rar readline session sse sse2 ssl ssse3 svg sysfs szip tcpd threads tiff udev unicode usb visualization xcb xorg xpm zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 cgi cgid 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

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

                        Package Settings

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

sys-devel/gcc-4.4.5 was built with the following:

USE="fortran mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite -gtk (-hardened) (-libffi) -multislot (-n32) (-n64) -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"

CFLAGS="-O2 -pipe"

CXXFLAGS="-O2 -pipe"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"
```

De antemano muchas gracias por sus sugerencias.

----------

## agdg

Prueba a ejecutar fix_libtool_files.sh:

```
agd-desktop agd # ls /usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/fix_libtool_files.sh 
```

----------

## koyo

Acabo de probar a ejecutar 

```
fix_libtool_files.sh
```

El resultado sigue igual.

----------

## quilosaq

 *koyo wrote:*   

> Hola a todos.
> 
> Estoy tratando de actualiza GCC 4.4.5...
> 
> ...
> ...

 

Tendrás que publicar ese archivo para dar mas información.

----------

## koyo

Hola he generado un reporte de error en bugs.gentoo.org, aqui puedes encontrar el archivo.

https://bugs.gentoo.org/show_bug.cgi?id=358257

----------

## agdg

[OFF-TOPIC] Releyendo tu primer post, veo que tienes configurado MAKEOPTS="-j17" . Hasta donde se, se debe colocar el número de hilos de ejecución más uno. Por el nombre de tu máquina deduzco que tienes un Xeon 5630, 8 hilos de ejecución, ¿por qué has especificado un valor de MAKEOPTS tan exagerado?

----------

## quilosaq

Creo que lo que has publicado no es el config.log sino la salida de emerge. El archivo config.log lo deberías tener en

```
 /var/tmp/portage/sys-devel/gcc-4.4.5/work/build
```

----------

## Txema

A ver, tienes exactamente el mismo error que https://forums.gentoo.org/viewtopic-t-868381.html con paquetes distintos y ambos con la misma arquitectura (64bits)

¿Habéis compilado el kernel recientemente? ¿Por algún casual tenéis activado esto?

```
Executable file formats / Emulations  ---> [*] IA32 Emulation
```

 (y lo que cuelgue)

----------

## carlos plaza

Hola koyo

prueba esto

```
1.- #gcc-config 1

2.-#source /etc/profile

3.-#emerge gcc

4.-#fix_libtool_files.sh
```

3 y 4 según los mensajes que te de gcc-confg

----------

## agdg

Lo idóneo es que hubiese sido koyo, pero como parece que se olvido o no pudo; la respuesta que dan en bugzilla es que por algún error/problema/bug se perdió el enlace simbólico /lib -> /lib64; la solución obviamente es restaurarlo y volver a emerger glibc.

Si no queréis perder todas las librerías, hacer una copia de /lib a /lib64:

```
cp -Rp /lib/* /lib64/

ln -s /lib64 /lib

emerge --sync

emerge -avl glibc
```

----------

