Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Compile of glibc fails during world emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
SAM3 Adhoc
n00b
n00b


Joined: 21 Feb 2015
Posts: 2

PostPosted: Sat Feb 21, 2015 9:52 pm    Post subject: Compile of glibc fails during world emerge Reply with quote

TRIGGER WARNING: Naive at forum posting. I've never embedded code into posts, for instance, and just got my first gmail account so I could register here. Please be gentle, and instruct/redirect me as needed.

Code:
emerge -auDN @world


produced no untoward warnings, so accepted updates. First package was
glibc, which failed to compile. This was followed by a number of other emerge fails (some of which were perhaps attributable
to glibc being needed). glibc being what it is, it seems important to fix this correctly.

I tried
Code:
emerge -1va glibc

which again had no issues before asking to continue, but failed in compiling

output of `emerge --info '=sys-libs/glibc-2.20-r2::gentoo'`

Code:
   WARNING: One or more repositories have missing repo_name entries:

      /var/lib/layman/calchan/profiles/repo_name

   NOTE: Each repo_name entry should be a plain text file containing a
   unique name for the repository on the first line.


   Portage 2.2.17 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop, gcc-4.8.4, glibc-2.20-r1, 3.18.2-gentoo x86_64)
   =================================================================
                             System Settings
   =================================================================
   System uname: Linux-3.18.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-2630QM_CPU_@_2.00GHz-with-gentoo-2.2
   KiB Mem:    16412604 total,   1650356 free
   KiB Swap:   20971516 total,  20763460 free
   Timestamp of repository gentoo: Sat, 21 Feb 2015 18:30:01 +0000
   sh bash 4.3_p33-r1
   ld GNU ld (Gentoo 2.24 p1.4) 2.24
   app-shells/bash:          4.3_p33-r1::gentoo
   dev-java/java-config:     2.2.0::gentoo
   dev-lang/perl:            5.20.2::gentoo
   dev-lang/python:          2.7.9-r2::gentoo, 3.3.5-r1::gentoo
   dev-util/cmake:           3.0.2::gentoo
   dev-util/pkgconfig:       0.28-r2::gentoo
   sys-apps/baselayout:      2.2::gentoo
   sys-apps/openrc:          0.13.9::gentoo
   sys-apps/sandbox:         2.6-r1::gentoo
   sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
   sys-devel/automake:       1.11.6-r1::gentoo, 1.15::gentoo
   sys-devel/binutils:       2.24-r3::gentoo
   sys-devel/gcc:            4.8.4::gentoo, 4.9.2::gentoo
   sys-devel/gcc-config:     1.8::gentoo
   sys-devel/libtool:        2.4.6::gentoo
   sys-devel/make:           4.1-r1::gentoo
   sys-kernel/linux-headers: 3.19::gentoo (virtual/os-headers)
   sys-libs/glibc:           2.20-r1::gentoo
   Repositories:

   gentoo
        location: /var/cache/portage
        sync-type: rsync
        sync-uri: rsync://rsync.gentoo.org/gentoo-portage
        priority: -1000

   science
        location: /var/lib/layman/science
        masters: gentoo
        priority: 0

   calchan
        location: /var/lib/layman/calchan
        masters: gentoo
        priority: 1

   local
        location: /usr/local/portage
        masters: gentoo
        priority: 2

   ACCEPT_KEYWORDS="amd64 ~amd64"
   ACCEPT_LICENSE="*"
   CBUILD="x86_64-pc-linux-gnu"
   CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
   CHOST="x86_64-pc-linux-gnu"
   CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
   CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
   CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
   DISTDIR="/var/cache/distfiles"
   EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n --keep-going"
   FCFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
   FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
   FFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
   GENTOO_MIRRORS="http://distfiles.gentoo.org"
   LDFLAGS="-Wl,-O1 -Wl,--as-needed"
   MAKEOPTS="-j9"
   PKGDIR="/usr/portage/packages"
   PORTAGE_CONFIGROOT="/"
   PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
   PORTAGE_TMPDIR="/tmp"
   USE="10bit X a52 aac aacplus aalib acl acpi ads aften alsa amd64 amr apng artworkextra ass autoipd avahi avx bash-completion berkdb bs2b bzip2 cairo cb cdda cddb cdinstall cdio cdparanoia chromaprint clamdtop cli compressed-lumas consolekit context contrast corefonts cracklib crypt cscope cuda cups cxx dbus dc1394 demosaic detex dhcpcd dia djbfft djvu dot dri dts dv dvb dvd dvdr dvi dvipdfm eigen emboss emf encode epspdf eurephia exif expat extensions extra extras faac faad fam fax fdk fdt ffmpeg fftw firefox fits flac flash flickr fluidsynth fontconfig fortran fpx frei0r ftp games gdbm gdu gif gimp git glchess glibc-omitfp gme gmp gnome-keyring gpm graphics graphicsmagick graphviz grilo gs gsm gstreamer gtk gtk2 gudev hdri highlight hou html http humanities hwdb iconv id3tag idn ieee1394 imagemagick inkjar int-quality introspection iplayer ipod ipv6 ithreads jadetex java jbig jemalloc jpeg jpeg2k kate kerberos keymap kpathsea ladspa lame lapack laptop latex lcms ldap lensfun libass libcaca libcanberra libnotify libproxy libsamplerate libtiger libwww live lqr lua luatex lyx lzma lzo mad matroska md5sum mdnsresponder-compat melt metapost metis midi minizip mjpeg mms mmx mng mod modemmanager modplug modules mp3 mp4 mpeg mtp multilib musepack music musicbrainz nas ncurses network networkmanager nlpsolver nls nowin nptl nss ntfsprogs numpy nut ocr odf offensive offlinehelp ofx ogg old-output omega openal opencl opencv openexr opengl openmp openssl opus pam pango pcre pdf pdfannotextractor pdfimport perl pgf plotutils png pnm policykit postproc postscript ppds projectm pstricks publishers python q16 q32 q64 q8 qt4 quad quicktime raptor raw readline right_timezone rtf rtmp rtsp samba sasl scanner schroedinger science script sdl sdl-image sdlgfx seed session sftp shout sid smp sndfile snmp sou speex spell sqlite sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 startup-notification stream subversion svg t1lib taglib tcpd templates tex4ht texi2html theora thin-splines threads thunar tiff timezone tk truetype twolame udev udisks umfpack unicode upcall upnp upnp-av upower usb utp v4l vala vamp vcd vcdx videos vim-syntax vorbis vpx wavpack webkit webp wifi wmf wxwidgets x264 xanim xcb xetex xft xindy xinerama xml xmp xpm xps xv xvid xvmc youtube zeroconf zlib" ABI_X86="64" 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" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" 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 ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver wiki-publisher" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


