From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#27489: glibc fails to build on i686 Date: Sun, 25 Jun 2017 20:10:33 -0400 Message-ID: <87vanjhame.fsf@netris.org> References: <87podrlvsb.fsf@elephly.net> <878tkfixmu.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPHdN-0001M9-4M for bug-guix@gnu.org; Sun, 25 Jun 2017 20:12:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPHdJ-0007ms-SJ for bug-guix@gnu.org; Sun, 25 Jun 2017 20:12:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35123) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPHdJ-0007mo-Os for bug-guix@gnu.org; Sun, 25 Jun 2017 20:12:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dPHdJ-0000sG-KC for bug-guix@gnu.org; Sun, 25 Jun 2017 20:12:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <878tkfixmu.fsf@netris.org> (Mark H. Weaver's message of "Sun, 25 Jun 2017 17:08:09 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ricardo Wurmus Cc: 27489@debbugs.gnu.org Mark H Weaver writes: > Ricardo Wurmus writes: > >> Since commit 665d6a59161769e10b52ffcbcd5cd2db22f32681 I have to build >> glibc from source. Unfortunately, this fails with the following error: >> >> =E2=80=A6 >> i686-guix-linux-gnu-gcc ../sysdeps/i386/i686/multiarch/strcspn-c.c -c -s= td=3Dgnu11 -fgnu89-inline -O2 -Wall -Werror -Wundef -=20 >> In file included from ../sysdeps/x86_64/multiarch/strcspn-c.c:22:0, >> from ../sysdeps/i386/i686/multiarch/strcspn-c.c:2: >> ../sysdeps/x86_64/multiarch/varshift.h: In function '__m128i_shift_right= ': >> ../sysdeps/x86_64/multiarch/varshift.h:26:1: error: SSE vector return wi= thout SSE enabled changes the ABI [-Werror=3Dpsabi] >> { >> ^ >> In file included from /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cr= oss-boot0-5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4., >> from /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cr= oss-boot0-5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4., >> from ../sysdeps/x86_64/multiarch/strcspn-c.c:20, >> from ../sysdeps/i386/i686/multiarch/strcspn-c.c:2: >> /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cross-boot0-5.4.0-lib/li= b/gcc/i686-guix-linux-gnu/5.4.0/include/tmmintrin.h:h >> _mm_shuffle_epi8 (__m128i __X, __m128i __Y) >> ^ >> In file included from ../sysdeps/x86_64/multiarch/strcspn-c.c:22:0, >> from ../sysdeps/i386/i686/multiarch/strcspn-c.c:2: >> ../sysdeps/x86_64/multiarch/varshift.h:27:10: error: called from here >> return _mm_shuffle_epi8 (value, >> ^ >> In file included from /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cr= oss-boot0-5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4., >> from /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cr= oss-boot0-5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4., >> from /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cr= oss-boot0-5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4., >> from /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cr= oss-boot0-5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4., >> from ../sysdeps/x86_64/multiarch/strcspn-c.c:20, >> from ../sysdeps/i386/i686/multiarch/strcspn-c.c:2: >> /gnu/store/85qsxn71dn6944df5kcvkxg0nm3xdg6z-gcc-cross-boot0-5.4.0-lib/li= b/gcc/i686-guix-linux-gnu/5.4.0/include/emmintrin.h:h >> _mm_loadu_si128 (__m128i const *__P) >> ^ >> In file included from ../sysdeps/x86_64/multiarch/strcspn-c.c:22:0, >> from ../sysdeps/i386/i686/multiarch/strcspn-c.c:2: >> ../sysdeps/x86_64/multiarch/varshift.h:27:10: error: called from here >> return _mm_shuffle_epi8 (value, >> ^ >> cc1: all warnings being treated as errors >> make[4]: *** [/tmp/guix-build-glibc-2.25.drv-0/build/sysd-rules:561: /tm= p/guix-build-glibc-2.25.drv-0/build/string/rtld-strc1 >> make[4]: Leaving directory '/tmp/guix-build-glibc-2.25.drv-0/glibc-2.25/= string' >> make[3]: *** [../o-iterator.mk:9: /tmp/guix-build-glibc-2.25.drv-0/build= /string/rtld-strchr.os] Error 2 >> make[3]: Leaving directory '/tmp/guix-build-glibc-2.25.drv-0/glibc-2.25/= elf' >> make[2]: *** [Makefile:443: /tmp/guix-build-glibc-2.25.drv-0/build/elf/r= tld-libc.a] Error 2 >> make[2]: Leaving directory '/tmp/guix-build-glibc-2.25.drv-0/glibc-2.25/= elf' >> make[1]: *** [Makefile:215: elf/subdir_lib] Error 2 >> make[1]: Leaving directory '/tmp/guix-build-glibc-2.25.drv-0/glibc-2.25' >> make: *** [Makefile:9: all] Error 2 >> phase `build' failed after 1749.9 seconds >> builder for `/gnu/store/ivvdx2m0p6gnmcxmz355z106ffqg9p25-glibc-2.25.drv'= failed with exit code 1 >> guix system: error: build failed: build of `/gnu/store/ivvdx2m0p6gnmcxmz= 355z106ffqg9p25-glibc-2.25.drv' failed >> >> This means I cannot upgrade my i686 machines. > > Hmm. The patches added by commit 665d6a5916 change only one file: > rtld.c, so I don't see how that could affect the building of > strcspn-c.c. I built both the grafted and ungrafted versions of 'glibc-final' for i686-linux, and compared the build logs. The problem is that glibc-CVE-2017-1000366-pt2.patch introduces a reference to 'strcspn' in rtld.c. This causes the glibc build system to automatically add 'rtld-strcspn.os' and 'rtld-strcspn-c.os' to the list of objects to be built. When 'rtld-strcspn-c.os' is built, "-msse4" is passed to the compiler (along with "-mno-sse" near the end). Here's are the relevant parts of the diff: -make subdir=3Dstring -C ../string ..=3D../ objdir=3D/tmp/guix-build-glibc-= 2.25.drv-0/build -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=3D'= rtld-strchr.os rtld-strcmp.os rtld-strdup.os rtld-strlen.os rtld-strnlen.os= rtld-memchr.os rtld-memcmp.os rtld-memmove.os rtld-memset.os rtld-mempcpy.= os rtld-stpcpy.os rtld-memcpy.os rtld-rawmemchr.os rtld-memset-sse2.os rtld= -memcpy-ssse3.os rtld-mempcpy-ssse3.os rtld-memmove-ssse3.os rtld-memcpy-ss= se3-rep.os rtld-mempcpy-ssse3-rep.os rtld-memmove-ssse3-rep.os rtld-memset-= sse2-rep.os rtld-strcmp-ssse3.os rtld-strcmp-sse4.os rtld-memcmp-ssse3.os r= tld-memcmp-sse4.os rtld-strlen-sse2.os rtld-strlen-sse2-bsf.os rtld-stpcpy-= ssse3.os rtld-stpcpy-sse2.os rtld-strchr-sse2.os rtld-strchr-sse2-bsf.os rt= ld-memchr-sse2.os rtld-memchr-sse2-bsf.os rtld-rawmemchr-sse2.os rtld-rawme= mchr-sse2-bsf.os rtld-strnlen-sse2.os rtld-strnlen-c.os rtld-memcpy-sse2-un= aligned.os rtld-mempcpy-sse2-unaligned.os rtld-memmove-sse2-unaligned.os rt= ld-cacheinfo.os' +make subdir=3Dstring -C ../string ..=3D../ objdir=3D/tmp/guix-build-glibc-= 2.25.drv-0/build -f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules=3D'= rtld-strchr.os rtld-strcmp.os rtld-strcspn.os rtld-strdup.os rtld-strlen.os= rtld-strnlen.os rtld-memchr.os rtld-memcmp.os rtld-memmove.os rtld-memset.= os rtld-mempcpy.os rtld-stpcpy.os rtld-memcpy.os rtld-rawmemchr.os rtld-mem= set-sse2.os rtld-memcpy-ssse3.os rtld-mempcpy-ssse3.os rtld-memmove-ssse3.o= s rtld-memcpy-ssse3-rep.os rtld-mempcpy-ssse3-rep.os rtld-memmove-ssse3-rep= .os rtld-memset-sse2-rep.os rtld-strcmp-ssse3.os rtld-strcmp-sse4.os rtld-m= emcmp-ssse3.os rtld-memcmp-sse4.os rtld-strlen-sse2.os rtld-strlen-sse2-bsf= .os rtld-stpcpy-ssse3.os rtld-stpcpy-sse2.os rtld-strchr-sse2.os rtld-strch= r-sse2-bsf.os rtld-memchr-sse2.os rtld-memchr-sse2-bsf.os rtld-rawmemchr-ss= e2.os rtld-rawmemchr-sse2-bsf.os rtld-strnlen-sse2.os rtld-strnlen-c.os rtl= d-memcpy-sse2-unaligned.os rtld-mempcpy-sse2-unaligned.os rtld-memmove-sse2= -unaligned.os rtld-strcspn-c.os rtld-cacheinfo.os rtld-varshift.os' [...] +i686-guix-linux-gnu-gcc ../sysdeps/i386/i686/multiarch/strcspn-c.c -c -std= =3Dgnu11 -fgnu89-inline -O2 -Wall -Werror -Wundef -Wwrite-strings -fmerge-= all-constants -fno-stack-protector -frounding-math -g -Wstrict-prototypes -= Wold-style-definition -fPIC -Wa,-mtune=3Di686 -mno-sse -mno-mmx -mfpmath= =3D387 -msse4 -ftls-model=3Dinitial-exec -I../include -I/tmp/guix-bu= ild-glibc-2.25.drv-0/build/string -I/tmp/guix-build-glibc-2.25.drv-0/build= -I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/i386/i686/nptl -I..= /sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/x86 -I../sysde= ps/i386/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/l= inux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysde= ps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/= unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu/multiarch -I../sysdep= s/i386/i686/fpu -I../sysdeps/i386/i686/multiarch -I../sysdeps/i386/i686 = -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu -= I../sysdeps/i386 -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/= ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/= dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/gen= eric -I.. -I../libio -I. -nostdinc -isystem /gnu/store/...-gcc-cross-boot0= -5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4.0/include -isystem /gnu/store/..= .-gcc-cross-boot0-5.4.0-lib/lib/gcc/i686-guix-linux-gnu/5.4.0/include-fixed= -isystem /gnu/store/...-linux-libre-headers-4.4.47/include -D_LIBC_REENTR= ANT -include /tmp/guix-build-glibc-2.25.drv-0/build/libc-modules.h -DMODULE= _NAME=3Drtld -include ../include/libc-symbols.h -DPIC -DSHARED -o /tmp= /guix-build-glibc-2.25.drv-0/build/string/rtld-strcspn-c.os -MD -MP -MF /tm= p/guix-build-glibc-2.25.drv-0/build/string/rtld-strcspn-c.os.dt -MT /tmp/gu= ix-build-glibc-2.25.drv-0/build/string/rtld-strcspn-c.os -mno-sse -mno-mmx= -mfpmath=3D387=20 +In file included from ../sysdeps/x86_64/multiarch/strcspn-c.c:22:0, + from ../sysdeps/i386/i686/multiarch/strcspn-c.c:2: +../sysdeps/x86_64/multiarch/varshift.h: In function '__m128i_shift_right': +../sysdeps/x86_64/multiarch/varshift.h:26:1: error: SSE vector return with= out SSE enabled changes the ABI [-Werror=3Dpsabi] [...] The excerpts above are the first hunks of the diff (excluding lines of the form "phase `...' succeeded after N.N seconds"). Mark