diff mbox

Freezing core-updates

Message ID 87oa7lnc4q.fsf@gnu.org
State New
Headers show

Commit Message

Ludovic Courtès May 31, 2016, 9:36 p.m. UTC
Andreas Enge <andreas@enge.fr> skribis:

> Of course the first time I forgot to add the "-K" parameter. So I redid the
> build and saved the build tree. Here is the error message:
> Comparing stages 2 and 3
> warning: gcc/cc1plus-checksum.o differs
> warning: gcc/cc1-checksum.o differs
> Bootstrap comparison failure!
> gcc/libgcov-driver-tool.o differs
> gcc/tree-nested.o differs
> gcc/df-scan.o differs
> gcc/double-int.o differs
> gcc/simplify-rtx.o differs
> gcc/c/c-parser.o differs
> gcc/c/c-typeck.o differs
> gcc/gcov-dump.o differs
> gcc/tree-ssa-math-opts.o differs
> gcc/fold-const.o differs
> gcc/cp/semantics.o differs
> gcc/cp/optimize.o differs
> gcc/tree-dfa.o differs
> gcc/tree-inline.o differs
> gcc/c-family/cilk.o differs
> gcc/ipa-inline.o differs
> gcc/lto-section-out.o differs
> gcc/omp-low.o differs
> gcc/tree-switch-conversion.o differs
> gcc/lto-streamer-out.o differs
> gcc/real.o differs
> gcc/tree-ssa-sccvn.o differs
> gcc/coverage.o differs
> gcc/dwarf2cfi.o differs
> libiberty/pic/sort.o differs
> libiberty/pic/fibheap.o differs
> libiberty/pic/simple-object-xcoff.o differs
> libiberty/sort.o differs
> libiberty/fibheap.o differs
> libiberty/simple-object-xcoff.o differs
> Makefile:21400: recipe for target 'compare' failed
>
> Things do not look good. I am attaching one pair of differing object files.
> Already their file size is radically different! The same holds for a few
> other pairs of files I had a look at.

Quick observation: one of the file has debugging symbols, the other not.
Apart from that, section sizes are very similar:

--8<---------------cut here---------------start------------->8---
$ ls -l o1 o2
-rw------- 1 ludo users 361036 May 31 23:14 o1
-rw------- 1 ludo users  43016 May 31 23:14 o2
$ size o1 o2
   text	   data	    bss	    dec	    hex	filename
  22172	      0	   1560	  23732	   5cb4	o1
  22156	      0	   1560	  23716	   5ca4	o2
$ objdump -h o1

o1:     file format elf32-little

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00004a10  00000000  00000000  00000038  2**3
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000000  00000000  00000000  00004a48  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000618  00000000  00000000  00004a48  2**2
                  ALLOC
  3 .ARM.extab    00000084  00000000  00000000  00004a48  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .ARM.exidx    00000358  00000000  00000000  00004acc  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  5 .rodata       000006a8  00000000  00000000  00004e24  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  6 .rodata.str1.4 00000208  00000000  00000000  000054cc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 .debug_info   000171e4  00000000  00000000  000056d4  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING
  8 .debug_abbrev 00000b44  00000000  00000000  0001c8b8  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_loc    0000bb96  00000000  00000000  0001d3fc  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING
 10 .debug_aranges 00000020  00000000  00000000  00028f92  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING
 11 .debug_ranges 00001438  00000000  00000000  00028fb2  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_line   000021c5  00000000  00000000  0002a3ea  2**0
                  CONTENTS, RELOC, READONLY, DEBUGGING
 13 .debug_str    00016d9a  00000000  00000000  0002c5af  2**0
                  CONTENTS, READONLY, DEBUGGING
 14 .comment      00000012  00000000  00000000  00043349  2**0
                  CONTENTS, READONLY
 15 .note.GNU-stack 00000000  00000000  00000000  0004335b  2**0
                  CONTENTS, READONLY
 16 .debug_frame  00000ebc  00000000  00000000  0004335c  2**2
                  CONTENTS, RELOC, READONLY, DEBUGGING
 17 .ARM.attributes 00000035  00000000  00000000  00044218  2**0
                  CONTENTS, READONLY
$ objdump -h o2

o2:     file format elf32-little

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00004a00  00000000  00000000  00000038  2**3
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000000  00000000  00000000  00004a38  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          00000618  00000000  00000000  00004a38  2**2
                  ALLOC
  3 .ARM.extab    00000084  00000000  00000000  00004a38  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .ARM.exidx    00000358  00000000  00000000  00004abc  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  5 .rodata       000006a8  00000000  00000000  00004e14  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  6 .rodata.str1.4 00000208  00000000  00000000  000054bc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  7 .comment      00000012  00000000  00000000  000056c4  2**0
                  CONTENTS, READONLY
  8 .note.GNU-stack 00000000  00000000  00000000  000056d6  2**0
                  CONTENTS, READONLY
  9 .ARM.attributes 00000035  00000000  00000000  000056d6  2**0
                  CONTENTS, READONLY
--8<---------------cut here---------------end--------------->8---

Indeed, if we strip it a bit, we get very close:

--8<---------------cut here---------------start------------->8---
$ guix build -e '((@@ (gnu packages cross-base) cross-binutils) "arm-linux-gnueabihf")'
/gnu/store/w7rk1qamh9ws40s6wg148i108229r6fr-binutils-cross-arm-linux-gnueabihf-2.25.1
$ /gnu/store/w7rk1qamh9ws40s6wg148i108229r6fr-binutils-cross-arm-linux-gnueabihf-2.25.1/bin/arm-linux-gnueabihf-strip --strip-debug -o o3 o1
$ ls -l o3 o2
-rw------- 1 ludo users 43016 May 31 23:14 o2
-rw-r--r-- 1 ludo users 43008 May 31 23:26 o3
$ size o3 o2
   text	   data	    bss	    dec	    hex	filename
  22172	      0	   1560	  23732	   5cb4	o3
  22156	      0	   1560	  23716	   5ca4	o2
--8<---------------cut here---------------end--------------->8---

We still have those 16 extra bytes though.

We can disassemble like Diffoscope would do (if it knew about
cross-compilation…):

--8<---------------cut here---------------start------------->8---
$ /gnu/store/w7rk1qamh9ws40s6wg148i108229r6fr-binutils-cross-arm-linux-gnueabihf-2.25.1/bin/arm-linux-gnueabihf-objdump --line-numbers --disassemble --section=.text o3 > a3
$ /gnu/store/w7rk1qamh9ws40s6wg148i108229r6fr-binutils-cross-arm-linux-gnueabihf-2.25.1/bin/arm-linux-gnueabihf-objdump
--line-numbers --disassemble --section=.text o2 > a2
--8<---------------cut here---------------end--------------->8---

… and then compare the assembly, which gives many things like:
(Note the 16-byte difference in the target address.)

Then we see more significant differences in
_ZL16round_for_formatPK11real_formatP10r, which is probably where the
extra bytes are.

We should check the build log for the command lines used to build
real.o.

To be continued…

Ludo’.

Comments

Andreas Enge June 1, 2016, 9:41 a.m. UTC | #1
On Tue, May 31, 2016 at 11:36:21PM +0200, Ludovic Courtès wrote:
> Quick observation: one of the file has debugging symbols, the other not.
> Apart from that, section sizes are very similar:

That is understandable, the debugging symbols come from stage 2, the files
without from stage 3.


To check for an easy work-around, I tested to upgrade the standard gcc
from 5.3 to 6.1. But this fails as follows:

setenv.c: In function '__unsetenv':
setenv.c:279:6: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=parentheses]
   if (ep != NULL)
      ^
cc1: all warnings being treated as errors
../o-iterator.mk:9: recipe for target '/tmp/guix-build-glibc-intermediate-2.23.drv-0/build/stdlib/setenv.o' failed
make[2]: *** [/tmp/guix-build-glibc-intermediate-2.23.drv-0/build/stdlib/setenv.o] Error 1
make[2]: Leaving directory '/tmp/guix-build-glibc-intermediate-2.23.drv-0/glibc-2.23/stdlib'
Makefile:214: recipe for target 'stdlib/subdir_lib' failed
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory '/tmp/guix-build-glibc-intermediate-2.23.drv-0/glibc-2.23'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2
phase `build' failed after 350.8 seconds
builder for `/gnu/store/ja64ppaspnvx5q1a9nlfa0n3hp9kb2p1-glibc-intermediate-2.23.drv' failed with exit code 1
@ build-failed /gnu/store/ja64ppaspnvx5q1a9nlfa0n3hp9kb2p1-glibc-intermediate-2.23.drv - 1 builder for `/gnu/store/ja64ppaspnvx5q1a9nlfa0n3hp9kb2p1-glibc-intermediate-2.23.drv' failed with exit code 1
cannot build derivation `/gnu/store/cnd7vjf59wkvma15zicdv9gg8hl084q7-bash-static-4.3.42.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/p8fsvdqby0api3fhpjk8fg7szv8xqdbn-gcc-6.1.0.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/x34g9mhwn0ssqxfp3w0gy1dnwacm5dh1-gcc-6.1.0.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/7xvr4q068i3h49sad9wab3fbpfgivbn9-glibc-2.23.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/ln53k3lix5421ykvhh8k0pnjbg81f1yi-hello-2.10.drv': 1 dependencies couldn't be built
guix build: error: build failed: build of `/gnu/store/ln53k3lix5421ykvhh8k0pnjbg81f1yi-hello-2.10.drv' failed

Maybe "all warnings treated as errors" is a bit exaggerated here, but in any
case, upgrading gcc is not an easy fix.

> We should check the build log for the command lines used to build
> real.o.

I find this:
105038:libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../gcc-5.3.0/mpc/src -I.. -I/tmp/guix-build-gcc-5.3.0.drv-0/build/./gmp -I/tmp/guix-build-gcc-5.3.0.drv-0/gcc-5.3.0/mpfr/src -g -MT real.lo -MD -MP -MF .deps/real.Tpo -c ../../../gcc-5.3.0/mpc/src/real.c -o real.o
115976:libtool: compile:  /tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/xgcc -B/tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/lib/ -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/include -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-5.3.0/mpc/src -I.. -I/tmp/guix-build-gcc-5.3.0.drv-0/build/./gmp -I/tmp/guix-build-gcc-5.3.0.drv-0/gcc-5.3.0/mpfr/src -O2 -g0 -gtoggle -MT real.lo -MD -MP -MF .deps/real.Tpo -c ../../../gcc-5.3.0/mpc/src/real.c -o real.o
126915:libtool: compile:  /tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/xgcc -B/tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/lib/ -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/include -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-5.3.0/mpc/src -I.. -I/tmp/guix-build-gcc-5.3.0.drv-0/build/./gmp -I/tmp/guix-build-gcc-5.3.0.drv-0/gcc-5.3.0/mpfr/src -O2 -g0 -MT real.lo -MD -MP -MF .deps/real.Tpo -c ../../../gcc-5.3.0/mpc/src/real.c -o real.o

Maybe real.o is not the easiest example, since it also involves gmp and mpfr.

Andreas
Ludovic Courtès June 2, 2016, 8:09 a.m. UTC | #2
Andreas Enge <andreas@enge.fr> skribis:

> On Tue, May 31, 2016 at 11:36:21PM +0200, Ludovic Courtès wrote:
>> Quick observation: one of the file has debugging symbols, the other not.
>> Apart from that, section sizes are very similar:
>
> That is understandable, the debugging symbols come from stage 2, the files
> without from stage 3.
>
>
> To check for an easy work-around, I tested to upgrade the standard gcc
> from 5.3 to 6.1. But this fails as follows:

Upgrading GCC is never this easy.  ;-)

> I find this:
> 105038:libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../gcc-5.3.0/mpc/src -I.. -I/tmp/guix-build-gcc-5.3.0.drv-0/build/./gmp -I/tmp/guix-build-gcc-5.3.0.drv-0/gcc-5.3.0/mpfr/src -g -MT real.lo -MD -MP -MF .deps/real.Tpo -c ../../../gcc-5.3.0/mpc/src/real.c -o real.o
> 115976:libtool: compile:  /tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/xgcc -B/tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/lib/ -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/include -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-5.3.0/mpc/src -I.. -I/tmp/guix-build-gcc-5.3.0.drv-0/build/./gmp -I/tmp/guix-build-gcc-5.3.0.drv-0/gcc-5.3.0/mpfr/src -O2 -g0 -gtoggle -MT real.lo -MD -MP -MF .deps/real.Tpo -c ../../../gcc-5.3.0/mpc/src/real.c -o real.o
> 126915:libtool: compile:  /tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/xgcc -B/tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/lib/ -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/include -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-5.3.0/mpc/src -I.. -I/tmp/guix-build-gcc-5.3.0.drv-0/build/./gmp -I/tmp/guix-build-gcc-5.3.0.drv-0/gcc-5.3.0/mpfr/src -O2 -g0 -MT real.lo -MD -MP -MF .deps/real.Tpo -c ../../../gcc-5.3.0/mpc/src/real.c -o real.o

This is the wrong one; you should look at gcc/real.c instead.

Thanks for helping out!

Ludo’.
Andreas Enge June 4, 2016, 3:33 p.m. UTC | #3
On Thu, Jun 02, 2016 at 10:09:36AM +0200, Ludovic Courtès wrote:
> > 126915:libtool: compile:  /tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/xgcc -B/tmp/guix-build-gcc-5.3.0.drv-0/build/./prev-gcc/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/bin/ -B/gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/lib/ -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/include -isystem /gnu/store/6xdd64b8343v9vd3nkhkkqg7mayyxvwp-gcc-5.3.0/arm-unknown-linux-gnueabihf/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-5.3.0/mpc/src -I.. -I/tmp/guix-build-gcc-5.3.0.drv-0/build/./gmp -I/tmp/guix-build-gcc-5.3.0.drv-0/gcc-5.3.0/mpfr/src -O2 -g0 -MT real.lo -MD -MP -MF .deps/real.Tpo -c ../../../gcc-5.3.0/mpc/src/real.c -o real.o
> This is the wrong one; you should look at gcc/real.c instead.

Ah indeed, real.c is just not such a distinctive file name... Thanks for
looking into it instead of me :-)

Andreas
diff mbox

Patch

 Disassembly of section .text:
@@ -425,7 +425,7 @@  _ZL18encode_ieee_doublePK11real_formatPl
      442:	e7af      	b.n	3a4 <_ZL18encode_ieee_doublePK11real_formatPlPK10real_value+0x2c>
      444:	f063 4300 	orn	r3, r3, #2147483648	; 0x80000000
      448:	f04f 35ff 	mov.w	r5, #4294967295	; 0xffffffff
-     44c:	e7aa      	b.n	ffffff58 <_Z29HONOR_SIGN_DEPENDENT_ROUNDINGPK7rtx_def+0xffffb564>
+     44c:	e7aa      	b.n	ffffff58 <_Z29HONOR_SIGN_DEPENDENT_ROUNDINGPK7rtx_def+0xffffb554>
      44e:	f240 0000 	movw	r0, #0