build log - this seems to be too large to post here, crashes preview, so I found what seems to be the first in a long train of errors:

Code:
...
In file included from ../sysdeps/x86_64/multiarch/varshift.h:20:0,
                 from ../sysdeps/x86_64/multiarch/varshift.c:19,
                 from ../sysdeps/i386/i686/multiarch/varshift.c:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/tmmintrin.h:35:23: error: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/pmmintrin.h: Input/output error
 #include <pmmintrin.h>
                       ^
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/tmmintrin.h:38:1: error: expected ',' or ';' before '_mm_hadd_epi16'
 _mm_hadd_epi16 (__m128i __X, __m128i __Y)
 ^
...[plenty more errors of the same general style]
../sysdeps/x86_64/multiarch/strspn-c.c:119:15: error: expected ';' before 'value'
       __m128i value = _mm_load_si128 ((__m128i *) aligned);
               ^
../sysdeps/x86_64/multiarch/strcspn-c.c:143:7: error: 'value' undeclared (first use in this function)
       value = __m128i_shift_right (value, offset);
       ^
../sysdeps/x86_64/multiarch/strspn-c.c:121:7: error: 'value' undeclared (first use in this function)
       value = __m128i_shift_right (value, offset);
       ^
../sysdeps/x86_64/multiarch/strcspn-c.c:147:7: warning: implicit declaration of function '_mm_cmpistrc' [-Wimplicit-function-declaration]
       int cflag = _mm_cmpistrc (mask, value, 0x2);
       ^
