# glibc-2.15-r3 failed to upgrade

## polslinux

Ho appena dato il consueto emerge -uDavN world ed è comparso un aggiornamento di glibc dalla versione 2.15-r2 alla 2.15-r3.

L'aggiornamento è fallito a causa di questo errore:

```
 * ERROR: sys-libs/glibc-2.15-r3 failed (compile phase):

 *   make for x86 failed

 * 

 * Call stack:

 *           ebuild.sh, line   85:  Called src_compile

 *         environment, line 3597:  Called eblit-run 'src_compile'

 *         environment, line  976:  Called eblit-glibc-src_compile

 *   src_compile.eblit, line  213:  Called src_compile

 *         environment, line 3597:  Called eblit-run 'src_compile'

 *         environment, line  976:  Called eblit-glibc-src_compile

 *   src_compile.eblit, line  221:  Called toolchain-glibc_src_compile

 *   src_compile.eblit, line  132:  Called die

 * The specific snippet of code:

 *         emake || die "make for ${ABI} failed"

 * 

 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.15-r3'`,

 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.15-r3'`.

 * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.15-r3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.15-r3/temp/environment'.

 * Working directory: '/var/tmp/portage/sys-libs/glibc-2.15-r3/work/build-x86-x86_64-pc-linux-gnu-nptl'

 * S: '/var/tmp/portage/sys-libs/glibc-2.15-r3/work/glibc-2.15'

```

all'inizio pensavo ci fosse un problema con l'emulazione IA32 ma ho verificato e nel kernel attuale è abilitata:

```
zcat /proc/config.gz | grep IA32

CONFIG_IA32_EMULATION=y

CONFIG_IA32_AOUT=y
```

ho provato anche a compilare un programma con gcc usando l'opzione -m32 e tutto funziona alla perfezione.

```
emerge --info '=sys-libs/glibc-2.15-r3'

Portage 2.1.11.9 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r2, 3.6.2-pol x86_64)

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

                         System Settings

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

System uname: Linux-3.6.2-pol-x86_64-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.1

Timestamp of tree: Sat, 20 Oct 2012 09:15:01 +0000

app-shells/bash:          4.2_p37

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.7.3-r2, 3.2.3

dev-util/cmake:           2.8.9

dev-util/pkgconfig:       0.27.1

sys-apps/baselayout:      2.1-r1

sys-apps/openrc:          0.9.8.4

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.11.6

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.6.3

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4-r1

sys-devel/make:           3.82-r3

sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)

sys-libs/glibc:           2.15-r2

Repositories: gentoo x-portage

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe -march=corei7-avx -mcx16 -msahf -mno-movbe -mno-aes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mavx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7-avx -fstack-protector"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe -march=corei7-avx -mcx16 -msahf -mno-movbe -mno-aes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mavx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7-avx -fstack-protector"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/"

LANG="it_IT.UTF-8"

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

LINGUAS="it en"

MAKEOPTS="-j4"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

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

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

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

USE="X a52 aac aalib acl acpi afs aim alsa amd64 apm bash-completion berkdb bluetooth branding bzip2 cairo cdda cdinstall cdparanoia cdr cleartype cli colord consolekit cracklib crypt css ctype cups cxx dbus dga directfb djvu dri dts dv dvd dvdr eds emboss encode evo exif fam fbcon ffmpeg firefox flac fontconfig fortran ftp gdbm gif gmp gnome gnome-keyring gnome-online-accounts gnutls gpm gstreamer gtk gzip iconv imap imlib introspection ipv6 jpeg jpeg2k lame lcms ldap libnotify lock lzma lzo mad mmx mng modplug modules mozilla mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nsplugin ogg opengl openmp pam pango pcre pdf png policykit ppds pppd pulseaudio qt3support readline sdl session snmp socialweb spell sse sse2 sse4.1 sse4.2 ssl ssse3 startup-notification svg tcpd theora tiff truetype type1 udev udisks unicode upower usb v4l vcd vorbis wifi wxwidgets x264 xcb xml xv xvid zeroconf zlib" ALSA_CARDS="hda-intel" 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="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" 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="evdev mouse keyboard synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it en" PHP_TARGETS="php5-4" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel v4l fbdev" 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, USE_PYTHON

```

qual è il problema allora?

Grazie  :Smile: 

----------

## polslinux

Risolto impostando le cflags minimali ovvero: CFLAGS="-march=corei7-avx -O2 -pipe" xD

il perchè non lo so ma mi piacerebbe scoprirlo...   :Rolling Eyes: 

----------

## ago

Posta l'intero log e le flag che avevi prima

----------

## polslinux

Ciao  :Smile: 

Sono riuscito a recuperare solo questo da /var/log/portage/elog/summary.log:

```

>>> Messages generated by process 3354 on 2012-10-21 12:09:21 CEST for package sys-libs/glibc-2.15-r3:

ERROR: compile

ERROR: sys-libs/glibc-2.15-r3 failed (compile phase):

make for x86 failed

  

Call stack:

ebuild.sh, line   85:  Called src_compile

environment, line 3597:  Called eblit-run 'src_compile'

environment, line  976:  Called eblit-glibc-src_compile

src_compile.eblit, line  213:  Called src_compile

environment, line 3597:  Called eblit-run 'src_compile'

environment, line  976:  Called eblit-glibc-src_compile

src_compile.eblit, line  221:  Called toolchain-glibc_src_compile

src_compile.eblit, line  132:  Called die

The specific snippet of code:

emake || die "make for ${ABI} failed"

                                                 

If you need support, post the output of `emerge --info '=sys-libs/glibc-2.15-r3'`,

the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.15-r3'`.

The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.15-r3/temp/build.log'.

The complete build environment file is located at '/var/tmp/portage/sys-libs/glibc-2.15-r3/temp/environment'.

Working directory: '/var/tmp/portage/sys-libs/glibc-2.15-r3/work/build-x86-x86_64-pc-linux-gnu-nptl'

S:/var/tmp/portage/sys-libs/glibc-2.15-r3/work/glibc-2.15'
```

non so dove trovare il log completo xk ho già "emerso" glibc quindi non esiste più '/var/tmp/portage/sys-libs/glibc-2.15-r3/temp/build.log

Le CFLAGS che ho abilitato sono:        

```
CFLAGS="-O2 -pipe -march=corei7-avx -mcx16 -msahf -mno-movbe -mno-aes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mavx -msse4.2 -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7-avx -fstack-protector"
```

----------

## ago

Riesci a dirmi quali CFLAGS fanno fallire la compilazione?

----------

## polslinux

ok, domani con calma faccio tutti i tentativi fino a trovare la/le cflags incriminate  :Smile: 

----------

## polslinux

Trovata!!

La CFLAGS che causa il fallimento della compilazione di glibc-2.15-r3 (Gentoo amd64 profilo desktop/gnome con GCC 4.6.3) è: 

```
-fstack-protector
```

----------