../sysdeps/x86_64/multiarch/strspn-c.c:138:7: warning: statement with no effect [-Wunused-value]
       __m128i value = _mm_load_si128 ((__m128i *) aligned);
       ^
../sysdeps/x86_64/multiarch/strspn-c.c:138:15: error: expected ';' before 'value'
       __m128i value = _mm_load_si128 ((__m128i *) aligned);
               ^
../sysdeps/x86_64/multiarch/strcspn-c.c:161:7: warning: statement with no effect [-Wunused-value]
       __m128i value = _mm_load_si128 ((__m128i *) aligned);
       ^
../sysdeps/x86_64/multiarch/strcspn-c.c:161:15: error: expected ';' before 'value'
       __m128i value = _mm_load_si128 ((__m128i *) aligned);
               ^
../sysdeps/x86_64/multiarch/strspn-c.c:140:7: warning: implicit declaration of function '_mm_cmpistrc' [-Wimplicit-function-declaration]
       int cflag = _mm_cmpistrc (mask, value, 0x12);
       ^
../sysdeps/x86_64/multiarch/strcspn-c.c:164:7: warning: implicit declaration of function '_mm_cmpistrz' [-Wimplicit-function-declaration]
       int zflag = _mm_cmpistrz (mask, value, 0x2);
       ^
/tmp/portage/sys-libs/glibc-2.20-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/sysd-rules:1653: recipe for target '/tmp/portage/sys-libs/glibc-2.20-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/string/strcspn-c.o' failed
make[2]: *** [/tmp/portage/sys-libs/glibc-2.20-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/string/strcspn-c.o] Error 1
/tmp/portage/sys-libs/glibc-2.20-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/sysd-rules:1653: recipe for target '/tmp/portage/sys-libs/glibc-2.20-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/string/strspn-c.o' failed
make[2]: *** [/tmp/portage/sys-libs/glibc-2.20-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/string/strspn-c.o] Error 1
make[2]: Leaving directory '/tmp/portage/sys-libs/glibc-2.20-r2/work/glibc-2.20/string'
Makefile:214: recipe for target 'string/subdir_lib' failed
make[1]: *** [string/subdir_lib] Error 2
make[1]: Leaving directory '/tmp/portage/sys-libs/glibc-2.20-r2/work/glibc-2.20'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/tmp/portage/sys-libs/glibc-2.20-r2/work/build-x86-x86_64-pc-linux-gnu-nptl'
 * ERROR: sys-libs/glibc-2.20-r2::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.20-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.20-r2::gentoo'`.
 * The complete build log is located at '/tmp/portage/sys-libs/glibc-2.20-r2/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/sys-libs/glibc-2.20-r2/temp/environment'.
 * Working directory: '/tmp/portage/sys-libs/glibc-2.20-r2/work/glibc-2.20'
 * S: '/tmp/portage/sys-libs/glibc-2.20-r2/work/glibc-2.20'


output of emerge -pqv '=sys-libs/glibc-2.20-r2::gentoo'

Code:
   [ebuild     U ] sys-libs/glibc-2.20-r2 [2.20-r1] USE="(multilib) -debug -gd (-hardened) -nscd -profile (-selinux) -suid -systemtap -vanilla"

   !!! The following installed packages are masked:
   - virtual/rubygems-8::gentoo (masked by: package.mask)
   /var/cache/portage/profiles/package.mask:
   # Hans de Graaff <graaff@gentoo.org> (15 Feb 2015)
   # Mask old virtuals based on the slot-per-version idea for removal,
   # bug 421497.

   - virtual/rubygems-7::gentoo (masked by: package.mask)
   - virtual/rubygems-6::gentoo (masked by: package.mask)
   For more information, see the MASKED PACKAGES section in the emerge
   man page or refer to the Gentoo Handbook.


Attempting to run
Code:
emerge @preserved-rebuild

runs for a while, but then fails (perhaps for completely unrelated reasons). Because I can't get back
to a cleanly emerged system, I'm afraid to shut down. I've googled and tried things for 11 days, now I'm ready for some help.
Back to top
View user's profile Send private message
mmogilvi
n00b
n00b


Joined: 13 May 2011
Posts: 62

PostPosted: Sat Feb 21, 2015 11:15 pm    Post subject: Re: Compile of glibc fails during world emerge Reply with quote

Code:
...
In file included from ../sysdeps/x86_64/multiarch/varshift.h:20:0,
                 from ../sysdeps/x86_64/multiarch/varshift.c:19,
                 from ../sysdeps/i386/i686/multiarch/varshift.c:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/tmmintrin.h:35:23: error: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/pmmintrin.h: Input/output error
 #include <pmmintrin.h>
                       ^
...


"Input/output error": Maybe your hard drive is starting to go bad, or at least has a bad sector it didn't previously recognize?

1. Make sure anything important is backed up.

2. Does "cat /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/pmmintrin.h" indicate an I/O error also?

If it really is an I/O error:

3. Move the file off to the side to prevent any possibility of anything trying to re-use the bad sector. (Hard drive firmware code may have already done something similar, but it doesn't hurt to be explicit about it:)
- mkdir /usr/badBlocks # (on same partition)
- mv /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/pmmintrin.h /usr/badBlocks/.

4. Replace it with a clean copy. Perhaps copy from another machine, copy from a chroot, or perhaps temporarily switch to gcc 4.9 long enough to re-emerge gcc 4.8 before switching back to gcc 4.8.

5. Do more investigation into the possibility that your hard drive might be slowly failing. Portage has a few tools for examining "SMART" data from your drives, for example.
Back to top
View user's profile Send private message
SAM3 Adhoc
n00b
n00b


Joined: 21 Feb 2015
Posts: 2

PostPosted: Sun Feb 22, 2015 2:01 am    Post subject: Reply with quote

Thanks a lot for your reply, mmogilvi

Quote:
"Input/output error": Maybe your hard drive is starting to go bad, or at least has a bad sector it didn't previously recognize?


This looks like a distinct possibility, or some kind of other corruption. I can't
Code:
less /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.4/include/pmmintrin.h

even though I can look at other header files in the same directory.

I looked at this drive a few months ago with smartmontools and it looked OK then, but
it is 5 years old.

I'm going to try to find a source that I can put into this location. If I can't get
Code:
emerge @preserved-rebuild

to run to completion, any idea if I might still have a bootable system until I can get a new HD chrooted? Anything steps I can take to improve the odds?
Back to top
View user's profile Send private message
mmogilvi
n00b
n00b


Joined: 13 May 2011
Posts: 62

PostPosted: Sun Feb 22, 2015 4:16 am    Post subject: Reply with quote

SAM3 Adhoc wrote:
I'm going to try to find a source that I can put into this location. If I can't get
Code:
emerge @preserved-rebuild

to run to completion, any idea if I might still have a bootable system until I can get a new HD chrooted? Anything steps I can take to improve the odds?


Most likely it can at least boot to the console (everything except X). The most likely issues might involve (a) things like udev or systemd [that seem to have relatively many dependencies in order to work], or (b) if some other critical file (not handled by @preserved-rebuild) has also been lost/corrupted without gentoo's knowledge. Most bootup packages are fairly self contained and don't depend on many libraries besides glibc or a few others that have really stable ABI's.

The fancier desktop environments (like gnome) may be a little more vulnerable to ABI version mismatch problems. Although if you happen to have already successfully logged out and back in, they'll probably work after a reboot as well. A half-updated system is more likely to work today than it did in years past, since modern portage seems to automatically delay removing old libraries until all the things that depend on them have been rebuilt. Also, lighter desktops (like icewm or twm) are less likely to break in a half-updated system.

Perhaps knowledge of which libs are causing a rebuild, and/or which packages need to be rebuilt, would allow for a more concrete opinion about what might be broken.

----
Other notes:

If you just want to replace the file, you could probably just setup a chroot from a stage 3 in a subdirectory of your existing system, then delete the subdirectory when done (though unmount any bind mounts before removing it).

If you can fix the corrupt file somehow but then want to replace the drive anyway, you could probably just copy your existing system to the new drive wholesale ("cp -a", a couple of tar's in a pipeline, or some kind of whole-partition tool like ddrescue or something fancier), and might not need chroot at all. Although booting from CD to do a copy would probably still be best, to avoid subtleties with pseudo file systems like /proc and /dev.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum